Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ArgumentList Class Reference

This class represents an function or template argument list. More...

#include <arguments.h>

Inheritance diagram for ArgumentList:
QList< Argument > QGList

Public Member Functions

 ArgumentList ()
 
 ~ArgumentList ()
 
ArgumentListdeepCopy () const
 
bool hasDocumentation () const
 
- Public Member Functions inherited from QList< Argument >
 QList ()
 
 QList (const QList< Argument > &l)
 
 ~QList ()
 
QList< Argument > & operator= (const QList< Argument > &l)
 
bool operator== (const QList< Argument > &list) const
 
uint count () const
 
bool isEmpty () const
 
bool insert (uint i, const Argument *d)
 
void inSort (const Argument *d)
 
void prepend (const Argument *d)
 
void append (const Argument *d)
 
bool remove (uint i)
 
bool remove (const Argument *d)
 
bool removeRef (const Argument *d)
 
bool removeFirst ()
 
bool removeLast ()
 
Argumenttake (uint i)
 
void clear ()
 
void sort ()
 
int find (const Argument *d) const
 
int findRef (const Argument *d) const
 
uint contains (const Argument *d) const
 
uint containsRef (const Argument *d) const
 
Argumentat (uint i) const
 
ArgumentgetFirst () const
 
ArgumentgetLast () const
 
void setAutoDelete (bool enable)
 

Static Public Member Functions

static ArgumentListunmarshal (StorageIntf *s)
 
static void marshal (StorageIntf *s, ArgumentList *argList)
 

Public Attributes

bool constSpecifier
 
bool volatileSpecifier
 
bool pureSpecifier
 
QCString trailingReturnType
 
bool isDeleted
 

Detailed Description

This class represents an function or template argument list.

This class also stores some information about member that is typically put after the argument list, such as whether the member is const, volatile or pure virtual.

Definition at line 82 of file arguments.h.

Constructor & Destructor Documentation

ArgumentList::ArgumentList ( )
inline

Creates an empty argument list

Definition at line 86 of file arguments.h.

86  : QList<Argument>(),
91  { setAutoDelete(TRUE); }
const bool FALSE
Definition: qglobal.h:370
bool constSpecifier
Definition: arguments.h:99
bool volatileSpecifier
Definition: arguments.h:101
bool pureSpecifier
Definition: arguments.h:103
bool isDeleted
Definition: arguments.h:107
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
ArgumentList::~ArgumentList ( )
inline

Destroys the argument list

Definition at line 93 of file arguments.h.

93 {}

Member Function Documentation

ArgumentList * ArgumentList::deepCopy ( ) const

Makes a deep copy of this object

Definition at line 20 of file arguments.cpp.

21 {
22  ArgumentList *argList = new ArgumentList;
23  argList->setAutoDelete(TRUE);
24 
25  QListIterator<Argument> ali(*this);
26  Argument *a;
27  for (;(a=ali.current());++ali)
28  {
29  argList->append(new Argument(*a));
30  }
31  argList->constSpecifier = constSpecifier;
33  argList->pureSpecifier = pureSpecifier;
35  argList->isDeleted = isDeleted;
36 
37  return argList;
38 }
This class represents an function or template argument list.
Definition: arguments.h:82
void append(const type *d)
Definition: qlist.h:73
bool constSpecifier
Definition: arguments.h:99
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
bool volatileSpecifier
Definition: arguments.h:101
const double a
bool pureSpecifier
Definition: arguments.h:103
bool isDeleted
Definition: arguments.h:107
QCString trailingReturnType
Definition: arguments.h:105
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
bool ArgumentList::hasDocumentation ( ) const

Does any argument of this list have documentation?

the argument list is documented if one of its arguments is documented

Definition at line 8 of file arguments.cpp.

9 {
10  bool hasDocs=FALSE;
11  ArgumentListIterator ali(*this);
12  Argument *a;
13  for (ali.toFirst();!hasDocs && (a=ali.current());++ali)
14  {
15  hasDocs = a->hasDocumentation();
16  }
17  return hasDocs;
18 }
const bool FALSE
Definition: qglobal.h:370
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const double a
void ArgumentList::marshal ( StorageIntf s,
ArgumentList argList 
)
static

Definition at line 69 of file arguments.cpp.

