diff options
author | Matthew Newhook <matthew@zeroc.com> | 2008-02-14 16:22:39 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2008-02-14 16:22:39 +0800 |
commit | 294ec25fda6e3785c54970d274b860b1ca837955 (patch) | |
tree | 26e5d1987ffdfde7bbacb87fdfb7b96bbef998e9 /cpp/src/slice2cppe/Gen.cpp | |
parent | Merge branch 'bug2435' (diff) | |
download | ice-294ec25fda6e3785c54970d274b860b1ca837955.tar.bz2 ice-294ec25fda6e3785c54970d274b860b1ca837955.tar.xz ice-294ec25fda6e3785c54970d274b860b1ca837955.zip |
merged bug2615
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 << '{'; |