summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-02-07 01:05:18 +0000
committerMichi Henning <michi@zeroc.com>2003-02-07 01:05:18 +0000
commit3ae3ebfc6153829b91c097841ad41505d5a486f5 (patch)
treec13719555a13ee128c985881928c70f3ba8c94ba /cpp/src/slice2java/Gen.cpp
parentminor fix (diff)
downloadice-3ae3ebfc6153829b91c097841ad41505d5a486f5.tar.bz2
ice-3ae3ebfc6153829b91c097841ad41505d5a486f5.tar.xz
ice-3ae3ebfc6153829b91c097841ad41505d5a486f5.zip
Changed Java mapping for Operations interface. Interface Foo now creates
_FooOperations. "Operations" is no longer a reserved suffix for Slice identifiers.
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 5c9b90ecb89..383ffc8b398 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -805,7 +805,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
string scoped = p->scoped();
ClassList bases = p->bases();
string scope = p->scope();
- string absolute = getAbsolute(scoped);
+ string absolute = getAbsolute(scoped, "", "_", "Operations");
//
// Don't generate an Operations interface for non-abstract classes
@@ -815,7 +815,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
return false;
}
- if(!open(absolute + "Operations"))
+ if(!open(absolute))
{
return false;
}
@@ -825,7 +825,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
//
// Generate the operations interface
//
- out << sp << nl << "public interface " << name << "Operations";
+ out << sp << nl << "public interface _" << name << "Operations";
if((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1)
{
out << " extends ";
@@ -844,7 +844,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
{
first = false;
}
- out << getAbsolute((*q)->scoped(), scope, "", "Operations");
+ out << getAbsolute((*q)->scoped(), scope, "_", "Operations");
}
++q;
}
@@ -1087,7 +1087,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "Ice.Object";
}
- out << "," << nl << name << "Operations";
+ out << "," << nl << "_" << name << "Operations";
if(!bases.empty())
{
ClassList::const_iterator q = bases.begin();
@@ -1133,7 +1133,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
StringList implements;
if(p->isAbstract())
{
- implements.push_back(name + "Operations");
+ implements.push_back("_" + name + "Operations");
}
if(!bases.empty())
{
@@ -3673,7 +3673,7 @@ Slice::Gen::ImplTieVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << " extends " << fixKwd(bases.front()->name()) << 'I';
}
- out << " implements " << name << "Operations";
+ out << " implements _" << name << "Operations";
out << sb;
out << nl << "public" << nl << name << "I()";