diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-02-04 12:34:11 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-02-04 12:34:11 -0330 |
commit | d4ce465441d7701d79d50e8f3640620abf65d46b (patch) | |
tree | 3b31e19791675212462fc01472bf619ad807bd17 /cpp/src/slice2cppe/Gen.cpp | |
parent | Removed reference to C++ builder (diff) | |
download | ice-d4ce465441d7701d79d50e8f3640620abf65d46b.tar.bz2 ice-d4ce465441d7701d79d50e8f3640620abf65d46b.tar.xz ice-d4ce465441d7701d79d50e8f3640620abf65d46b.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2305
Diffstat (limited to 'cpp/src/slice2cppe/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 920da32a79d..9ecaf80640a 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -2626,6 +2626,25 @@ Slice::Gen::ImplVisitor::visitModuleStart(const ModulePtr& p) _useWstring = setUseWstring(p, _useWstringHist, _useWstring); + set<string> includes; + ClassList classes = p->classes(); + for(ClassList::const_iterator q = classes.begin(); q != classes.end(); ++q) + { + ClassList bases = (*q)->bases(); + for(ClassList::const_iterator r = bases.begin(); r != bases.end(); ++r) + { + if((*r)->isAbstract()) + { + includes.insert((*r)->name()); + } + } + } + + for(set<string>::const_iterator it = includes.begin(); it != includes.end(); ++it) + { + H << nl << "#include <" << *it << "I.h>"; + } + string name = fixKwd(p->name()); H << sp << nl << "namespace " << name << nl << '{'; |