1 /******************************************************************************
3 * Copyright (C) 1997-2012 by Dimitri van Heesch.
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.
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
24 /*! \brief This class contains the information about the argument of a
25 * function or template
30 /*! Construct a new argument. */
32 /*! Copy an argument (does a deep copy of all strings). */
33 Argument(const Argument &a)
35 attrib=a.attrib.copy();
38 defval=a.defval.copy();
42 /*! Assignment of an argument (does a deep copy of all strings). */
43 Argument &operator=(const Argument &a)
47 attrib=a.attrib.copy();
50 defval=a.defval.copy();
56 /*! return TRUE if this argument is documentation and the argument has a
59 bool hasDocumentation() const
61 return !name.isEmpty() && !docs.isEmpty();
64 QCString attrib; /*!< Argument's attribute (IDL only) */
65 QCString type; /*!< Argument's type */
66 QCString canType; /*!< Cached value of canonical type (after type resolution). Empty initially. */
67 QCString name; /*!< Argument's name (may be empty) */
68 QCString array; /*!< Argument's array specifier (may be empty) */
69 QCString defval; /*!< Argument's default value (may be empty) */
70 QCString docs; /*!< Argument's documentation (may be empty) */
73 /*! \brief This class represents an function or template argument list.
75 * This class also stores some information about member that is typically
76 * put after the argument list, such as whether the member is const,
77 * volatile or pure virtual.
79 class ArgumentList : public QList<Argument>
82 /*! Creates an empty argument list */
83 ArgumentList() : QList<Argument>(),
84 constSpecifier(FALSE),
85 volatileSpecifier(FALSE),
87 { setAutoDelete(TRUE); }
88 /*! Destroys the argument list */
90 /*! Makes a deep copy of this object */
91 ArgumentList *deepCopy() const;
92 /*! Does any argument of this list have documentation? */
93 bool hasDocumentation() const;
94 /*! Does the member modify the state of the class? default: FALSE. */
96 /*! Is the member volatile? default: FALSE. */
97 bool volatileSpecifier;
98 /*! Is this a pure virtual member? default: FALSE */
100 /*! C++11 style Trailing return type? */
101 QCString trailingReturnType;
102 /*! C++11 defaulted method */
104 static ArgumentList *unmarshal(StorageIntf *s);
105 static void marshal(StorageIntf *s,ArgumentList *argList);
108 typedef QListIterator<Argument> ArgumentListIterator;