summaryrefslogtreecommitdiffstats
path: root/src/namespacedef.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/namespacedef.h')
-rw-r--r--src/namespacedef.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 8ce0ef1..b81480e 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -34,14 +34,12 @@ class FTextStream;
class NamespaceDefMutable;
/** An abstract interface of a namespace symbol. */
-class NamespaceDef : virtual public Definition
+class NamespaceDef : public Definition
{
public:
virtual ~NamespaceDef() {}
virtual DefType definitionType() const = 0;
- static NamespaceDefMutable *make_mutable(const NamespaceDef *);
-
// ---- getters
virtual QCString getOutputFileBase() const = 0;
virtual QCString anchor() const = 0;
@@ -89,7 +87,7 @@ class NamespaceDef : virtual public Definition
virtual bool isVisited() const = 0;
};
-class NamespaceDefMutable : virtual public DefinitionMutable, virtual public NamespaceDef
+class NamespaceDefMutable : public DefinitionMutable, public NamespaceDef
{
public:
@@ -118,9 +116,6 @@ class NamespaceDefMutable : virtual public DefinitionMutable, virtual public Nam
virtual void setInline(bool isInline) = 0;
};
-inline NamespaceDefMutable *NamespaceDef::make_mutable(const NamespaceDef *nd)
-{ return dynamic_cast<NamespaceDefMutable*>(const_cast<NamespaceDef*>(nd)); }
-
/** Factory method to create new NamespaceDef instance */
NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int defColumn,
const char *name,const char *ref=0,
@@ -130,6 +125,19 @@ NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int
/** Factory method to create an alias of an existing namespace. Used for inline namespaces. */
NamespaceDef *createNamespaceDefAlias(const Definition *newScope, const NamespaceDef *nd);
+
+// --- Cast functions
+
+NamespaceDef *toNamespaceDef(Definition *d);
+NamespaceDef *toNamespaceDef(DefinitionMutable *d);
+const NamespaceDef *toNamespaceDef(const Definition *d);
+NamespaceDefMutable *toNamespaceDefMutable(Definition *d);
+NamespaceDefMutable *toNamespaceDefMutable(const Definition *d);
+
+//------------------------------------------------------------------------
+
+
+
/** A list of NamespaceDef objects. */
class NamespaceList : public QList<NamespaceDef>
{