summaryrefslogtreecommitdiffstats
path: root/src/arguments.h
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-02-20 21:09:54 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-02-20 21:09:54 (GMT)
commit34d4ace6d4037862b6d280f1d7534292c714bf59 (patch)
treea9a7b7b5542fbc9a2189f8ae6b39379770043b48 /src/arguments.h
parentc22d77a7a9c0f26a060a58047f514869a9e0a067 (diff)
downloadDoxygen-34d4ace6d4037862b6d280f1d7534292c714bf59.zip
Doxygen-34d4ace6d4037862b6d280f1d7534292c714bf59.tar.gz
Doxygen-34d4ace6d4037862b6d280f1d7534292c714bf59.tar.bz2
Release-1.7.6.1-20120220
Diffstat (limited to 'src/arguments.h')
-rw-r--r--src/arguments.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/src/arguments.h b/src/arguments.h
new file mode 100644
index 0000000..c5ca942
--- /dev/null
+++ b/src/arguments.h
@@ -0,0 +1,99 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef ARGUMENTS_H
+#define ARGUMENTS_H
+
+#include "qtbc.h"
+#include <qlist.h>
+
+/*! \brief This class contains the information about the argument of a
+ * function or template
+ *
+ */
+struct Argument
+{
+ /*! Construct a new argument. */
+ Argument() {}
+ /*! Copy an argument (does a deep copy of all strings). */
+ Argument(const Argument &a)
+ {
+ attrib=a.attrib.copy();
+ type=a.type.copy();
+ name=a.name.copy();
+ defval=a.defval.copy();
+ docs=a.docs.copy();
+ array=a.array.copy();
+ }
+ /*! Assignment of an argument (does a deep copy of all strings). */
+ Argument &operator=(const Argument &a)
+ {
+ if (this!=&a)
+ {
+ attrib=a.attrib.copy();
+ type=a.type.copy();
+ name=a.name.copy();
+ defval=a.defval.copy();
+ docs=a.docs.copy();
+ array=a.array.copy();
+ }
+ return *this;
+ }
+ /*! return TRUE if this argument is documentation and the argument has a
+ * non empty name.
+ */
+ bool hasDocumentation() const
+ {
+ return !name.isEmpty() && !docs.isEmpty();
+ }
+
+ QCString attrib; /*!< Argument's attribute (IDL only) */
+ QCString type; /*!< Argument's type */
+ QCString canType; /*!< Cached value of canonical type (after type resolution). Empty initially. */
+ QCString name; /*!< Argument's name (may be empty) */
+ QCString array; /*!< Argument's array specifier (may be empty) */
+ QCString defval; /*!< Argument's default value (may be empty) */
+ QCString docs; /*!< Argument's documentation (may be empty) */
+};
+
+/*! \brief 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 wether the member is const,
+ * volatile or pure virtual.
+ */
+class ArgumentList : public QList<Argument>
+{
+ public:
+ /*! Creates an empty argument list */
+ ArgumentList() : QList<Argument>(),
+ constSpecifier(FALSE),
+ volatileSpecifier(FALSE),
+ pureSpecifier(FALSE)
+ { setAutoDelete(TRUE); }
+ /*! Destroys the argument list */
+ ~ArgumentList() {}
+ bool hasDocumentation() const;
+ /*! Does the member modify the state of the class? default: FALSE. */
+ bool constSpecifier;
+ /*! Is the member volatile? default: FALSE. */
+ bool volatileSpecifier;
+ /*! Is this a pure virtual member? default: FALSE */
+ bool pureSpecifier;
+};
+
+typedef QListIterator<Argument> ArgumentListIterator;
+
+#endif