summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp6
-rw-r--r--cpp/src/slice2java/Gen.cpp14
-rw-r--r--cpp/src/slice2js/Gen.cpp9
3 files changed, 15 insertions, 14 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 05c928c0e7d..ae3c04aa9b9 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -521,8 +521,8 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
string type = getAbsolute(p, "_t_");
string classType = getAbsolute(p, "_t_", "Disp");
string abs = getAbsolute(p);
- string className = isLocal ? fixIdent(p->name()) : isAbstract ? fixIdent("_" + p->name() + "Disp") : "None";
- string classAbs = getAbsolute(p, "_", "Disp");
+ string className = isLocal || isInterface ? fixIdent(p->name()) : isAbstract ? fixIdent(p->name() + "Disp") : "None";
+ string classAbs = isInterface ? getAbsolute(p) : getAbsolute(p, "", "Disp");
string valueName = (isInterface && !isLocal) ? "Ice.Value" : fixIdent(p->name());
string prxAbs = getAbsolute(p, "", "Prx");
string prxName = fixIdent(p->name() + "Prx");
@@ -902,7 +902,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassDefPtr d = *q;
if(d->isInterface() || d->allOperations().size() > 0)
{
- baseClasses.push_back(getSymbol(*q, "_", "Disp"));
+ baseClasses.push_back(getSymbol(*q, "", d->isInterface() ? "" : "Disp"));
}
}
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index c8d42d95418..4ab41ebefc0 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -167,7 +167,7 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package,
}
else
{
- abs = getAbsolute(c, package, "_", "Disp");
+ abs = getAbsolute(c, package, "", "Disp");
}
string name = op->name();
name[0] = toupper(static_cast<unsigned char>(name[0]));
@@ -1211,7 +1211,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
else
{
- out << '_' << p->name() << "Disp";
+ out << p->name() << "Disp";
}
out << " obj, final com.zeroc.IceInternal.Incoming inS, com.zeroc.Ice.Current current)";
if(!op->throws().empty() || op->hasMetaData("java:UserException") || op->hasMetaData("UserException"))
@@ -1460,7 +1460,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
else
{
- base = getAbsolute(cl, package, "_", "Disp");
+ base = getAbsolute(cl, package, "", "Disp");
}
out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);";
}
@@ -5302,7 +5302,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
}
const string name = p->name();
- const string absolute = getAbsolute(p, "", "_", "Disp");
+ const string absolute = getAbsolute(p, "", "", "Disp");
const string package = getPackage(p);
open(absolute, p->file());
@@ -5316,7 +5316,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << nl << "@Deprecated";
}
- out << nl << "public interface _" << name << "Disp";
+ out << nl << "public interface " << name << "Disp";
//
// For dispatch purposes, we can ignore a base class if it has no operations.
@@ -5343,7 +5343,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
}
if(!(*q)->isInterface())
{
- out << getAbsolute(*q, package, "_", "Disp");
+ out << getAbsolute(*q, package, "", "Disp");
}
else
{
@@ -5397,7 +5397,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- out << " implements _" << name << "Disp";
+ out << " implements " << name << "Disp";
}
}
out << sb;
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index 611f505c440..86720f41111 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -1081,10 +1081,10 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << sp;
writeDocComment(p, getDeprecateReason(p, 0, "type"));
- _out << nl << localScope << "._" << p->name() << "Disp" << " = class extends ";
+ _out << nl << localScope << "." << (p->isInterface() ? p->name() : p->name() + "Disp") << " = class extends ";
if(hasBaseClass)
{
- _out << getLocalScope(base->scope()) << "._" << base->name() << "Disp";
+ _out << getLocalScope(base->scope()) << "." << base->name() << "Disp";
}
else
{
@@ -1104,7 +1104,8 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassDefPtr base = *q;
if(base->isInterface())
{
- _out << nl << getLocalScope(base->scope()) << "._" << base->name()<< "Disp" ;
+ _out << nl << getLocalScope(base->scope()) << "." <<
+ (base->isInterface() ? base->name() : base->name() + "Disp");
if(++q != bases.end())
{
_out << ", ";
@@ -1172,7 +1173,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
_out << sp << nl << "Slice.defineOperations("
- << localScope << "._" << p->name() << "Disp, "
+ << localScope << "." << (p->isInterface() ? p->name() : p->name() + "Disp") << ", "
<< proxyType << ", "
<< "iceC_" << getLocalScope(scoped, "_") << "_ids, "
<< scopedPos;