From e012bfcd0c32c6fd185890aedb5f17e69da8870e Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Mon, 13 Sep 2004 18:19:41 +0000 Subject: Connection.ice --- cpp/src/Slice/Parser.cpp | 53 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'cpp/src/Slice/Parser.cpp') diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 1239077681b..82f90b974cd 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -1377,18 +1377,18 @@ Slice::Container::hasNonLocalClassDecls() const } bool -Slice::Container::hasNonLocalInterfaceDefs() const +Slice::Container::hasNonLocalClassDefs() const { for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) { - ClassDeclPtr cl = ClassDeclPtr::dynamicCast(*p); - if(cl && !cl->isLocal() && cl->isInterface()) + ClassDefPtr cl = ClassDefPtr::dynamicCast(*p); + if(cl && !cl->isLocal()) { return true; } ContainerPtr container = ContainerPtr::dynamicCast(*p); - if(container && container->hasNonLocalInterfaceDefs()) + if(container && container->hasNonLocalClassDefs()) { return true; } @@ -1439,6 +1439,27 @@ Slice::Container::hasNonLocalDictionaries() const return false; } +bool +Slice::Container::hasNonLocalExceptions() const +{ + for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) + { + ExceptionPtr q = ExceptionPtr::dynamicCast(*p); + if(q && !q->isLocal()) + { + return true; + } + + ContainerPtr container = ContainerPtr::dynamicCast(*p); + if(container && container->hasNonLocalExceptions()) + { + return true; + } + } + + return false; +} + bool Slice::Container::hasClassDecls() const { @@ -1524,27 +1545,6 @@ Slice::Container::hasDataOnlyClasses() const return false; } -bool -Slice::Container::hasNonLocalExceptions() const -{ - for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) - { - ExceptionPtr q = ExceptionPtr::dynamicCast(*p); - if(q && !q->isLocal()) - { - return true; - } - - ContainerPtr container = ContainerPtr::dynamicCast(*p); - if(container && container->hasNonLocalExceptions()) - { - return true; - } - } - - return false; -} - bool Slice::Container::hasOtherConstructedOrExceptions() const { @@ -5026,7 +5026,8 @@ Slice::Unit::parse(FILE* file, bool debug, bool disallowDeprecatedFeatures) assert(!Slice::unit); Slice::unit = this; - _disallowDeprecatedFeatures = disallowDeprecatedFeatures; // TODO: remove this once global definitions are outlawed. + // TODO: remove this once global definitions are outlawed. + _disallowDeprecatedFeatures = disallowDeprecatedFeatures; _currentComment = ""; _currentLine = 1; -- cgit v1.2.3