summaryrefslogtreecommitdiffstats
path: root/src/definition.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-10-23 17:38:04 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-10-23 17:38:04 (GMT)
commite22e89c0ed1c4fbf22021f4446a2900c65214cf2 (patch)
tree1c52653cf368613b305e5facf5957ce2b70afcd6 /src/definition.h
parent73c488839a8bfa2e4f3254c37cba5943f2ab238f (diff)
downloadDoxygen-e22e89c0ed1c4fbf22021f4446a2900c65214cf2.zip
Doxygen-e22e89c0ed1c4fbf22021f4446a2900c65214cf2.tar.gz
Doxygen-e22e89c0ed1c4fbf22021f4446a2900c65214cf2.tar.bz2
Refactoring: Remove unused DefinitionIntf and DefinitionList classes
Diffstat (limited to 'src/definition.h')
-rw-r--r--src/definition.h61
1 files changed, 18 insertions, 43 deletions
diff --git a/src/definition.h b/src/definition.h
index b3d7853..9b31f2f 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -68,12 +68,19 @@ struct BodyInfo
FileDef *fileDef; //!< file definition containing the function body
};
-/** Abstract interface for a Definition or DefinitionList */
-class DefinitionIntf
+/** The common base class of all entity definitions found in the sources.
+ *
+ * This can be a class or a member function, or a file, or a namespace, etc.
+ * Use definitionType() to find which type of definition this is.
+ */
+class Definition
{
public:
- DefinitionIntf() {}
- virtual ~DefinitionIntf() {}
+ struct Cookie
+ {
+ virtual ~Cookie() {}
+ };
+
/*! Types of derived classes */
enum DefType
{
@@ -84,29 +91,16 @@ class DefinitionIntf
TypeGroup = 4,
TypePackage = 5,
TypePage = 6,
- TypeDir = 7,
- TypeSymbolList = 8
- };
- /*! Use this for dynamic inspection of the type of the derived class */
- virtual DefType definitionType() const = 0;
-};
-
-/** The common base class of all entity definitions found in the sources.
- *
- * This can be a class or a member function, or a file, or a namespace, etc.
- * Use definitionType() to find which type of definition this is.
- */
-class Definition : public DefinitionIntf
-{
- public:
- struct Cookie
- {
- virtual ~Cookie() {}
+ TypeDir = 7
};
//-----------------------------------------------------------------------------------
// ---- getters -----
//-----------------------------------------------------------------------------------
+
+ /*! Use this for dynamic inspection of the type of the derived class */
+ virtual DefType definitionType() const = 0;
+
/*! Returns TRUE if this is an alias of another definition */
virtual bool isAlias() const = 0;
@@ -375,28 +369,9 @@ class Definition : public DefinitionIntf
//-----------------------------------------------------------------------------------
virtual void _setSymbolName(const QCString &name) = 0;
virtual QCString _symbolName() const = 0;
-};
-
-/** A list of Definition objects. */
-class DefinitionList : public QList<Definition>, public DefinitionIntf
-{
- public:
- ~DefinitionList() {}
- DefType definitionType() const { return TypeSymbolList; }
- int compareValues(const Definition *item1,const Definition *item2) const
- {
- return qstricmp(item1->name(),item2->name());
- }
-};
-
-/** An iterator for Definition objects in a DefinitionList. */
-class DefinitionListIterator : public QListIterator<Definition>
-{
- public:
- DefinitionListIterator(const DefinitionList &l) :
- QListIterator<Definition>(l) {}
- ~DefinitionListIterator() {}
+ // ---------------------------------
+ virtual ~Definition() = default;
};
/** Reads a fragment from file \a fileName starting with line \a startLine