aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/cplusplus/Names.h
diff options
context:
space:
mode:
authorRoberto Raggi <[email protected]>2009-02-09 16:32:56 +0100
committerRoberto Raggi <[email protected]>2009-02-09 16:32:56 +0100
commit17d047ced8966bb377a0937a35ab299f86e654a6 (patch)
tree0312d6edb3013e1914c58ef286cd30f29ef48b5e /src/shared/cplusplus/Names.h
parent2f9053921113aa1a48928b238d99f87049f98d54 (diff)
Reimplemented Name::as*() using virtual functions.
Diffstat (limited to 'src/shared/cplusplus/Names.h')
-rw-r--r--src/shared/cplusplus/Names.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Names.h b/src/shared/cplusplus/Names.h
index 86e6813c6c2..1423c4b96fb 100644
--- a/src/shared/cplusplus/Names.h
+++ b/src/shared/cplusplus/Names.h
@@ -77,6 +77,12 @@ public:
virtual bool isEqualTo(const Name *other) const;
+ virtual const QualifiedNameId *asQualifiedNameId() const
+ { return this; }
+
+ virtual QualifiedNameId *asQualifiedNameId()
+ { return this; }
+
protected:
virtual void accept0(NameVisitor *visitor);
@@ -96,6 +102,12 @@ public:
virtual bool isEqualTo(const Name *other) const;
+ virtual const NameId *asNameId() const
+ { return this; }
+
+ virtual NameId *asNameId()
+ { return this; }
+
protected:
virtual void accept0(NameVisitor *visitor);
@@ -113,6 +125,12 @@ public:
virtual bool isEqualTo(const Name *other) const;
+ virtual const DestructorNameId *asDestructorNameId() const
+ { return this; }
+
+ virtual DestructorNameId *asDestructorNameId()
+ { return this; }
+
protected:
virtual void accept0(NameVisitor *visitor);
@@ -137,6 +155,12 @@ public:
virtual bool isEqualTo(const Name *other) const;
+ virtual const TemplateNameId *asTemplateNameId() const
+ { return this; }
+
+ virtual TemplateNameId *asTemplateNameId()
+ { return this; }
+
protected:
virtual void accept0(NameVisitor *visitor);
@@ -211,6 +235,12 @@ public:
virtual bool isEqualTo(const Name *other) const;
+ virtual const OperatorNameId *asOperatorNameId() const
+ { return this; }
+
+ virtual OperatorNameId *asOperatorNameId()
+ { return this; }
+
protected:
virtual void accept0(NameVisitor *visitor);
@@ -228,6 +258,12 @@ public:
virtual bool isEqualTo(const Name *other) const;
+ virtual const ConversionNameId *asConversionNameId() const
+ { return this; }
+
+ virtual ConversionNameId *asConversionNameId()
+ { return this; }
+
protected:
virtual void accept0(NameVisitor *visitor);