diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-03-26 20:10:21 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-03-26 20:10:21 +0000 |
commit | a13c53fc30780f8779046cba8a01839587c8978a (patch) | |
tree | 7d858afa61055e8d5b4ccb2e28506f1e85d77099 /cpp/src/slice2java/Gen.cpp | |
parent | Updated to include test/IceSSL/configuration in the compilation (diff) | |
download | ice-a13c53fc30780f8779046cba8a01839587c8978a.tar.bz2 ice-a13c53fc30780f8779046cba8a01839587c8978a.tar.xz ice-a13c53fc30780f8779046cba8a01839587c8978a.zip |
bug fix for Operations interfaces
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 9b698f4b43a..87bfc503177 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -690,18 +690,27 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p) // Generate the operations interface // out << sp << nl << "public interface " << name << "Operations"; - if (!bases.empty()) + if ((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1) { out << " extends "; out.useCurrentPosAsIndent(); ClassList::const_iterator q = bases.begin(); + bool first = true; while (q != bases.end()) { - out << getAbsolute((*q)->scoped(), scope, "", "Operations"); - if (++q != bases.end()) + if ((*q)->isAbstract()) { - out << ',' << nl; + if (!first) + { + out << ',' << nl; + } + else + { + first = false; + } + out << getAbsolute((*q)->scoped(), scope, "", "Operations"); } + ++q; } out.restoreIndent(); } |