diff options
author | Marc Laukien <marc@zeroc.com> | 2001-06-21 00:38:51 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-06-21 00:38:51 +0000 |
commit | eb184aa9dc6f1acc75c9a9cc483fbd8d0b3b8b71 (patch) | |
tree | a96e8d8a6ede52dd2ff279217634d97d4e027cc9 /cpp/src/Slice/Parser.cpp | |
parent | win fixes (diff) | |
download | ice-eb184aa9dc6f1acc75c9a9cc483fbd8d0b3b8b71.tar.bz2 ice-eb184aa9dc6f1acc75c9a9cc483fbd8d0b3b8b71.tar.xz ice-eb184aa9dc6f1acc75c9a9cc483fbd8d0b3b8b71.zip |
cleanup
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 8c3c4ccaa7a..a5cbb1c13c7 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -53,6 +53,8 @@ void __Ice::incRef(Proxy* p) { p -> __incRef(); } void __Ice::decRef(Proxy* p) { p -> __decRef(); } void __Ice::incRef(Operation* p) { p -> __incRef(); } void __Ice::decRef(Operation* p) { p -> __decRef(); } +void __Ice::incRef(Native* p) { p -> __incRef(); } +void __Ice::decRef(Native* p) { p -> __decRef(); } void __Ice::incRef(Vector* p) { p -> __incRef(); } void __Ice::decRef(Vector* p) { p -> __decRef(); } void __Ice::incRef(Parser* p) { p -> __incRef(); } @@ -297,6 +299,18 @@ Slice::Container::createClassDecl(const string& name, bool local) return cl; } +Native_ptr +Slice::Container::createNative(const string& name) +{ + vector<Contained_ptr> matches = + parser_ -> findContents(thisScope() + name); + assert(matches.empty()); // TODO: Already exits + + Native_ptr p = new Native(this, name); + contents_.push_back(p); + return p; +} + Vector_ptr Slice::Container::createVector(const string& name, const Type_ptr& type) { @@ -744,6 +758,25 @@ Slice::DataMember::DataMember(const Container_ptr& container, } // ---------------------------------------------------------------------- +// Native +// ---------------------------------------------------------------------- + +void +Slice::Native::visit(ParserVisitor* visitor) +{ + visitor -> visitNative(this); +} + +Slice::Native::Native(const Container_ptr& container, + const string& name) + : Constructed(container, name), + Type(container -> parser()), + Contained(container, name), + SyntaxTreeBase(container -> parser()) +{ +} + +// ---------------------------------------------------------------------- // Vector // ---------------------------------------------------------------------- |