70 {
71  if (argList==0)
72  {
73  marshalUInt(s,NULL_LIST); // null pointer representation
74  }
75  else
76  {
77  marshalUInt(s,argList->count());
78  if (argList->count()>0)
79  {
80  ArgumentListIterator ali(*argList);
81  Argument *a;
82  for (ali.toFirst();(a=ali.current());++ali)
83  {
84  marshalQCString(s,a->attrib);
85  marshalQCString(s,a->type);
86  marshalQCString(s,a->canType);
87  marshalQCString(s,a->name);
88  marshalQCString(s,a->array);
89  marshalQCString(s,a->defval);
90  marshalQCString(s,a->docs);
92  }
93  }
94  marshalBool(s,argList->constSpecifier);
95  marshalBool(s,argList->volatileSpecifier);
96  marshalBool(s,argList->pureSpecifier);
98  marshalBool(s,argList->isDeleted);
99  }
100 }
QCString type
Definition: arguments.h:67
#define NULL_LIST
Definition: marshal.h:41
QCString defval
Definition: arguments.h:71
QCString canType
Definition: arguments.h:68
bool constSpecifier
Definition: arguments.h:99
void marshalBool(StorageIntf *s, bool b)
Definition: marshal.cpp:42
QCString typeConstraint
Definition: arguments.h:73
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
uint count() const
Definition: qlist.h:66
bool volatileSpecifier
Definition: arguments.h:101
const double a
bool pureSpecifier
Definition: arguments.h:103
QCString attrib
Definition: arguments.h:66
void marshalUInt(StorageIntf *s, uint v)
Definition: marshal.cpp:26
bool isDeleted
Definition: arguments.h:107
QCString name
Definition: arguments.h:69
QCString trailingReturnType
Definition: arguments.h:105
void marshalQCString(StorageIntf *s, const QCString &str)
Definition: marshal.cpp:48
QCString array
Definition: arguments.h:70
QCString docs
Definition: arguments.h:72
ArgumentList * ArgumentList::unmarshal ( StorageIntf s)
static

Definition at line 40 of file arguments.cpp.

41 {
42  uint i;
44  if (count==NULL_LIST) return 0; // null list
46  assert(count<1000000);
47  //printf("unmarshalArgumentList: %d\n",count);
48  for (i=0;i<count;i++)
49  {
50  Argument *a = new Argument;
51  a->attrib = unmarshalQCString(s);
52  a->type = unmarshalQCString(s);
53  a->canType = unmarshalQCString(s);
54  a->name = unmarshalQCString(s);
55  a->array = unmarshalQCString(s);
56  a->defval = unmarshalQCString(s);
57  a->docs = unmarshalQCString(s);
59  result->append(a);
60  }
61  result->constSpecifier = unmarshalBool(s);
62  result->volatileSpecifier = unmarshalBool(s);
63  result->pureSpecifier = unmarshalBool(s);
65  result->isDeleted = unmarshalBool(s);
66  return result;
67 }
QCString type
Definition: arguments.h:67
This class represents an function or template argument list.
Definition: arguments.h:82
static QCString result
#define NULL_LIST
Definition: marshal.h:41
void append(const type *d)
Definition: qlist.h:73
QCString defval
Definition: arguments.h:71
QCString unmarshalQCString(StorageIntf *s)
Definition: marshal.cpp:451
QCString canType
Definition: arguments.h:68
bool constSpecifier
Definition: arguments.h:99
QCString typeConstraint
Definition: arguments.h:73
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
uint count() const
Definition: qlist.h:66
bool volatileSpecifier
Definition: arguments.h:101
bool unmarshalBool(StorageIntf *s)
Definition: marshal.cpp:443
const double a
uint unmarshalUInt(StorageIntf *s)
Definition: marshal.cpp:427
bool pureSpecifier
Definition: arguments.h:103
QCString attrib
Definition: arguments.h:66
bool isDeleted
Definition: arguments.h:107
QCString name
Definition: arguments.h:69
QCString trailingReturnType
Definition: arguments.h:105
unsigned uint
Definition: qglobal.h:351
QCString array
Definition: arguments.h:70
QCString docs
Definition: arguments.h:72

Member Data Documentation

bool ArgumentList::constSpecifier

Does the member modify the state of the class? default: FALSE.

Definition at line 99 of file arguments.h.

bool ArgumentList::isDeleted

method with =delete

Definition at line 107 of file arguments.h.

bool ArgumentList::pureSpecifier

Is this a pure virtual member? default: FALSE

Definition at line 103 of file arguments.h.

QCString ArgumentList::trailingReturnType

C++11 style Trailing return type?

Definition at line 105 of file arguments.h.

bool ArgumentList::volatileSpecifier

Is the member volatile? default: FALSE.

Definition at line 101 of file arguments.h.


The documentation for this class was generated from the following files: