ISLEman
arguments.h
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef ARGUMENTS_H
17 #define ARGUMENTS_H
18 
19 #include <qlist.h>
20 #include <qcstring.h>
21 
22 class StorageIntf;
23 
28 struct Argument
29 {
31  Argument() {}
33  Argument(const Argument &a)
34  {
35  attrib=a.attrib;
36  type=a.type;
37  name=a.name;
38  array=a.array;
39  defval=a.defval;
40  docs=a.docs;
42  }
45  {
46  if (this!=&a)
47  {
48  attrib=a.attrib;
49  type=a.type;
50  name=a.name;
51  array=a.array;
52  defval=a.defval;
53  docs=a.docs;
55  }
56  return *this;
57  }
61  bool hasDocumentation() const
62  {
63  return !name.isEmpty() && !docs.isEmpty();
64  }
65 
74 };
75 
76 enum RefQualifierType
77 {
78  RefQualifierNone,
79  RefQualifierLValue,
80  RefQualifierRValue
81 };
82 
89 class ArgumentList : public QList<Argument>
90 {
91  public:
94  constSpecifier(FALSE),
95  volatileSpecifier(FALSE),
96  pureSpecifier(FALSE),
97  isDeleted(FALSE),
98  refQualifier(RefQualifierNone)
99  { setAutoDelete(TRUE); }
103  ArgumentList *deepCopy() const;
105  bool hasDocumentation() const;
115  bool isDeleted;
117  RefQualifierType refQualifier;
118 
119  static ArgumentList *unmarshal(StorageIntf *s);
120  static void marshal(StorageIntf *s,ArgumentList *argList);
121 };
122 
124 
125 #endif
QCString type
Definition: arguments.h:67
This class represents an function or template argument list.
Definition: arguments.h:89
bool hasDocumentation() const
Definition: arguments.h:61
QCString defval
Definition: arguments.h:71
Argument(const Argument &a)
Definition: arguments.h:33
Abstract interface for file based memory storage operations.
Definition: store.h:27
~ArgumentList()
Definition: arguments.h:101
QCString canType
Definition: arguments.h:68
bool constSpecifier
Definition: arguments.h:107
QCString typeConstraint
Definition: arguments.h:73
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
bool volatileSpecifier
Definition: arguments.h:109
Argument()
Definition: arguments.h:31
RefQualifierType refQualifier
Definition: arguments.h:117
Definition: qlist.h:126
Argument & operator=(const Argument &a)
Definition: arguments.h:44
bool pureSpecifier
Definition: arguments.h:111
QCString attrib
Definition: arguments.h:66
ArgumentList()
Definition: arguments.h:93
bool isDeleted
Definition: arguments.h:115
QCString name
Definition: arguments.h:69
QCString trailingReturnType
Definition: arguments.h:113
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition: qcstring.h:189
This is an alternative implementation of QCString.
Definition: qcstring.h:131
Definition: qlist.h:54
QCString array
Definition: arguments.h:70
QCString docs
Definition: arguments.h:72