diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-06-04 20:32:22 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-06-04 20:32:22 +0000 |
commit | f21dd19c50c7a2aa8862fba13ff754ee1a01cfda (patch) | |
tree | dd27e354446c211604ec3ab6af9006ed0ab4946b /cpp | |
parent | Added refreshPublishedEndpoints (diff) | |
download | ice-f21dd19c50c7a2aa8862fba13ff754ee1a01cfda.tar.bz2 ice-f21dd19c50c7a2aa8862fba13ff754ee1a01cfda.tar.xz ice-f21dd19c50c7a2aa8862fba13ff754ee1a01cfda.zip |
Changed LocalObject mapping
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/src/Slice/CsUtil.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Slice/JavaUtil.cpp | 4 | ||||
-rwxr-xr-x | cpp/src/slice2cs/Gen.cpp | 55 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 26 |
4 files changed, 51 insertions, 36 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 061033bb802..ad546d3b0b6 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -149,7 +149,7 @@ Slice::CsGenerator::typeToString(const TypePtr& type) "string", "Ice.Object", "Ice.ObjectPrx", - "Ice.LocalObject" + "System.Object" }; BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index b813312ef62..4ad55ef7432 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -417,7 +417,7 @@ Slice::JavaGenerator::typeToString(const TypePtr& type, "String", "Ice.Object", "Ice.ObjectPrx", - "Ice.LocalObject" + "java.lang.Object" }; static const char* builtinHolderTable[] = { @@ -611,7 +611,7 @@ Slice::JavaGenerator::typeToObjectString(const TypePtr& type, "java.lang.String", "Ice.Object", "Ice.ObjectPrx", - "Ice.LocalObject" + "java.lang.Object" }; BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 83571591218..c7f74e80780 100755 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -1261,18 +1261,13 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "public interface " << fixId(name) << " : "; if(p->isLocal()) { - _out << "Ice.LocalObject"; + _out << name << "OperationsNC_"; } else { - _out << "Ice.Object"; + _out << "Ice.Object, "; + _out << name << "Operations_, " << name << "OperationsNC_"; } - _out << ", " << name; - if(!p->isLocal()) - { - _out << "Operations_, " << name; - } - _out << "OperationsNC_"; if(!bases.empty()) { ClassList::const_iterator q = bases.begin(); @@ -1290,37 +1285,57 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << "abstract "; } - _out << "class " << fixId(name) << " : "; + _out << "class " << fixId(name); + + bool baseWritten = false; if(!hasBaseClass) { - if(p->isLocal()) - { - _out << "Ice.LocalObjectImpl"; - } - else + if(!p->isLocal()) { - _out << "Ice.ObjectImpl"; + _out << " : Ice.ObjectImpl"; + baseWritten = true; } } else { - _out << fixId(bases.front()->scoped()); + _out << " : " << fixId(bases.front()->scoped()); + baseWritten = true; bases.pop_front(); } if(p->isAbstract()) { + if(baseWritten) + { + _out << ", "; + } + else + { + _out << " : "; + baseWritten = true; + } + if(!p->isLocal()) { - _out << ", " << name << "Operations_"; + _out << name << "Operations_, "; } - _out << ", " << name << "OperationsNC_"; + _out << name << "OperationsNC_"; } for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q) { if((*q)->isAbstract()) { - _out << ", " << fixId((*q)->scoped()); + if(baseWritten) + { + _out << ", "; + } + else + { + _out << " : "; + baseWritten = true; + } + + _out << fixId((*q)->scoped()); } } } @@ -5138,7 +5153,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p) { if(p->isLocal()) { - _out << " : Ice.LocalObjectImpl, " << fixId(name); + _out << " : " << fixId(name); } else { diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 08ec3d245b3..a8a5c62316f 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -1690,21 +1690,15 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) out.useCurrentPosAsIndent(); if(p->isLocal()) { - out << "Ice.LocalObject"; + out << "_" << name << "OperationsNC"; } else { out << "Ice.Object"; - } - out << "," << nl << '_' << name; - if(!p->isLocal()) - { + out << "," << nl << '_' << name; out << "Operations, _" << name << "OperationsNC"; } - else - { - out << "OperationsNC"; - } + if(!bases.empty()) { ClassList::const_iterator q = bases.begin(); @@ -1725,11 +1719,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) } out << "class " << fixKwd(name); out.useCurrentPosAsIndent(); + bool implementsOnNewLine = true; if(bases.empty() || bases.front()->isInterface()) { if(p->isLocal()) { - out << " extends Ice.LocalObjectImpl"; + implementsOnNewLine = false; } else { @@ -1767,7 +1762,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) if(!implements.empty()) { - out << nl << " implements "; + if(implementsOnNewLine) + { + out << nl; + } + + out << " implements "; out.useCurrentPosAsIndent(); StringList::const_iterator q = implements.begin(); @@ -1842,7 +1842,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) if(!p->isAbstract() && !p->isLocal()) { out << sp; - out << nl << "private static class __F extends Ice.LocalObjectImpl implements Ice.ObjectFactory"; + out << nl << "private static class __F implements Ice.ObjectFactory"; out << sb; out << nl << "public Ice.Object" << nl << "create(String type)"; out << sb; @@ -4714,7 +4714,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p) { if(p->isLocal()) { - out << " extends Ice.LocalObjectImpl implements " << fixKwd(name); + out << " implements " << fixKwd(name); } else { |