summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/Parser.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-12-19 13:08:44 +0100
committerBenoit Foucher <benoit@zeroc.com>2012-12-19 13:08:44 +0100
commit7c287857f3bd50b806109660d23e2993b7a4b7ad (patch)
treeca0bcebbc06373520b7badd426762b6caa744fe5 /cpp/include/Slice/Parser.h
parentICE-5148 - adding more tests (diff)
downloadice-7c287857f3bd50b806109660d23e2993b7a4b7ad.tar.bz2
ice-7c287857f3bd50b806109660d23e2993b7a4b7ad.tar.xz
ice-7c287857f3bd50b806109660d23e2993b7a4b7ad.zip
ICE-4938: support for compact IDs
Diffstat (limited to 'cpp/include/Slice/Parser.h')
-rw-r--r--cpp/include/Slice/Parser.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h
index 8f467bb0ccf..609a1d45e27 100644
--- a/cpp/include/Slice/Parser.h
+++ b/cpp/include/Slice/Parser.h
@@ -423,7 +423,7 @@ public:
virtual void destroy();
ModulePtr createModule(const std::string&);
- ClassDefPtr createClassDef(const std::string&, bool, const ClassList&, bool);
+ ClassDefPtr createClassDef(const std::string&, int, bool, const ClassList&, bool);
ClassDeclPtr createClassDecl(const std::string&, bool, bool);
ExceptionPtr createException(const std::string&, const ExceptionPtr&, bool, NodeType = Real);
StructPtr createStruct(const std::string&, bool, NodeType = Real);
@@ -664,10 +664,11 @@ public:
virtual bool uses(const ContainedPtr&) const;
virtual std::string kindOf() const;
virtual void visit(ParserVisitor*, bool);
+ int compactId() const;
protected:
- ClassDef(const ContainerPtr&, const std::string&, bool, const ClassList&, bool);
+ ClassDef(const ContainerPtr&, const std::string&, int, bool, const ClassList&, bool);
friend class Container;
ClassDeclPtr _declaration;
@@ -676,6 +677,7 @@ protected:
bool _hasOperations;
ClassList _bases;
bool _local;
+ int _compactId;
};
// ----------------------------------------------------------------------
@@ -1036,6 +1038,9 @@ public:
ExceptionList findDerivedExceptions(const ExceptionPtr&) const;
ContainedList findUsedBy(const ContainedPtr&) const;
+ void addTypeId(int, const std::string&);
+ std::string getTypeId(int);
+
bool usesNonLocals() const;
bool usesConsts() const;
@@ -1081,6 +1086,7 @@ private:
std::map<std::string, ContainedList> _contentMap;
FeatureProfile _featureProfile;
std::map<std::string, DefinitionContextPtr> _definitionContextMap;
+ std::map<int, std::string> _typeIds;
};
extern SLICE_API Unit* unit; // The current parser for bison/flex