diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-01-16 22:04:10 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-01-16 22:04:10 +0000 |
commit | 4aae7e1369bd950a8b41e613619464d30624698a (patch) | |
tree | 639ae95bc3fdccbed120cc5644f74602401c1096 /cpp/src/Slice/Parser.cpp | |
parent | removing Transform (diff) | |
download | ice-4aae7e1369bd950a8b41e613619464d30624698a.tar.bz2 ice-4aae7e1369bd950a8b41e613619464d30624698a.tar.xz ice-4aae7e1369bd950a8b41e613619464d30624698a.zip |
adding ClassDef::isA
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 08cf86de047..291ddaf1b97 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -2493,6 +2493,23 @@ Slice::ClassDef::isInterface() const } bool +Slice::ClassDef::isA(const string& id) const +{ + if(id == _scoped) + { + return true; + } + for(ClassList::const_iterator p = _bases.begin(); p != _bases.end(); ++p) + { + if((*p)->isA(id)) + { + return true; + } + } + return false; +} + +bool Slice::ClassDef::isLocal() const { return _local; |