summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-06-19 14:16:11 +0200
committerJose <jose@zeroc.com>2018-06-19 14:16:11 +0200
commit26452aaa7f31129a3c1889fee669eedda00cad75 (patch)
tree3da1350b5a3939ec5e62e30c0e2b8e1a2ce02b79
parentTestHelper pass InitializationData as const reference (diff)
downloadice-26452aaa7f31129a3c1889fee669eedda00cad75.tar.bz2
ice-26452aaa7f31129a3c1889fee669eedda00cad75.tar.xz
ice-26452aaa7f31129a3c1889fee669eedda00cad75.zip
slice2cpp generates invalid code wrt namespace qualification
Closes #104
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp94
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.h2
-rw-r--r--cpp/src/Slice/JavaUtil.cpp66
-rw-r--r--cpp/src/Slice/JavaUtil.h8
-rw-r--r--cpp/src/slice2cpp/Gen.cpp334
-rw-r--r--cpp/src/slice2cs/CsUtil.cpp78
-rw-r--r--cpp/src/slice2cs/CsUtil.h2
-rw-r--r--cpp/src/slice2cs/Gen.cpp226
-rw-r--r--cpp/src/slice2java/Gen.cpp270
-rw-r--r--cpp/src/slice2java/GenCompat.cpp304
10 files changed, 693 insertions, 691 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index f83eeb98231..8ebdd2f16b2 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -124,7 +124,7 @@ sequenceTypeToString(const SequencePtr& seq, const string& scope, const StringLi
}
else
{
- s = getAbsolute(fixKwd(seq->scoped()), scope);
+ s = getUnqualified(fixKwd(seq->scoped()), scope);
}
if(typeCtx & TypeContextAMIPrivateEnd)
@@ -145,7 +145,7 @@ sequenceTypeToString(const SequencePtr& seq, const string& scope, const StringLi
}
else
{
- return getAbsolute(fixKwd(seq->scoped()), scope);
+ return getUnqualified(fixKwd(seq->scoped()), scope);
}
}
@@ -155,7 +155,7 @@ dictionaryTypeToString(const DictionaryPtr& dict, const string& scope, const Str
const string dictType = findMetaData(metaData, typeCtx);
if(dictType.empty())
{
- return getAbsolute(fixKwd(dict->scoped()), scope);
+ return getUnqualified(fixKwd(dict->scoped()), scope);
}
else
{
@@ -610,7 +610,7 @@ Slice::isMovable(const TypePtr& type)
}
string
-Slice::getAbsolute(const std::string& type, const std::string& scope)
+Slice::getUnqualified(const std::string& type, const std::string& scope)
{
if(type.find("::") != string::npos)
{
@@ -627,7 +627,11 @@ Slice::getAbsolute(const std::string& type, const std::string& scope)
if(type.find(scope, prefix.size()) == prefix.size())
{
- return prefix + type.substr(prefix.size() + scope.size());
+ string t = type.substr(prefix.size() + scope.size());
+ if(t.find("::") == string::npos)
+ {
+ return prefix + t;
+ }
}
}
return type;
@@ -695,16 +699,16 @@ Slice::typeToString(const TypePtr& type, const string& scope, const StringList&
{
if(builtin->kind() == Builtin::KindObject && !(typeCtx & TypeContextLocal))
{
- return getAbsolute(cpp11BuiltinTable[Builtin::KindValue], scope);
+ return getUnqualified(cpp11BuiltinTable[Builtin::KindValue], scope);
}
else
{
- return getAbsolute(cpp11BuiltinTable[builtin->kind()], scope);
+ return getUnqualified(cpp11BuiltinTable[builtin->kind()], scope);
}
}
else
{
- return getAbsolute(builtinTable[builtin->kind()], scope);
+ return getUnqualified(builtinTable[builtin->kind()], scope);
}
}
@@ -715,20 +719,20 @@ Slice::typeToString(const TypePtr& type, const string& scope, const StringList&
{
if(cl->definition() && cl->definition()->isDelegate())
{
- return getAbsolute(fixKwd(cl->scoped()), scope);
+ return getUnqualified(fixKwd(cl->scoped()), scope);
}
else if(cl->isInterface() && !cl->isLocal())
{
- return getAbsolute(cpp11BuiltinTable[Builtin::KindValue], scope);
+ return getUnqualified(cpp11BuiltinTable[Builtin::KindValue], scope);
}
else
{
- return "::std::shared_ptr<" + getAbsolute(cl->scoped(), scope) + ">";
+ return "::std::shared_ptr<" + getUnqualified(cl->scoped(), scope) + ">";
}
}
else
{
- return getAbsolute(cl->scoped() + "Ptr", scope);
+ return getUnqualified(cl->scoped() + "Ptr", scope);
}
}
@@ -740,11 +744,11 @@ Slice::typeToString(const TypePtr& type, const string& scope, const StringList&
//
if(!cpp11 && findMetaData(st->getMetaData()) == "%class")
{
- return getAbsolute(fixKwd(st->scoped() + "Ptr"), scope);
+ return getUnqualified(fixKwd(st->scoped() + "Ptr"), scope);
}
else
{
- return getAbsolute(fixKwd(st->scoped()), scope);
+ return getUnqualified(fixKwd(st->scoped()), scope);
}
}
@@ -760,23 +764,23 @@ Slice::typeToString(const TypePtr& type, const string& scope, const StringList&
//
if(def && !def->isInterface() && def->allOperations().empty())
{
- return getAbsolute(cpp11BuiltinTable[Builtin::KindObjectProxy], scope);
+ return getUnqualified(cpp11BuiltinTable[Builtin::KindObjectProxy], scope);
}
else
{
- return "::std::shared_ptr<" + getAbsolute(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">";
+ return "::std::shared_ptr<" + getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">";
}
}
else
{
- return getAbsolute(fixKwd(proxy->_class()->scoped() + "Prx"), scope);
+ return getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope);
}
}
EnumPtr en = EnumPtr::dynamicCast(type);
if(en)
{
- return getAbsolute(fixKwd(en->scoped()), scope);
+ return getUnqualified(fixKwd(en->scoped()), scope);
}
SequencePtr seq = SequencePtr::dynamicCast(type);
@@ -880,16 +884,16 @@ Slice::inputTypeToString(const TypePtr& type, bool optional, const string& scope
{
if(builtin->kind() == Builtin::KindObject && !(typeCtx & TypeContextLocal))
{
- return getAbsolute(cpp11InputBuiltinTable[Builtin::KindValue], scope);
+ return getUnqualified(cpp11InputBuiltinTable[Builtin::KindValue], scope);
}
else
{
- return getAbsolute(cpp11InputBuiltinTable[builtin->kind()], scope);
+ return getUnqualified(cpp11InputBuiltinTable[builtin->kind()], scope);
}
}
else
{
- return getAbsolute(cpp98InputBuiltinTable[builtin->kind()], scope);
+ return getUnqualified(cpp98InputBuiltinTable[builtin->kind()], scope);
}
}
@@ -900,20 +904,20 @@ Slice::inputTypeToString(const TypePtr& type, bool optional, const string& scope
{
if(cl->definition() && cl->definition()->isDelegate())
{
- return getAbsolute(fixKwd(cl->scoped()), scope);
+ return getUnqualified(fixKwd(cl->scoped()), scope);
}
else if(cl->isInterface() && !cl->isLocal())
{
- return getAbsolute(cpp11InputBuiltinTable[Builtin::KindValue], scope);
+ return getUnqualified(cpp11InputBuiltinTable[Builtin::KindValue], scope);
}
else
{
- return "const ::std::shared_ptr<" + getAbsolute(fixKwd(cl->scoped()), scope) + ">&";
+ return "const ::std::shared_ptr<" + getUnqualified(fixKwd(cl->scoped()), scope) + ">&";
}
}
else
{
- return "const " + getAbsolute(fixKwd(cl->scoped() + "Ptr&"), scope);
+ return "const " + getUnqualified(fixKwd(cl->scoped() + "Ptr&"), scope);
}
}
@@ -922,17 +926,17 @@ Slice::inputTypeToString(const TypePtr& type, bool optional, const string& scope
{
if(cpp11)
{
- return "const " + getAbsolute(fixKwd(st->scoped()), scope) + "&";
+ return "const " + getUnqualified(fixKwd(st->scoped()), scope) + "&";
}
else
{
if(findMetaData(st->getMetaData()) == "%class")
{
- return "const " + getAbsolute(fixKwd(st->scoped() + "Ptr"), scope) + "&";
+ return "const " + getUnqualified(fixKwd(st->scoped() + "Ptr"), scope) + "&";
}
else
{
- return "const " + getAbsolute(fixKwd(st->scoped()), scope) + "&";
+ return "const " + getUnqualified(fixKwd(st->scoped()), scope) + "&";
}
}
}
@@ -945,23 +949,23 @@ Slice::inputTypeToString(const TypePtr& type, bool optional, const string& scope
ClassDefPtr def = proxy->_class()->definition();
if(def && !def->isInterface() && def->allOperations().empty())
{
- return getAbsolute(cpp11InputBuiltinTable[Builtin::KindObjectProxy], scope);
+ return getUnqualified(cpp11InputBuiltinTable[Builtin::KindObjectProxy], scope);
}
else
{
- return "const ::std::shared_ptr<" + getAbsolute(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">&";
+ return "const ::std::shared_ptr<" + getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">&";
}
}
else
{
- return "const " + getAbsolute(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + "&";
+ return "const " + getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + "&";
}
}
EnumPtr en = EnumPtr::dynamicCast(type);
if(en)
{
- return getAbsolute(fixKwd(en->scoped()), scope);
+ return getUnqualified(fixKwd(en->scoped()), scope);
}
SequencePtr seq = SequencePtr::dynamicCast(type);
@@ -1033,16 +1037,16 @@ Slice::outputTypeToString(const TypePtr& type, bool optional, const string& scop
{
if(builtin->kind() == Builtin::KindObject && !(typeCtx & TypeContextLocal))
{
- return getAbsolute(cpp11OutputBuiltinTable[Builtin::KindValue], scope);
+ return getUnqualified(cpp11OutputBuiltinTable[Builtin::KindValue], scope);
}
else
{
- return getAbsolute(cpp11OutputBuiltinTable[builtin->kind()], scope);
+ return getUnqualified(cpp11OutputBuiltinTable[builtin->kind()], scope);
}
}
else
{
- return getAbsolute(outputBuiltinTable[builtin->kind()], scope);
+ return getUnqualified(outputBuiltinTable[builtin->kind()], scope);
}
}
@@ -1053,20 +1057,20 @@ Slice::outputTypeToString(const TypePtr& type, bool optional, const string& scop
{
if(cl->definition() && cl->definition()->isDelegate())
{
- return getAbsolute(fixKwd(cl->scoped()), scope) + "&";
+ return getUnqualified(fixKwd(cl->scoped()), scope) + "&";
}
else if(cl->isInterface() && !cl->isLocal())
{
- return getAbsolute(cpp11OutputBuiltinTable[Builtin::KindValue], scope);
+ return getUnqualified(cpp11OutputBuiltinTable[Builtin::KindValue], scope);
}
else
{
- return "::std::shared_ptr<" + getAbsolute(fixKwd(cl->scoped()), scope) + ">&";
+ return "::std::shared_ptr<" + getUnqualified(fixKwd(cl->scoped()), scope) + ">&";
}
}
else
{
- return getAbsolute(fixKwd(cl->scoped() + "Ptr&"), scope);
+ return getUnqualified(fixKwd(cl->scoped() + "Ptr&"), scope);
}
}
@@ -1075,11 +1079,11 @@ Slice::outputTypeToString(const TypePtr& type, bool optional, const string& scop
{
if(!cpp11 && findMetaData(st->getMetaData()) == "%class")
{
- return getAbsolute(fixKwd(st->scoped() + "Ptr&"), scope);
+ return getUnqualified(fixKwd(st->scoped() + "Ptr&"), scope);
}
else
{
- return getAbsolute(fixKwd(st->scoped()), scope) + "&";
+ return getUnqualified(fixKwd(st->scoped()), scope) + "&";
}
}
@@ -1095,23 +1099,23 @@ Slice::outputTypeToString(const TypePtr& type, bool optional, const string& scop
//
if(def && !def->isInterface() && def->allOperations().empty())
{
- return getAbsolute(cpp11OutputBuiltinTable[Builtin::KindObjectProxy], scope);
+ return getUnqualified(cpp11OutputBuiltinTable[Builtin::KindObjectProxy], scope);
}
else
{
- return "::std::shared_ptr<" + getAbsolute(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">&";
+ return "::std::shared_ptr<" + getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">&";
}
}
else
{
- return getAbsolute(fixKwd(proxy->_class()->scoped() + "Prx&"), scope);
+ return getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx&"), scope);
}
}
EnumPtr en = EnumPtr::dynamicCast(type);
if(en)
{
- return getAbsolute(fixKwd(en->scoped()), scope) + "&";
+ return getUnqualified(fixKwd(en->scoped()), scope) + "&";
}
SequencePtr seq = SequencePtr::dynamicCast(type);
diff --git a/cpp/src/Slice/CPlusPlusUtil.h b/cpp/src/Slice/CPlusPlusUtil.h
index 875b66c903a..4da65056fb9 100644
--- a/cpp/src/Slice/CPlusPlusUtil.h
+++ b/cpp/src/Slice/CPlusPlusUtil.h
@@ -37,7 +37,7 @@ const int TypeContextCpp11 = 64;
bool isMovable(const TypePtr&);
-std::string getAbsolute(const std::string&, const std::string&);
+std::string getUnqualified(const std::string&, const std::string&);
std::string typeToString(const TypePtr&, const std::string& = "", const StringList& = StringList(), int = 0);
std::string typeToString(const TypePtr&, bool, const std::string& = "", const StringList& = StringList(), int = 0);
std::string returnTypeToString(const TypePtr&, bool, const std::string& = "", const StringList& = StringList(), int = 0);
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index 584feda3674..dce07e4689b 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -1009,7 +1009,7 @@ Slice::JavaCompatGenerator::getPackage(const ContainedPtr& cont) const
}
string
-Slice::JavaCompatGenerator::getAbsolute(const std::string& type, const std::string& package) const
+Slice::JavaCompatGenerator::getUnqualified(const std::string& type, const std::string& package) const
{
if(type.find(".") != string::npos && type.find(package) == 0 && type.find(".", package.size() + 1) == string::npos)
{
@@ -1019,7 +1019,7 @@ Slice::JavaCompatGenerator::getAbsolute(const std::string& type, const std::stri
}
string
-Slice::JavaCompatGenerator::getAbsolute(const ContainedPtr& cont,
+Slice::JavaCompatGenerator::getUnqualified(const ContainedPtr& cont,
const string& package,
const string& prefix,
const string& suffix) const
@@ -1058,11 +1058,11 @@ Slice::JavaCompatGenerator::getStaticId(const TypePtr& type, const string& packa
}
else if(cl->isInterface())
{
- return getAbsolute(cl, package, "_", "Disp") + ".ice_staticId()";
+ return getUnqualified(cl, package, "_", "Disp") + ".ice_staticId()";
}
else
{
- return getAbsolute(cl, package) + ".ice_staticId()";
+ return getUnqualified(cl, package) + ".ice_staticId()";
}
}
@@ -1291,13 +1291,13 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
if(cl)
{
- return getAbsolute(cl, package, "", mode == TypeModeOut ? "Holder" : "");
+ return getUnqualified(cl, package, "", mode == TypeModeOut ? "Holder" : "");
}
ProxyPtr proxy = ProxyPtr::dynamicCast(type);
if(proxy)
{
- return getAbsolute(proxy->_class(), package, "", mode == TypeModeOut ? "PrxHolder" : "Prx");
+ return getUnqualified(proxy->_class(), package, "", mode == TypeModeOut ? "PrxHolder" : "Prx");
}
DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
@@ -1315,7 +1315,7 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
getDictionaryTypes(dict, "", StringList(), origInstanceType, origFormalType);
if(formalType == origFormalType && instanceType == origInstanceType)
{
- return getAbsolute(dict, package, "", "Holder");
+ return getUnqualified(dict, package, "", "Holder");
}
//
@@ -1350,7 +1350,7 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
getSequenceTypes(seq, "", StringList(), origInstanceType, origFormalType);
if(formalType == origFormalType && instanceType == origInstanceType)
{
- return getAbsolute(seq, package, "", "Holder");
+ return getUnqualified(seq, package, "", "Holder");
}
}
@@ -1374,11 +1374,11 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
{
if(mode == TypeModeOut)
{
- return getAbsolute(contained, package, "", "Holder");
+ return getUnqualified(contained, package, "", "Holder");
}
else
{
- return getAbsolute(contained, package);
+ return getUnqualified(contained, package);
}
}
@@ -2350,7 +2350,7 @@ Slice::JavaCompatGenerator::writeMarshalUnmarshalCode(Output& out,
ConstructedPtr constructed = ConstructedPtr::dynamicCast(type);
assert(constructed);
- string typeS = getAbsolute(constructed, package, "", "Helper");
+ string typeS = getUnqualified(constructed, package, "", "Helper");
if(marshal)
{
out << nl << typeS << ".write(" << stream << ", " << v << ");";
@@ -2410,7 +2410,7 @@ Slice::JavaCompatGenerator::writeDictionaryMarshalUnmarshalCode(Output& out,
//
if(useHelper)
{
- string typeS = getAbsolute(dict, package, "", "Helper");
+ string typeS = getUnqualified(dict, package, "", "Helper");
if(marshal)
{
out << nl << typeS << ".write(" << stream << ", " << v << ");";
@@ -2718,7 +2718,7 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
//
if(useHelper)
{
- string typeS = getAbsolute(seq, package, "", "Helper");
+ string typeS = getUnqualified(seq, package, "", "Helper");
if(marshal)
{
out << nl << typeS << ".write(" << stream << ", " << v << ");";
@@ -2759,7 +2759,7 @@ Slice::JavaCompatGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
// Marshal/unmarshal a custom sequence type.
//
BuiltinPtr b = BuiltinPtr::dynamicCast(type);
- string typeS = getAbsolute(seq, package);
+ string typeS = getUnqualified(seq, package);
ostringstream o;
o << origContentS;
int d = depth;
@@ -3489,7 +3489,7 @@ Slice::JavaGenerator::getPackage(const ContainedPtr& cont) const
}
string
-Slice::JavaGenerator::getAbsolute(const std::string& type, const std::string& package) const
+Slice::JavaGenerator::getUnqualified(const std::string& type, const std::string& package) const
{
if(type.find(".") != string::npos && type.find(package) == 0 && type.find(".", package.size() + 1) == string::npos)
{
@@ -3499,7 +3499,7 @@ Slice::JavaGenerator::getAbsolute(const std::string& type, const std::string& pa
}
string
-Slice::JavaGenerator::getAbsolute(const ContainedPtr& cont,
+Slice::JavaGenerator::getUnqualified(const ContainedPtr& cont,
const string& package,
const string& prefix,
const string& suffix) const
@@ -3534,15 +3534,15 @@ Slice::JavaGenerator::getStaticId(const TypePtr& type, const string& package) co
if(b && b->kind() == Builtin::KindObject)
{
- return getAbsolute("com.zeroc.Ice.Object", package) + ".ice_staticId()";
+ return getUnqualified("com.zeroc.Ice.Object", package) + ".ice_staticId()";
}
else if(b && b->kind() == Builtin::KindValue)
{
- return getAbsolute("com.zeroc.Ice.Value", package) + ".ice_staticId()";
+ return getUnqualified("com.zeroc.Ice.Value", package) + ".ice_staticId()";
}
else
{
- return getAbsolute(cl, package) + ".ice_staticId()";
+ return getUnqualified(cl, package) + ".ice_staticId()";
}
}
@@ -3726,7 +3726,7 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
case Builtin::KindFloat:
case Builtin::KindDouble:
{
- return getAbsolute(builtinOptionalTable[builtin->kind()], package);
+ return getUnqualified(builtinOptionalTable[builtin->kind()], package);
}
case Builtin::KindString:
case Builtin::KindObject:
@@ -3742,11 +3742,11 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
{
if(!local && builtin->kind() == Builtin::KindObject)
{
- return getAbsolute(builtinTable[Builtin::KindValue], package);
+ return getUnqualified(builtinTable[Builtin::KindValue], package);
}
else
{
- return getAbsolute(builtinTable[builtin->kind()], package);
+ return getUnqualified(builtinTable[builtin->kind()], package);
}
}
}
@@ -3762,11 +3762,11 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
{
if(cl->isInterface() && !local)
{
- return getAbsolute("com.zeroc.Ice.Value", package);
+ return getUnqualified("com.zeroc.Ice.Value", package);
}
else
{
- return getAbsolute(cl, package);
+ return getUnqualified(cl, package);
}
}
@@ -3777,11 +3777,11 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
assert(def);
if(def->isAbstract())
{
- return getAbsolute(proxy->_class(), package, "", "Prx");
+ return getUnqualified(proxy->_class(), package, "", "Prx");
}
else
{
- return getAbsolute("com.zeroc.Ice.ObjectPrx", package);
+ return getUnqualified("com.zeroc.Ice.ObjectPrx", package);
}
}
@@ -3806,11 +3806,11 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
{
if(mode == TypeModeOut)
{
- return getAbsolute(contained, package, "", "Holder");
+ return getUnqualified(contained, package, "", "Holder");
}
else
{
- return getAbsolute(contained, package);
+ return getUnqualified(contained, package);
}
}
@@ -4087,7 +4087,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out,
//
// If we can use the helper, it's easy.
//
- string helper = getAbsolute(dict, package, "", "Helper");
+ string helper = getUnqualified(dict, package, "", "Helper");
if(marshal)
{
out << nl << helper << ".write" << spar << stream << tag << param << epar << ";";
@@ -4221,7 +4221,7 @@ Slice::JavaGenerator::writeMarshalUnmarshalCode(Output& out,
getSequenceTypes(seq, "", StringList(), origInstanceType, origFormalType, false);
if(formalType == origFormalType && (marshal || instanceType == origInstanceType))
{
- string helper = getAbsolute(seq, package, "", "Helper");
+ string helper = getUnqualified(seq, package, "", "Helper");
if(marshal)
{
out << nl << helper << ".write" << spar << stream << tag << param << epar << ";";
@@ -4401,7 +4401,7 @@ Slice::JavaGenerator::writeDictionaryMarshalUnmarshalCode(Output& out,
//
// If we can use the helper, it's easy.
//
- string helper = getAbsolute(dict, package, "", "Helper");
+ string helper = getUnqualified(dict, package, "", "Helper");
if(marshal)
{
out << nl << helper << ".write" << spar << stream << v << epar << ";";
@@ -4630,7 +4630,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
//
// If we can use the helper, it's easy.
//
- string helper = getAbsolute(seq, package, "", "Helper");
+ string helper = getUnqualified(seq, package, "", "Helper");
if(marshal)
{
out << nl << helper << ".write" << spar << stream << v << epar << ";";
@@ -4671,7 +4671,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
// Marshal/unmarshal a custom sequence type.
//
BuiltinPtr b = BuiltinPtr::dynamicCast(type);
- string typeS = getAbsolute(seq, package);
+ string typeS = getUnqualified(seq, package);
ostringstream o;
o << origContentS;
int d = depth;
diff --git a/cpp/src/Slice/JavaUtil.h b/cpp/src/Slice/JavaUtil.h
index 9cb32861a48..b55feaabbaa 100644
--- a/cpp/src/Slice/JavaUtil.h
+++ b/cpp/src/Slice/JavaUtil.h
@@ -107,13 +107,13 @@ protected:
//
std::string getPackage(const ContainedPtr&) const;
- std::string getAbsolute(const std::string&, const std::string&) const;
+ std::string getUnqualified(const std::string&, const std::string&) const;
//
// Returns the Java name for a Contained entity. If the optional
// package argument matches the entity's package name, then the
// package is removed from the result.
//
- std::string getAbsolute(const ContainedPtr&,
+ std::string getUnqualified(const ContainedPtr&,
const std::string& = std::string(),
const std::string& = std::string(),
const std::string& = std::string()) const;
@@ -277,14 +277,14 @@ protected:
// Returns the Java type without a package if the package
// matches the current package
//
- std::string getAbsolute(const std::string&, const std::string&) const;
+ std::string getUnqualified(const std::string&, const std::string&) const;
//
// Returns the Java name for a Contained entity. If the optional
// package argument matches the entity's package name, then the
// package is removed from the result.
//
- std::string getAbsolute(const ContainedPtr&,
+ std::string getUnqualified(const ContainedPtr&,
const std::string& = std::string(),
const std::string& = std::string(),
const std::string& = std::string()) const;
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 4bdfc7cb498..874d37db47f 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -103,7 +103,7 @@ writeConstantValue(IceUtilInternal::Output& out, const TypePtr& type, const Synt
ConstPtr constant = ConstPtr::dynamicCast(valueType);
if(constant)
{
- out << getAbsolute(fixKwd(constant->scoped()), scope);
+ out << getUnqualified(fixKwd(constant->scoped()), scope);
}
else
{
@@ -156,17 +156,17 @@ writeConstantValue(IceUtilInternal::Output& out, const TypePtr& type, const Synt
if(unscoped)
{
- out << getAbsolute(fixKwd(ep->scope() + enumerator->name()), scope);
+ out << getUnqualified(fixKwd(ep->scope() + enumerator->name()), scope);
}
else
{
if(cpp11)
{
- out << getAbsolute(fixKwd(enumerator->scoped()), scope);
+ out << getUnqualified(fixKwd(enumerator->scoped()), scope);
}
else
{
- out << getAbsolute(fixKwd(ep->scope() + ep->name() + enumerator->name()), scope);
+ out << getUnqualified(fixKwd(ep->scope() + ep->name() + enumerator->name()), scope);
}
}
}
@@ -242,7 +242,7 @@ writeInParamsLambda(IceUtilInternal::Output& C, const OperationPtr& p, const Par
}
else
{
- C << "[&](" << getAbsolute("::Ice::OutputStream*", scope) << " ostr)";
+ C << "[&](" << getUnqualified("::Ice::OutputStream*", scope) << " ostr)";
C << sb;
writeMarshalCode(C, inParams, 0, true, TypeContextInParam | TypeContextCpp11);
if(p->sendsClasses(false))
@@ -273,7 +273,7 @@ throwUserExceptionLambda(IceUtilInternal::Output& C, ExceptionList throws, const
//
throws.sort(Slice::DerivedToBaseCompare());
- C << "[](const " << getAbsolute("::Ice::UserException&", scope) << " ex)";
+ C << "[](const " << getUnqualified("::Ice::UserException&", scope) << " ex)";
C << sb;
C << nl << "try";
C << sb;
@@ -285,12 +285,12 @@ throwUserExceptionLambda(IceUtilInternal::Output& C, ExceptionList throws, const
for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
{
string scoped = (*i)->scoped();
- C << nl << "catch(const " << getAbsolute(fixKwd((*i)->scoped()), scope) << "&)";
+ C << nl << "catch(const " << getUnqualified(fixKwd((*i)->scoped()), scope) << "&)";
C << sb;
C << nl << "throw;";
C << eb;
}
- C << nl << "catch(const " << getAbsolute("::Ice::UserException&", scope) << ")";
+ C << nl << "catch(const " << getUnqualified("::Ice::UserException&", scope) << ")";
C << sb;
C << eb;
C << eb;
@@ -1299,11 +1299,11 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
H << "public ";
if(base)
{
- H << getAbsolute(fixKwd(base->scoped()), scope);
+ H << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- H << getAbsolute(p->isLocal() ? "::Ice::LocalException" : "::Ice::UserException", scope);
+ H << getUnqualified(p->isLocal() ? "::Ice::LocalException" : "::Ice::UserException", scope);
}
H.restoreIndent();
H << sb;
@@ -1581,11 +1581,11 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
H << sp;
H << nl << "/// \\cond STREAM";
- H << nl << "virtual void _writeImpl(" << getAbsolute("::Ice::OutputStream*", scope) << ") const;";
- H << nl << "virtual void _readImpl(" << getAbsolute("::Ice::InputStream*", scope) << ");";
+ H << nl << "virtual void _writeImpl(" << getUnqualified("::Ice::OutputStream*", scope) << ") const;";
+ H << nl << "virtual void _readImpl(" << getUnqualified("::Ice::InputStream*", scope) << ");";
H << nl << "/// \\endcond";
- string baseName = getAbsolute(base ? fixKwd(base->scoped()) : "::Ice::UserException", scope);
+ string baseName = getUnqualified(base ? fixKwd(base->scoped()) : "::Ice::UserException", scope);
if(preserved && !basePreserved)
{
@@ -1601,7 +1601,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
C << eb;
C << sp << nl << "void" << nl << scoped.substr(2) << "::_write("
- << getAbsolute("::Ice::OutputStream*", scope) << " ostr) const";
+ << getUnqualified("::Ice::OutputStream*", scope) << " ostr) const";
C << sb;
C << nl << "ostr->startException(_slicedData);";
C << nl << "_writeImpl(ostr);";
@@ -1609,7 +1609,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
C << eb;
C << sp << nl << "void" << nl << scoped.substr(2) << "::_read("
- << getAbsolute("::Ice::InputStream*", scope) << " istr)";
+ << getUnqualified("::Ice::InputStream*", scope) << " istr)";
C << sb;
C << nl << "istr->startException();";
C << nl << "_readImpl(istr);";
@@ -1620,11 +1620,11 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
C << sp;
C << nl << "/// \\cond STREAM";
C << nl << "void" << nl << scoped.substr(2) << "::_writeImpl("
- << getAbsolute("::Ice::OutputStream*", scope) << " ostr) const";
+ << getUnqualified("::Ice::OutputStream*", scope) << " ostr) const";
C << sb;
C << nl << "ostr->startSlice(\"" << p->scoped() << "\", -1, " << (!base ? "true" : "false") << ");";
- C << nl << getAbsolute("::Ice::StreamWriter", scope) << "< " << name << ", "
- << getAbsolute("::Ice::OutputStream", scope) << ">::write(ostr, *this);";
+ C << nl << getUnqualified("::Ice::StreamWriter", scope) << "< " << name << ", "
+ << getUnqualified("::Ice::OutputStream", scope) << ">::write(ostr, *this);";
C << nl << "ostr->endSlice();";
if(base)
{
@@ -1633,11 +1633,11 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
C << eb;
C << sp << nl << "void" << nl << scoped.substr(2) << "::_readImpl("
- << getAbsolute("::Ice::InputStream*", scope) << " istr)";
+ << getUnqualified("::Ice::InputStream*", scope) << " istr)";
C << sb;
C << nl << "istr->startSlice();";
- C << nl << getAbsolute("::Ice::StreamReader", scope) << "< " << name << ", "
- << getAbsolute("::Ice::InputStream", scope) << ">::read(istr, *this);";
+ C << nl << getUnqualified("::Ice::StreamReader", scope) << "< " << name << ", "
+ << getUnqualified("::Ice::InputStream", scope) << ">::read(istr, *this);";
C << nl << "istr->endSlice();";
if(base)
{
@@ -1896,7 +1896,7 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
string name = fixKwd(p->name());
TypePtr type = p->type();
ContainedPtr cont = ContainedPtr::dynamicCast(p->container());
- string scope = fixKwd(cont->scope());
+ string scope = fixKwd(p->scope());
string s = typeToString(type, scope, p->typeMetaData(), _useWstring);
StringList metaData = p->getMetaData();
@@ -1920,7 +1920,7 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
{
string name = fixKwd(p->name());
ContainedPtr cont = ContainedPtr::dynamicCast(p->container());
- string scope = fixKwd(cont->scope());
+ string scope = fixKwd(p->scope());
string dictType = findMetaData(p->getMetaData());
H << sp;
@@ -2010,11 +2010,11 @@ Slice::Gen::TypesVisitor::emitUpcall(const ExceptionPtr& base, const string& cal
C << nl;
if(base)
{
- C << getAbsolute(fixKwd(base->scoped()), scope);
+ C << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- C << getAbsolute(isLocal ? "::Ice::LocalException" : "::Ice::UserException", scope);
+ C << getUnqualified(isLocal ? "::Ice::LocalException" : "::Ice::UserException", scope);
}
C << call;
}
@@ -2073,7 +2073,6 @@ Slice::Gen::ProxyDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
}
string name = fixKwd(p->name());
- string scoped = fixKwd(p->scoped());
H << sp << nl << "class " << name << ';';
//
@@ -2082,9 +2081,8 @@ Slice::Gen::ProxyDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
// Note that _readProxy is always in the IceProxy::... namespace
//
H << nl << "/// \\cond INTERNAL";
- H << nl << _dllExport << "void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< ::IceProxy"
- << scoped << ">&);";
- H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(::IceProxy" << scoped << "*);";
+ H << nl << _dllExport << "void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< " << name << ">&);";
+ H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(" << name << "*);";
H << nl << "/// \\endcond";
}
@@ -2790,7 +2788,7 @@ Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
// depends on this name
//
H << nl << "/// \\cond INTERNAL";
- H << nl << _dllExport << getAbsolute("::Ice::Object*", scope) << " upCast(" << name << "*);";
+ H << nl << _dllExport << getUnqualified("::Ice::Object*", scope) << " upCast(" << name << "*);";
H << nl << "/// \\endcond";
H << nl << "typedef ::IceInternal::Handle< " << name << "> " << p->name() << "Ptr;";
H << nl << "typedef ::IceInternal::ProxyHandle< ::IceProxy" << scoped << "> " << p->name() << "Prx;";
@@ -2802,14 +2800,14 @@ Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
//
H << nl << "/// \\cond INTERNAL";
H << nl << _dllExport << "void _icePatchObjectPtr(" << p->name() << "Ptr&, const "
- << getAbsolute("::Ice::ObjectPtr&", scope) << ");";
+ << getUnqualified("::Ice::ObjectPtr&", scope) << ");";
H << nl << "/// \\endcond";
}
else
{
H << nl << "/// \\cond INTERNAL";
- H << nl << _dllExport << getAbsolute("::Ice::LocalObject*", scope) << " upCast("
- << getAbsolute(scoped, scope) << "*);";
+ H << nl << _dllExport << getUnqualified("::Ice::LocalObject*", scope) << " upCast("
+ << getUnqualified(scoped, scope) << "*);";
H << nl << "/// \\endcond";
H << nl << "typedef ::IceInternal::Handle< " << name << "> " << p->name() << "Ptr;";
}
@@ -2882,7 +2880,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
H.useCurrentPosAsIndent();
if(bases.empty())
{
- H << "public virtual " << getAbsolute(p->isLocal() ? "::Ice::LocalObject" : "::Ice::Object", scope);
+ H << "public virtual " << getUnqualified(p->isLocal() ? "::Ice::LocalObject" : "::Ice::Object", scope);
}
else
{
@@ -2895,7 +2893,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
H << "virtual ";
}
- H << "public " << getAbsolute(fixKwd((*q)->scoped()), scope);
+ H << "public " << getUnqualified(fixKwd((*q)->scoped()), scope);
if(++q != bases.end())
{
H << ',' << nl;
@@ -2995,7 +2993,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << " * Polymporphically clones this object.";
H << nl << " * @return A shallow copy of this object.";
H << nl << " */";
- H << nl << "virtual " << getAbsolute("::Ice::ObjectPtr", scope) << " ice_clone() const;";
+ H << nl << "virtual " << getUnqualified("::Ice::ObjectPtr", scope) << " ice_clone() const;";
if(hasGCObjectBaseClass)
{
@@ -3012,7 +3010,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sb;
if(!p->isAbstract())
{
- C << nl << getAbsolute("::Ice::Object*", scope) << " p = new " << name << "(*this);";
+ C << nl << getUnqualified("::Ice::Object*", scope) << " p = new " << name << "(*this);";
C << nl << "return p;";
}
else
@@ -3020,7 +3018,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
//
// We need this ice_clone for abstract classes derived from concrete classes
//
- C << nl << "throw " << getAbsolute("::Ice::CloneNotImplementedException", scope)
+ C << nl << "throw " << getUnqualified("::Ice::CloneNotImplementedException", scope)
<< "(__FILE__, __LINE__);";
}
C << eb;
@@ -3055,24 +3053,24 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << " * @param current The Current object for the invocation.";
H << nl << " * @return True if this object supports the interface, false, otherwise.";
H << nl << " */";
- H << nl << "virtual bool ice_isA(const ::std::string& id, const " << getAbsolute("::Ice::Current&", scope)
- << " current = " << getAbsolute("::Ice::emptyCurrent", scope) << ") const;";
+ H << nl << "virtual bool ice_isA(const ::std::string& id, const " << getUnqualified("::Ice::Current&", scope)
+ << " current = " << getUnqualified("::Ice::emptyCurrent", scope) << ") const;";
H << sp;
H << nl << "/**";
H << nl << " * Obtains a list of the Slice type IDs representing the interfaces supported by this object.";
H << nl << " * @param current The Current object for the invocation.";
H << nl << " * @return A list of fully-scoped type IDs.";
H << nl << " */";
- H << nl << "virtual ::std::vector< ::std::string> ice_ids(const " << getAbsolute("::Ice::Current&", scope)
- << " current = " << getAbsolute("::Ice::emptyCurrent", scope) << ") const;";
+ H << nl << "virtual ::std::vector< ::std::string> ice_ids(const " << getUnqualified("::Ice::Current&", scope)
+ << " current = " << getUnqualified("::Ice::emptyCurrent", scope) << ") const;";
H << sp;
H << nl << "/**";
H << nl << " * Obtains a Slice type ID representing the most-derived interface supported by this object.";
H << nl << " * @param current The Current object for the invocation.";
H << nl << " * @return A fully-scoped type ID.";
H << nl << " */";
- H << nl << "virtual const ::std::string& ice_id(const " << getAbsolute("::Ice::Current&", scope)
- << " current = " << getAbsolute("::Ice::emptyCurrent", scope) << ") const;";
+ H << nl << "virtual const ::std::string& ice_id(const " << getUnqualified("::Ice::Current&", scope)
+ << " current = " << getUnqualified("::Ice::emptyCurrent", scope) << ") const;";
H << sp;
H << nl << "/**";
H << nl << " * Obtains the Slice type ID corresponding to this class.";
@@ -3100,14 +3098,14 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sp;
C << nl << "bool" << nl << scoped.substr(2)
- << "::ice_isA(const ::std::string& s, const " << getAbsolute("::Ice::Current&", scope) << ") const";
+ << "::ice_isA(const ::std::string& s, const " << getUnqualified("::Ice::Current&", scope) << ") const";
C << sb;
C << nl << "return ::std::binary_search(" << flatName << ", " << flatName << " + " << ids.size() << ", s);";
C << eb;
C << sp;
C << nl << "::std::vector< ::std::string>" << nl << scoped.substr(2)
- << "::ice_ids(const " << getAbsolute("::Ice::Current&", scope) << ") const";
+ << "::ice_ids(const " << getUnqualified("::Ice::Current&", scope) << ") const";
C << sb;
C << nl << "return ::std::vector< ::std::string>(&" << flatName << "[0], &" << flatName
<< '[' << ids.size() << "]);";
@@ -3115,7 +3113,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sp;
C << nl << "const ::std::string&" << nl << scoped.substr(2)
- << "::ice_id(const " << getAbsolute("::Ice::Current&", scope) << ") const";
+ << "::ice_id(const " << getUnqualified("::Ice::Current&", scope) << ") const";
C << sb;
C << nl << "return ice_staticId();";
C << eb;
@@ -3145,7 +3143,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << nl << "/// \\cond INTERNAL";
C << nl
<< _dllExport
- << "::Ice::LocalObject* " << scope.substr(2) << "upCast(" << getAbsolute(scoped, scope)
+ << "::Ice::LocalObject* " << scope.substr(2) << "upCast(" << getUnqualified(scoped, scope)
<< "* p) { return p; }";
C << nl << "/// \\endcond";
}
@@ -3189,7 +3187,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp;
H << nl << "/// \\cond INTERNAL";
H << nl << "virtual bool _iceDispatch(::IceInternal::Incoming&, const "
- << getAbsolute("::Ice::Current&", scope) << ");";
+ << getUnqualified("::Ice::Current&", scope) << ");";
H << nl << "/// \\endcond";
string flatName = "iceC" + p->flattenedScope() + p->name() + "_all";
@@ -3212,7 +3210,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "/// \\cond INTERNAL";
C << nl << "bool";
C << nl << scoped.substr(2) << "::_iceDispatch(::IceInternal::Incoming& in, const "
- << getAbsolute("::Ice::Current&", scope) << " current)";
+ << getUnqualified("::Ice::Current&", scope) << " current)";
C << sb;
C << nl << "::std::pair<const ::std::string*, const ::std::string*> r = "
@@ -3220,7 +3218,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
<< ", current.operation);";
C << nl << "if(r.first == r.second)";
C << sb;
- C << nl << "throw " << getAbsolute("::Ice::OperationNotExistException", scope)
+ C << nl << "throw " << getUnqualified("::Ice::OperationNotExistException", scope)
<< "(__FILE__, __LINE__, current.id, " << "current.facet, current.operation);";
C << eb;
C << sp;
@@ -3237,7 +3235,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "default:";
C << sb;
C << nl << "assert(false);";
- C << nl << "throw " << getAbsolute("::Ice::OperationNotExistException", scope)
+ C << nl << "throw " << getUnqualified("::Ice::OperationNotExistException", scope)
<< "(__FILE__, __LINE__, current.id, " << "current.facet, current.operation);";
C << eb;
C << eb;
@@ -3261,7 +3259,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
H << sp;
H << nl << "/// \\cond INTERNAL";
- H << nl << "virtual " << getAbsolute("::Ice::Int", scope)
+ H << nl << "virtual " << getUnqualified("::Ice::Int", scope)
<< " ice_operationAttributes(const ::std::string&) const;";
H << nl << "/// \\endcond";
@@ -3319,7 +3317,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl << " * Obtains a value factory that instantiates this class.";
H << nl << " * @return The value factory.";
H << nl << " */";
- H << nl << "static " << getAbsolute("::Ice::ValueFactoryPtr", scope) << " ice_factory();";
+ H << nl << "static " << getUnqualified("::Ice::ValueFactoryPtr", scope) << " ice_factory();";
}
if(preserved && !basePreserved)
@@ -3331,12 +3329,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl << " * @return The SlicedData object, or nil if the class was not sliced or was not";
H << nl << " * marshaled in the sliced format.";
H << nl << " */";
- H << nl << "virtual " << getAbsolute("::Ice::SlicedDataPtr", scope) << " ice_getSlicedData() const;";
+ H << nl << "virtual " << getUnqualified("::Ice::SlicedDataPtr", scope) << " ice_getSlicedData() const;";
H << sp;
H << nl << "/// \\cond STREAM";
- H << nl << "virtual void _iceWrite(" << getAbsolute("::Ice::OutputStream*", scope) << ") const;";
- H << nl << "virtual void _iceRead(" << getAbsolute("::Ice::InputStream*", scope) << ");";
+ H << nl << "virtual void _iceWrite(" << getUnqualified("::Ice::OutputStream*", scope) << ") const;";
+ H << nl << "virtual void _iceRead(" << getUnqualified("::Ice::InputStream*", scope) << ");";
H << nl << "/// \\endcond";
}
@@ -3347,8 +3345,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp;
H << nl << "/// \\cond STREAM";
- H << nl << "virtual void _iceWriteImpl(" << getAbsolute("::Ice::OutputStream*", scope) << ") const;";
- H << nl << "virtual void _iceReadImpl(" << getAbsolute("::Ice::InputStream*", scope) << ");";
+ H << nl << "virtual void _iceWriteImpl(" << getUnqualified("::Ice::OutputStream*", scope) << ") const;";
+ H << nl << "virtual void _iceReadImpl(" << getUnqualified("::Ice::InputStream*", scope) << ");";
H << nl << "/// \\endcond";
if(preserved && !basePreserved)
@@ -3360,7 +3358,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(" << getAbsolute("::Ice::OutputStream*", scope)
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(" << getUnqualified("::Ice::OutputStream*", scope)
<< "ostr) const";
C << sb;
C << nl << "ostr->startValue(_iceSlicedData);";
@@ -3369,7 +3367,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::_iceRead(" << getAbsolute("::Ice::InputStream*", scope)
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceRead(" << getUnqualified("::Ice::InputStream*", scope)
<< " istr)";
C << sb;
C << nl << "istr->startValue();";
@@ -3380,12 +3378,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << sp;
C << nl << "/// \\cond STREAM";
- C << nl << "void" << nl << scoped.substr(2) << "::_iceWriteImpl(" << getAbsolute("::Ice::OutputStream*", scope)
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceWriteImpl(" << getUnqualified("::Ice::OutputStream*", scope)
<< " ostr) const";
C << sb;
C << nl << "ostr->startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
- C << nl << getAbsolute("::Ice::StreamWriter", scope) << "< " << name << ", "
- << getAbsolute("::Ice::OutputStream", scope) << ">::write(ostr, *this);";
+ C << nl << getUnqualified("::Ice::StreamWriter", scope) << "< " << name << ", "
+ << getUnqualified("::Ice::OutputStream", scope) << ">::write(ostr, *this);";
C << nl << "ostr->endSlice();";
if(base)
{
@@ -3394,12 +3392,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::_iceReadImpl(" << getAbsolute("::Ice::InputStream*", scope)
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceReadImpl(" << getUnqualified("::Ice::InputStream*", scope)
<< " istr)";
C << sb;
C << nl << "istr->startSlice();";
- C << nl << getAbsolute("::Ice::StreamReader", scope) << "< " << name << ", "
- << getAbsolute("::Ice::InputStream", scope) << ">::read(istr, *this);";
+ C << nl << getUnqualified("::Ice::StreamReader", scope) << "< " << name << ", "
+ << getUnqualified("::Ice::InputStream", scope) << ">::read(istr, *this);";
C << nl << "istr->endSlice();";
if(base)
{
@@ -3533,15 +3531,15 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl << "inline bool operator==(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name())
<< "& rhs)";
H << sb;
- H << nl << "return static_cast<const " << getAbsolute("::Ice::LocalObject&", scope)
- << ">(lhs) == static_cast<const " << getAbsolute("::Ice::LocalObject&", scope) << ">(rhs);";
+ H << nl << "return static_cast<const " << getUnqualified("::Ice::LocalObject&", scope)
+ << ">(lhs) == static_cast<const " << getUnqualified("::Ice::LocalObject&", scope) << ">(rhs);";
H << eb;
H << sp;
H << nl << "inline bool operator<(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name())
<< "& rhs)";
H << sb;
- H << nl << "return static_cast<const " << getAbsolute("::Ice::LocalObject&", scope)
- << ">(lhs) < static_cast<const " << getAbsolute("::Ice::LocalObject&", scope) << ">(rhs);";
+ H << nl << "return static_cast<const " << getUnqualified("::Ice::LocalObject&", scope)
+ << ">(lhs) < static_cast<const " << getUnqualified("::Ice::LocalObject&", scope) << ">(rhs);";
H << eb;
H << nl << "/// \\endcond";
}
@@ -3551,7 +3549,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "/// \\cond INTERNAL";
C << nl << "void";
C << nl << scope.substr(2) << "_icePatchObjectPtr(" << p->name() << "Ptr& handle, const "
- << getAbsolute("::Ice::ObjectPtr&", scope) << " v)";
+ << getUnqualified("::Ice::ObjectPtr&", scope) << " v)";
C << sb;
C << nl << "handle = " << p->name() << "Ptr::dynamicCast(v);";
C << nl << "if(v && !handle)";
@@ -3566,15 +3564,15 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl << "inline bool operator==(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name())
<< "& rhs)";
H << sb;
- H << nl << "return static_cast<const " << getAbsolute("::Ice::Object&", scope)
- << ">(lhs) == static_cast<const " << getAbsolute("::Ice::Object&", scope) << ">(rhs);";
+ H << nl << "return static_cast<const " << getUnqualified("::Ice::Object&", scope)
+ << ">(lhs) == static_cast<const " << getUnqualified("::Ice::Object&", scope) << ">(rhs);";
H << eb;
H << sp;
H << nl << "inline bool operator<(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name())
<< "& rhs)";
H << sb;
- H << nl << "return static_cast<const " << getAbsolute("::Ice::Object&", scope)
- << ">(lhs) < static_cast<const " << getAbsolute("::Ice::Object&", scope) << ">(rhs);";
+ H << nl << "return static_cast<const " << getUnqualified("::Ice::Object&", scope)
+ << ">(lhs) < static_cast<const " << getUnqualified("::Ice::Object&", scope) << ">(rhs);";
H << eb;
H << nl << "/// \\endcond";
}
@@ -3683,9 +3681,9 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
args += ", ";
}
- params += "const " + getAbsolute("::Ice::Current&", classScope) + " " + currentParam + " = " +
- getAbsolute("::Ice::emptyCurrent", classScope) + ")";
- paramsDecl += "const " + getAbsolute("::Ice::Current&", classScope) + " " + currentParam + ")";
+ params += "const " + getUnqualified("::Ice::Current&", classScope) + " " + currentParam + " = " +
+ getUnqualified("::Ice::emptyCurrent", classScope) + ")";
+ paramsDecl += "const " + getUnqualified("::Ice::Current&", classScope) + " " + currentParam + ")";
args += "current)";
}
else
@@ -3695,8 +3693,8 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
args += ')';
}
- paramsAMD += "const " + getAbsolute("::Ice::Current&", classScope) + " " + currentParam + " = " +
- getAbsolute("::Ice::emptyCurrent", classScope) + ")";
+ paramsAMD += "const " + getUnqualified("::Ice::Current&", classScope) + " " + currentParam + " = " +
+ getUnqualified("::Ice::emptyCurrent", classScope) + ")";
argsAMD += "current)";
string isConst = ((p->mode() == Operation::Nonmutating) || p->hasMetaData("cpp:const")) ? " const" : "";
@@ -3745,7 +3743,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
if(!cl->isLocal())
{
H << nl << "/// \\cond INTERNAL";
- H << nl << "bool _iceD_" << name << "(::IceInternal::Incoming&, const " << getAbsolute("::Ice::Current&", scope)
+ H << nl << "bool _iceD_" << name << "(::IceInternal::Incoming&, const " << getUnqualified("::Ice::Current&", scope)
<< ")" << isConst << ';';
H << nl << "/// \\endcond";
@@ -3755,13 +3753,13 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
//
C << nl << "/// \\cond INTERNAL";
C << nl << "bool" << nl << scope.substr(2) << "_iceD_" << name << "(::IceInternal::Incoming& inS"
- << ", const " << getAbsolute("::Ice::Current&", classScope) << " current)" << isConst;
+ << ", const " << getUnqualified("::Ice::Current&", classScope) << " current)" << isConst;
C << sb;
C << nl << "_iceCheckMode(" << operationModeToString(p->mode()) << ", current.mode);";
if(!inParams.empty())
{
- C << nl << getAbsolute("::Ice::InputStream*", classScope) << " istr = inS.startReadParams();";
+ C << nl << getUnqualified("::Ice::InputStream*", classScope) << " istr = inS.startReadParams();";
writeAllocateCode(C, inParams, 0, true, classScope, _useWstring | TypeContextInParam);
writeUnmarshalCode(C, inParams, 0, true, TypeContextInParam);
if(p->sendsClasses(false))
@@ -3790,7 +3788,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
C << "this->" << fixKwd(name) << args << ';';
if(ret || !outParams.empty())
{
- C << nl << getAbsolute("::Ice::OutputStream*", classScope) << " ostr = inS.startWriteParams();";
+ C << nl << getUnqualified("::Ice::OutputStream*", classScope) << " ostr = inS.startWriteParams();";
writeMarshalCode(C, outParams, p, true, 0);
if(p->returnsClasses(false))
{
@@ -3852,7 +3850,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
returns.push_back(returnDoc);
writeOpDocSummary(H, p, comment, OpDocInParams, false, StringList(), StringList(), returns);
}
- H << nl << "virtual " << getAbsolute("::Ice::AsyncResultPtr", classScope) << " begin_" << name << spar
+ H << nl << "virtual " << getUnqualified("::Ice::AsyncResultPtr", classScope) << " begin_" << name << spar
<< paramsDeclAMI << epar << " = 0;";
H << sp;
@@ -3864,10 +3862,10 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
returns.push_back(returnDoc);
writeOpDocSummary(H, p, comment, OpDocInParams, false, StringList(), postParams, returns);
}
- H << nl << "virtual " << getAbsolute("::Ice::AsyncResultPtr", classScope) << " begin_" << name << spar
+ H << nl << "virtual " << getUnqualified("::Ice::AsyncResultPtr", classScope) << " begin_" << name << spar
<< paramsDeclAMI
- << ("const " + getAbsolute("::Ice::CallbackPtr&", classScope) + " " + cbParam)
- << ("const " + getAbsolute("::Ice::LocalObjectPtr&", classScope) + " " + cookieParam + " = 0")
+ << ("const " + getUnqualified("::Ice::CallbackPtr&", classScope) + " " + cbParam)
+ << ("const " + getUnqualified("::Ice::LocalObjectPtr&", classScope) + " " + cookieParam + " = 0")
<< epar << " = 0;";
string delName = "Callback_" + cl->name() + "_" + name;
@@ -3881,10 +3879,10 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
returns.push_back(returnDoc);
writeOpDocSummary(H, p, comment, OpDocInParams, false, StringList(), postParams, returns);
}
- H << nl << "virtual " << getAbsolute("::Ice::AsyncResultPtr", classScope) << " begin_" << name << spar
+ H << nl << "virtual " << getUnqualified("::Ice::AsyncResultPtr", classScope) << " begin_" << name << spar
<< paramsDeclAMI
<< ("const " + delName + "Ptr& " + cbParam)
- << ("const " + getAbsolute("::Ice::LocalObjectPtr&", classScope) + " " + cookieParam + " = 0") << epar
+ << ("const " + getUnqualified("::Ice::LocalObjectPtr&", classScope) + " " + cookieParam + " = 0") << epar
<< " = 0;";
H << sp;
@@ -3896,7 +3894,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
writeOpDocSummary(H, p, comment, OpDocOutParams, true, StringList(), postParams, comment->returns());
}
H << nl << "virtual " << retS << " end_" << name << spar << outParamsDeclAMI
- << ("const " + getAbsolute("::Ice::AsyncResultPtr&", classScope) + " " + resultParam) << epar << " = 0;";
+ << ("const " + getUnqualified("::Ice::AsyncResultPtr&", classScope) + " " + resultParam) << epar << " = 0;";
}
}
@@ -4191,11 +4189,11 @@ Slice::Gen::ObjectVisitor::emitUpcall(const ClassDefPtr& base, const string& cal
C << nl;
if(base)
{
- C << getAbsolute(fixKwd(base->scoped()), scope);
+ C << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- C << getAbsolute("::Ice::Object", scope);
+ C << getUnqualified("::Ice::Object", scope);
}
C << call;
}
@@ -4453,7 +4451,7 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr&
//
H << sp;
H << nl << "/// \\cond INTERNAL";
- H << nl << "virtual void completed(const " << getAbsolute("::Ice::AsyncResultPtr&", clScope)
+ H << nl << "virtual void completed(const " << getUnqualified("::Ice::AsyncResultPtr&", clScope)
<< " result) const";
H << sb;
H << nl << clName << "Prx proxy = " << clName << "Prx::uncheckedCast(result->getProxy());";
@@ -4666,14 +4664,14 @@ Slice::Gen::ImplVisitor::defaultValue(const TypePtr& type, const string& scope,
StructPtr st = StructPtr::dynamicCast(type);
if(st)
{
- return getAbsolute(fixKwd(st->scoped()), scope) + "()";
+ return getUnqualified(fixKwd(st->scoped()), scope) + "()";
}
EnumPtr en = EnumPtr::dynamicCast(type);
if(en)
{
EnumeratorList enumerators = en->enumerators();
- return getAbsolute(fixKwd(en->scope() + enumerators.front()->name()), scope);
+ return getUnqualified(fixKwd(en->scope() + enumerators.front()->name()), scope);
}
SequencePtr seq = SequencePtr::dynamicCast(type);
@@ -4685,7 +4683,7 @@ Slice::Gen::ImplVisitor::defaultValue(const TypePtr& type, const string& scope,
DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
if(dict)
{
- return getAbsolute(fixKwd(dict->scoped()), scope) + "()";
+ return getUnqualified(fixKwd(dict->scoped()), scope) + "()";
}
}
@@ -4817,7 +4815,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- H << sp << nl << "virtual " << getAbsolute(retS, scope) << ' ' << fixKwd(opName) << '(';
+ H << sp << nl << "virtual " << getUnqualified(retS, scope) << ' ' << fixKwd(opName) << '(';
H.useCurrentPosAsIndent();
ParamDeclList paramList = op->parameters();
for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q)
@@ -5000,7 +4998,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
H << nl << " * method in the case of an error.";
H << nl << " */";
H << nl << "class " << _dllExport << cbName << " : public virtual "
- << getAbsolute("::Ice::AMDCallback", classScope);
+ << getUnqualified("::Ice::AMDCallback", classScope);
H << sb;
H.dec();
H << nl << "public:";
@@ -6260,10 +6258,10 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
string helperClass =
- getAbsolute(p->isLocal() ? "::Ice::LocalExceptionHelper" : "::Ice::UserExceptionHelper", scope);
+ getUnqualified(p->isLocal() ? "::Ice::LocalExceptionHelper" : "::Ice::UserExceptionHelper", scope);
string baseClass = base ?
- getAbsolute(fixKwd(base->scoped()), scope) :
- getAbsolute(p->isLocal() ? "::Ice::LocalException" : "::Ice::UserException", scope);
+ getUnqualified(fixKwd(base->scoped()), scope) :
+ getUnqualified(p->isLocal() ? "::Ice::LocalException" : "::Ice::UserException", scope);
string templateParameters = name + ", " + baseClass;
H << sp;
@@ -6297,7 +6295,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
<< " The line number at which the exception was raised, typically __LINE__.";
H << nl << " */";
H << nl << name << "(const char* " << fileParam << ", int " << lineParam << ") : ";
- H << getAbsolute("::Ice::LocalExceptionHelper", scope) << "<" << templateParameters << ">";
+ H << getUnqualified("::Ice::LocalExceptionHelper", scope) << "<" << templateParameters << ">";
H << "(" << fileParam << ", " << lineParam << ")";
H << sb;
H << eb;
@@ -6385,7 +6383,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
else if(p->isLocal())
{
- H << " " << getAbsolute("::Ice::LocalExceptionHelper", scope) << "<" << templateParameters << ">";
+ H << " " << getUnqualified("::Ice::LocalExceptionHelper", scope) << "<" << templateParameters << ">";
H << "(" << fileParam << ", " << lineParam << ")";
if(!dataMembers.empty())
{
@@ -6498,16 +6496,16 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
H << nl << " * @return The SlicedData object, or nil if the exception was not sliced or was not";
H << nl << " * marshaled in the sliced format.";
H << nl << " */";
- H << nl << _dllMemberExport << "virtual ::std::shared_ptr<" << getAbsolute("::Ice::SlicedData", scope)
+ H << nl << _dllMemberExport << "virtual ::std::shared_ptr<" << getUnqualified("::Ice::SlicedData", scope)
<< "> ice_getSlicedData() const override;";
H << sp;
H << nl << "/// \\cond STREAM";
- H << nl << _dllMemberExport << "virtual void _write(" << getAbsolute("::Ice::OutputStream*", scope)
+ H << nl << _dllMemberExport << "virtual void _write(" << getUnqualified("::Ice::OutputStream*", scope)
<< ") const override;";
- H << nl << _dllMemberExport << "virtual void _read(" << getAbsolute("::Ice::InputStream*", scope)
+ H << nl << _dllMemberExport << "virtual void _read(" << getUnqualified("::Ice::InputStream*", scope)
<< ") override;";
- H << sp << nl << "::std::shared_ptr<" << getAbsolute("::Ice::SlicedData", scope) << "> _slicedData;";
+ H << sp << nl << "::std::shared_ptr<" << getUnqualified("::Ice::SlicedData", scope) << "> _slicedData;";
H << nl << "/// \\endcond";
C << sp;
@@ -6520,7 +6518,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
C << sp;
C << nl << "/// \\cond STREAM";
C << nl << "void" << nl << scoped.substr(2) << "::_write("
- << getAbsolute("::Ice::OutputStream*", scope) << " ostr) const";
+ << getUnqualified("::Ice::OutputStream*", scope) << " ostr) const";
C << sb;
C << nl << "ostr->startException(_slicedData);";
C << nl << "_writeImpl(ostr);";
@@ -6528,7 +6526,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
C << eb;
C << sp << nl << "void" << nl << scoped.substr(2) << "::_read("
- << getAbsolute("::Ice::InputStream*", scope) << " istr)";
+ << getUnqualified("::Ice::InputStream*", scope) << " istr)";
C << sb;
C << nl << "istr->startException();";
C << nl << "_readImpl(istr);";
@@ -6739,17 +6737,17 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
H << sp;
writeDocSummary(H, p);
H << nl << "class " << _dllClassExport << p->name() << "Prx : public virtual "
- << getAbsolute("::Ice::Proxy", scope) << "<" << fixKwd(p->name() + "Prx") << ", ";
+ << getUnqualified("::Ice::Proxy", scope) << "<" << fixKwd(p->name() + "Prx") << ", ";
if(bases.empty() || (base && base->allOperations().empty()))
{
- H << getAbsolute("::Ice::ObjectPrx", scope);
+ H << getUnqualified("::Ice::ObjectPrx", scope);
}
else
{
ClassList::const_iterator q = bases.begin();
while(q != bases.end())
{
- H << getAbsolute(fixKwd((*q)->scoped() + "Prx"), scope);
+ H << getUnqualified(fixKwd((*q)->scoped() + "Prx"), scope);
if(++q != bases.end())
{
H << ", ";
@@ -6785,11 +6783,11 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
H.inc();
H << sp;
H << nl << "/// \\cond INTERNAL";
- H << nl << getAbsolute(prx, scope) << "() = default;";
- H << nl << "friend ::std::shared_ptr<" << getAbsolute(prx, scope) << "> IceInternal::createProxy<"
- << getAbsolute(prx, scope) << ">();";
+ H << nl << getUnqualified(prx, scope) << "() = default;";
+ H << nl << "friend ::std::shared_ptr<" << getUnqualified(prx, scope) << "> IceInternal::createProxy<"
+ << getUnqualified(prx, scope) << ">();";
H << sp;
- H << nl << _dllMemberExport << "virtual ::std::shared_ptr<" << getAbsolute("::Ice::ObjectPrx", scope)
+ H << nl << _dllMemberExport << "virtual ::std::shared_ptr<" << getUnqualified("::Ice::ObjectPrx", scope)
<< "> _newInstance() const override;";
H << nl << "/// \\endcond";
H << eb << ';';
@@ -6799,7 +6797,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "::std::shared_ptr<::Ice::ObjectPrx>";
C << nl << scoped.substr(2) << "::_newInstance() const";
C << sb;
- C << nl << "return ::IceInternal::createProxy<" << getAbsolute(prx, scope) << ">();";
+ C << nl << "return ::IceInternal::createProxy<" << getUnqualified(prx, scope) << ">();";
C << eb;
C << nl << "/// \\endcond";
C << sp;
@@ -6896,8 +6894,8 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
string scoped = fixKwd(cl->scope() + cl->name() + "Prx" + "::").substr(2);
const string contextParam = escapeParam(paramList, "context");
- const string contextDecl = "const " + getAbsolute("::Ice::Context&", clScope) + " " + contextParam + " = " +
- getAbsolute("::Ice::noExplicitContext", clScope);
+ const string contextDecl = "const " + getUnqualified("::Ice::Context&", clScope) + " " + contextParam + " = " +
+ getUnqualified("::Ice::noExplicitContext", clScope);
string futureT;
if(futureOutParams.empty())
@@ -6948,7 +6946,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
H << "auto _result = ";
}
- H << "_makePromiseOutgoing<" << getAbsolute(futureT, cl->scoped()) << ">";
+ H << "_makePromiseOutgoing<" << getUnqualified(futureT, cl->scoped()) << ">";
H << spar << "true, this" << "&" + cl->name() + "Prx::_iceI_" + name;
for(ParamDeclList::const_iterator q = inParams.begin(); q != inParams.end(); ++q)
@@ -7171,7 +7169,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
H << nl << "return _makeLamdaOutgoing<" << futureT << ">" << spar;
H << (futureOutParams.size() > 1 ? "_responseCb" : responseParam) << exParam << sentParam << "this";
- H << string("&" + getAbsolute(scoped, clScope.substr(2)) + "_iceI_" + name);
+ H << string("&" + getUnqualified(scoped, clScope.substr(2)) + "_iceI_" + name);
for(ParamDeclList::const_iterator q = inParams.begin(); q != inParams.end(); ++q)
{
H << fixKwd((*q)->name());
@@ -7189,7 +7187,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
H << nl << _dllMemberExport << "void _iceI_" << name << spar;
H << "const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<" + futureT + ">>&";
H << inParamsS;
- H << ("const " + getAbsolute("::Ice::Context&", clScope));
+ H << ("const " + getUnqualified("::Ice::Context&", clScope));
H << epar << ";";
H << nl << "/// \\endcond";
@@ -7197,7 +7195,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
C << nl << "/// \\cond INTERNAL";
C << nl << "void" << nl << scoped << "_iceI_" << name << spar;
C << "const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<" + futureT + ">>& outAsync";
- C << inParamsImplDecl << ("const " + getAbsolute("::Ice::Context&", clScope) + " context");
+ C << inParamsImplDecl << ("const " + getUnqualified("::Ice::Context&", clScope) + " context");
C << epar;
C << sb;
if(p->returnsData())
@@ -7205,8 +7203,8 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
C << nl << "_checkTwowayOnly(" << flatName << ");";
}
C << nl << "outAsync->invoke(" << flatName << ", ";
- C << getAbsolute(operationModeToString(p->sendMode(), true), clScope) << ", "
- << getAbsolute(opFormatTypeToString(p, true), clScope) << ", context,";
+ C << getUnqualified(operationModeToString(p->sendMode(), true), clScope) << ", "
+ << getUnqualified(opFormatTypeToString(p, true), clScope) << ", context,";
C.inc();
C << nl;
@@ -7221,7 +7219,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
// only one, we rely on the default read method from LambdaOutgoing
// except if the unique ret/out is optional or is an array/range.
//
- C << "," << nl << "[](" << getAbsolute("::Ice::InputStream*", clScope) << " istr)";
+ C << "," << nl << "[](" << getUnqualified("::Ice::InputStream*", clScope) << " istr)";
C << sb;
C << nl << futureT << " v;";
writeUnmarshalCode(C, outParams, p, false, _useWstring | TypeContextCpp11, "", returnValueS, "v");
@@ -7240,7 +7238,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
// a read method, we can't rely on the default read method which wouldn't
// known which tag to use.
//
- C << "," << nl << "[](" << getAbsolute("::Ice::InputStream*", clScope) << " istr)";
+ C << "," << nl << "[](" << getUnqualified("::Ice::InputStream*", clScope) << " istr)";
C << sb;
writeAllocateCode(C, outParams, p, true, clScope, _useWstring | TypeContextCpp11);
@@ -7331,11 +7329,11 @@ Slice::Gen::Cpp11TypesVisitor::emitUpcall(const ExceptionPtr& base, const string
C << nl;
if(base)
{
- C << getAbsolute(fixKwd(base->scoped()), scope);
+ C << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- getAbsolute(isLocal ? "::Ice::LocalException" : "::Ice::UserException", scope);
+ getUnqualified(isLocal ? "::Ice::LocalException" : "::Ice::UserException", scope);
}
C << call;
}
@@ -7398,11 +7396,11 @@ Slice::Gen::Cpp11InterfaceVisitor::emitUpcall(const ClassDefPtr& base, const str
C << nl;
if(base)
{
- C << getAbsolute(fixKwd(base->scoped()), scope);
+ C << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- C << getAbsolute("::Ice::Object", scope);
+ C << getUnqualified("::Ice::Object", scope);
}
C << call;
}
@@ -7413,11 +7411,11 @@ Slice::Gen::Cpp11ValueVisitor::emitUpcall(const ClassDefPtr& base, const string&
C << nl;
if(base)
{
- C << getAbsolute(fixKwd(base->scoped()), scope);
+ C << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- C << getAbsolute("::Ice::Value", scope);
+ C << getUnqualified("::Ice::Value", scope);
}
C << call;
}
@@ -7872,7 +7870,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
H.useCurrentPosAsIndent();
if(bases.empty() || (base && base->allOperations().empty()))
{
- H << "public virtual " << getAbsolute("::Ice::Object", scope);
+ H << "public virtual " << getUnqualified("::Ice::Object", scope);
}
else
{
@@ -7882,7 +7880,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
string baseSuffix = (*q)->isInterface() ? "" : "Disp";
string baseScoped = fixKwd((*q)->scope() + (*q)->name() + baseSuffix);
- H << "public virtual " << getAbsolute(baseScoped, scope);
+ H << "public virtual " << getUnqualified(baseScoped, scope);
if(++q != bases.end())
{
H << ',' << nl;
@@ -7927,7 +7925,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << " * @param current The Current object for the invocation.";
H << nl << " * @return True if this object supports the interface, false, otherwise.";
H << nl << " */";
- H << nl << "virtual bool ice_isA(::std::string id, const " << getAbsolute("::Ice::Current&", scope)
+ H << nl << "virtual bool ice_isA(::std::string id, const " << getUnqualified("::Ice::Current&", scope)
<< " current) const override;";
H << sp;
H << nl << "/**";
@@ -7936,7 +7934,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << " * @return A list of fully-scoped type IDs.";
H << nl << " */";
H << nl
- << "virtual ::std::vector<::std::string> ice_ids(const " << getAbsolute("::Ice::Current&", scope)
+ << "virtual ::std::vector<::std::string> ice_ids(const " << getUnqualified("::Ice::Current&", scope)
<< " current) const override;";
H << sp;
H << nl << "/**";
@@ -7944,7 +7942,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << " * @param current The Current object for the invocation.";
H << nl << " * @return A fully-scoped type ID.";
H << nl << " */";
- H << nl << "virtual ::std::string ice_id(const " << getAbsolute("::Ice::Current&", scope)
+ H << nl << "virtual ::std::string ice_id(const " << getUnqualified("::Ice::Current&", scope)
<< " current) const override;";
H << sp;
H << nl << "/**";
@@ -7957,21 +7955,21 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sp;
C << nl << "bool" << nl << scoped.substr(2) << "::ice_isA(::std::string s, const "
- << getAbsolute("::Ice::Current&", scope) << ") const";
+ << getUnqualified("::Ice::Current&", scope) << ") const";
C << sb;
C << nl << "return ::std::binary_search(" << flatName << ", " << flatName << " + " << ids.size() << ", s);";
C << eb;
C << sp;
C << nl << "::std::vector<::std::string>" << nl << scoped.substr(2) << "::ice_ids(const "
- << getAbsolute("::Ice::Current&", scope) << ") const";
+ << getUnqualified("::Ice::Current&", scope) << ") const";
C << sb;
C << nl << "return ::std::vector<::std::string>(&" << flatName << "[0], &" << flatName << '[' << ids.size()
<< "]);";
C << eb;
C << sp;
- C << nl << "::std::string" << nl << scoped.substr(2) << "::ice_id(const " << getAbsolute("::Ice::Current&", scope)
+ C << nl << "::std::string" << nl << scoped.substr(2) << "::ice_id(const " << getUnqualified("::Ice::Current&", scope)
<< ") const";
C << sb;
C << nl << "return ice_staticId();";
@@ -8021,14 +8019,14 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp;
H << nl << "/// \\cond INTERNAL";
H << nl << "virtual bool _iceDispatch(::IceInternal::Incoming&, const "
- << getAbsolute("::Ice::Current&", scope) << ") override;";
+ << getUnqualified("::Ice::Current&", scope) << ") override;";
H << nl << "/// \\endcond";
C << sp;
C << nl << "/// \\cond INTERNAL";
C << nl << "bool";
C << nl << scoped.substr(2) << "::_iceDispatch(::IceInternal::Incoming& in, const "
- << getAbsolute("::Ice::Current&", scope) << " current)";
+ << getUnqualified("::Ice::Current&", scope) << " current)";
C << sb;
C << nl << "::std::pair<const ::std::string*, const ::std::string*> r = "
@@ -8036,7 +8034,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p)
<< ", current.operation);";
C << nl << "if(r.first == r.second)";
C << sb;
- C << nl << "throw " << getAbsolute("::Ice::OperationNotExistException", scope)
+ C << nl << "throw " << getUnqualified("::Ice::OperationNotExistException", scope)
<< "(__FILE__, __LINE__, current.id, current.facet, current.operation);";
C << eb;
C << sp;
@@ -8053,7 +8051,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "default:";
C << sb;
C << nl << "assert(false);";
- C << nl << "throw " << getAbsolute("::Ice::OperationNotExistException", scope)
+ C << nl << "throw " << getUnqualified("::Ice::OperationNotExistException", scope)
<< "(__FILE__, __LINE__, current.id, current.facet, current.operation);";
C << eb;
C << eb;
@@ -8110,7 +8108,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
const string responsecbParam = escapeParam(inParams, "response");
const string excbParam = escapeParam(inParams, "exception");
const string currentParam = escapeParam(amd ? inParams : paramList, "current");
- const string currentTypeDecl = "const " + getAbsolute("::Ice::Current&", classScope);
+ const string currentTypeDecl = "const " + getUnqualified("::Ice::Current&", classScope);
const string currentDecl = currentTypeDecl + " " + currentParam;
CommentPtr comment = p->parseComment(false);
@@ -8201,7 +8199,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
H << nl << "/**";
H << nl << " * Marshaled result structure for operation " << (amd ? name + "Async" : fixKwd(name)) << ".";
H << nl << " */";
- H << nl << "class " << resultName << " : public " << getAbsolute("::Ice::MarshaledResult", classScope);
+ H << nl << "class " << resultName << " : public " << getUnqualified("::Ice::MarshaledResult", classScope);
H << sb;
H.dec();
H << nl << "public:";
@@ -8276,7 +8274,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
H << nl << deprecateSymbol << "virtual " << retS << ' ' << opName << spar << params << epar << isConst << " = 0;";
H << nl << "/// \\cond INTERNAL";
H << nl << "bool _iceD_" << name << "(::IceInternal::Incoming&, const "
- << getAbsolute("::Ice::Current&", classScope) << ")" << isConst << ';';
+ << getUnqualified("::Ice::Current&", classScope) << ")" << isConst << ';';
H << nl << "/// \\endcond";
C << sp;
@@ -8284,9 +8282,9 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
C << nl << "bool";
C << nl << scope.substr(2);
C << "_iceD_" << name << "(::IceInternal::Incoming& inS, const "
- << getAbsolute("::Ice::Current&", classScope) << " current)" << isConst;
+ << getUnqualified("::Ice::Current&", classScope) << " current)" << isConst;
C << sb;
- C << nl << "_iceCheckMode(" << getAbsolute(operationModeToString(p->mode(), true), classScope)
+ C << nl << "_iceCheckMode(" << getUnqualified(operationModeToString(p->mode(), true), classScope)
<< ", current.mode);";
if(!inParams.empty())
@@ -8427,16 +8425,16 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefStart(const ClassDefPtr& p)
H << sp;
writeDocSummary(H, p);
- H << nl << "class " << _dllClassExport << name << " : public " << getAbsolute("::Ice::ValueHelper", scope)
+ H << nl << "class " << _dllClassExport << name << " : public " << getUnqualified("::Ice::ValueHelper", scope)
<< "<" << name << ", ";
if(!base || (base && base->isInterface()))
{
- H << getAbsolute("::Ice::Value", scope);
+ H << getUnqualified("::Ice::Value", scope);
}
else
{
- H << getAbsolute(fixKwd(base->scoped()), scope);
+ H << getUnqualified(fixKwd(base->scoped()), scope);
}
H << ">";
H << sb;
@@ -8507,7 +8505,7 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl << " * @return The SlicedData object, or nil if the value was not sliced or was not";
H << nl << " * marshaled in the sliced format.";
H << nl << " */";
- H << nl << "virtual ::std::shared_ptr<" << getAbsolute("::Ice::SlicedData", scope)
+ H << nl << "virtual ::std::shared_ptr<" << getUnqualified("::Ice::SlicedData", scope)
<< "> ice_getSlicedData() const override;";
C << sp;
@@ -8518,13 +8516,13 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp;
H << nl << "/// \\cond STREAM";
- H << nl << "virtual void _iceWrite(" << getAbsolute("::Ice::OutputStream*", scope) << ") const override;";
- H << nl << "virtual void _iceRead(" << getAbsolute("::Ice::InputStream*", scope) << ") override;";
+ H << nl << "virtual void _iceWrite(" << getUnqualified("::Ice::OutputStream*", scope) << ") const override;";
+ H << nl << "virtual void _iceRead(" << getUnqualified("::Ice::InputStream*", scope) << ") override;";
H << nl << "/// \\endcond";
C << sp;
C << nl << "/// \\cond STREAM";
- C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(" << getAbsolute("::Ice::OutputStream*", scope)
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(" << getUnqualified("::Ice::OutputStream*", scope)
<< " ostr) const";
C << sb;
C << nl << "ostr->startValue(_iceSlicedData);";
@@ -8533,7 +8531,7 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::_iceRead(" << getAbsolute("::Ice::InputStream*", scope)
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceRead(" << getUnqualified("::Ice::InputStream*", scope)
<< " istr)";
C << sb;
C << nl << "istr->startValue();";
@@ -8608,7 +8606,7 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
}
H << sp;
H << nl << "/// \\cond STREAM";
- H << nl << "::std::shared_ptr<" << getAbsolute("::Ice::SlicedData", scope) << "> _iceSlicedData;";
+ H << nl << "::std::shared_ptr<" << getUnqualified("::Ice::SlicedData", scope) << "> _iceSlicedData;";
H << nl << "/// \\endcond";
}
@@ -8696,12 +8694,12 @@ Slice::Gen::Cpp11ObjectVisitor::emitVirtualBaseInitializers(const ClassDefPtr& d
if(base->isLocal())
{
- H << nl << getAbsolute(fixKwd(base->scoped()), scope);
+ H << nl << getUnqualified(fixKwd(base->scoped()), scope);
}
else
{
- H << nl << "Ice::ValueHelper<" << getAbsolute(fixKwd(derived->scoped()), scope)
- << ", " << getAbsolute(fixKwd(base->scoped()), scope) << ">";
+ H << nl << "Ice::ValueHelper<" << getUnqualified(fixKwd(derived->scoped()), scope)
+ << ", " << getUnqualified(fixKwd(base->scoped()), scope) << ">";
}
H << upcall;
return true;
@@ -9019,14 +9017,14 @@ Slice::Gen::Cpp11ImplVisitor::defaultValue(const TypePtr& type, const string& sc
StructPtr st = StructPtr::dynamicCast(type);
if(st)
{
- return getAbsolute(fixKwd(st->scoped()), scope) + "()";
+ return getUnqualified(fixKwd(st->scoped()), scope) + "()";
}
EnumPtr en = EnumPtr::dynamicCast(type);
if(en)
{
EnumeratorList enumerators = en->enumerators();
- return getAbsolute(fixKwd(en->scoped() + "::" + enumerators.front()->name()), scope);
+ return getUnqualified(fixKwd(en->scoped() + "::" + enumerators.front()->name()), scope);
}
SequencePtr seq = SequencePtr::dynamicCast(type);
@@ -9038,7 +9036,7 @@ Slice::Gen::Cpp11ImplVisitor::defaultValue(const TypePtr& type, const string& sc
DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
if(dict)
{
- return getAbsolute(fixKwd(dict->scoped()), scope) + "()";
+ return getUnqualified(fixKwd(dict->scoped()), scope) + "()";
}
}
@@ -9225,7 +9223,7 @@ Slice::Gen::Cpp11ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- H << sp << nl << "virtual " << getAbsolute(retS, scope) << ' ' << fixKwd(opName) << '(';
+ H << sp << nl << "virtual " << getUnqualified(retS, scope) << ' ' << fixKwd(opName) << '(';
H.useCurrentPosAsIndent();
ParamDeclList paramList = op->hasMarshaledResult() ? inParams : op->parameters();
for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q)
diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp
index 38c1232817e..22a8f7d21ed 100644
--- a/cpp/src/slice2cs/CsUtil.cpp
+++ b/cpp/src/slice2cs/CsUtil.cpp
@@ -100,7 +100,7 @@ splitScopedName(const string& scoped)
}
string
-Slice::CsGenerator::getAbsolute(const string& type, const string& scope)
+Slice::CsGenerator::getUnqualified(const string& type, const string& scope)
{
if(type.find(".") != string::npos && type.find(scope) == 0 && type.find(".", scope.size()) == string::npos)
{
@@ -167,7 +167,7 @@ string
Slice::CsGenerator::getOptionalFormat(const TypePtr& type, const string& scope)
{
BuiltinPtr bp = BuiltinPtr::dynamicCast(type);
- string prefix = getAbsolute("Ice.OptionalFormat", scope);
+ string prefix = getUnqualified("Ice.OptionalFormat", scope);
if(bp)
{
switch(bp->kind())
@@ -304,7 +304,7 @@ Slice::CsGenerator::typeToString(const TypePtr& type, const string& scope, bool
if(optional)
{
- return getAbsolute("Ice.Optional", scope) + "<" + typeToString(type, scope, false, local) + ">";
+ return getUnqualified("Ice.Optional", scope) + "<" + typeToString(type, scope, false, local) + ">";
}
static const char* builtinTable[] =
@@ -341,11 +341,11 @@ Slice::CsGenerator::typeToString(const TypePtr& type, const string& scope, bool
{
if(!local && builtin->kind() == Builtin::KindObject)
{
- return getAbsolute(builtinTable[Builtin::KindValue], scope);
+ return getUnqualified(builtinTable[Builtin::KindValue], scope);
}
else
{
- return getAbsolute(builtinTable[builtin->kind()], scope);
+ return getUnqualified(builtinTable[builtin->kind()], scope);
}
}
@@ -354,11 +354,11 @@ Slice::CsGenerator::typeToString(const TypePtr& type, const string& scope, bool
{
if(cl->isInterface() && !local)
{
- return getAbsolute("Ice.Value", scope);
+ return getUnqualified("Ice.Value", scope);
}
else
{
- return getAbsolute(fixId(cl->scoped()), scope);
+ return getUnqualified(fixId(cl->scoped()), scope);
}
}
@@ -368,11 +368,11 @@ Slice::CsGenerator::typeToString(const TypePtr& type, const string& scope, bool
ClassDefPtr def = proxy->_class()->definition();
if(def->isInterface() || def->allOperations().size() > 0)
{
- return getAbsolute(fixId(proxy->_class()->scoped() + "Prx"), scope);
+ return getUnqualified(fixId(proxy->_class()->scoped() + "Prx"), scope);
}
else
{
- return getAbsolute("Ice.ObjectPrx", scope);
+ return getUnqualified("Ice.ObjectPrx", scope);
}
}
@@ -426,7 +426,7 @@ Slice::CsGenerator::typeToString(const TypePtr& type, const string& scope, bool
ContainedPtr contained = ContainedPtr::dynamicCast(type);
if(contained)
{
- return getAbsolute(fixId(contained->scoped()), scope);
+ return getUnqualified(fixId(contained->scoped()), scope);
}
return "???";
@@ -450,7 +450,7 @@ Slice::CsGenerator::resultType(const OperationPtr& op, const string& scope, bool
ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container()); // Get the class containing the op.
if(dispatch && op->hasMarshaledResult())
{
- return getAbsolute(fixId(cl->scope() + resultStructName(cl->name(), op->name(), true)), scope);
+ return getUnqualified(fixId(cl->scope() + resultStructName(cl->name(), op->name(), true)), scope);
}
string t;
@@ -464,7 +464,7 @@ Slice::CsGenerator::resultType(const OperationPtr& op, const string& scope, bool
else if(op->returnType() || outParams.size() > 1)
{
ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container());
- t = getAbsolute(fixId(cl->scope()) + resultStructName(cl->name(), op->name()), scope);
+ t = getUnqualified(fixId(cl->scope()) + resultStructName(cl->name(), op->name()), scope);
}
else
{
@@ -803,7 +803,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
{
typeS = typeToString(type, scope);
}
- string helperName = getAbsolute(typeS + "Helper", scope);
+ string helperName = getUnqualified(typeS + "Helper", scope);
if(marshal)
{
out << nl << helperName << ".write(" << stream << ", " << param << ");";
@@ -980,8 +980,8 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
}
else
{
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<"
- << getAbsolute("Ice.ObjectPrx", scope) << ">(" << stream << ".readProxy(" << tag << "));";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<"
+ << getUnqualified("Ice.ObjectPrx", scope) << ">(" << stream << ".readProxy(" << tag << "));";
}
break;
}
@@ -1000,7 +1000,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
if(marshal)
{
out << nl << "if(" << param << ".HasValue && " << stream << ".writeOptional(" << tag
- << ", " << getAbsolute("Ice.OptionalFormat", scope) << ".FSize))";
+ << ", " << getUnqualified("Ice.OptionalFormat", scope) << ".FSize))";
out << sb;
out << nl << "int pos = " << stream << ".startSize();";
writeMarshalUnmarshalCode(out, type, scope, param + ".Value", marshal, customStream);
@@ -1009,7 +1009,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
}
else
{
- out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getAbsolute("Ice.OptionalFormat", scope)
+ out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getUnqualified("Ice.OptionalFormat", scope)
<< ".FSize))";
out << sb;
out << nl << stream << ".skip(4);";
@@ -1017,11 +1017,11 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
string typeS = typeToString(type, scope);
out << nl << typeS << ' ' << tmp << ';';
writeMarshalUnmarshalCode(out, type, scope, tmp, marshal, customStream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">();";
out << eb;
}
return;
@@ -1087,11 +1087,11 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << nl << typeS << ' ' << tmp << " = null;";
}
writeMarshalUnmarshalCode(out, type, scope, tmp, marshal, customStream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">();";
out << eb;
}
return;
@@ -1110,18 +1110,18 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
}
else
{
- out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getAbsolute("Ice.OptionalFormat", scope)
+ out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getUnqualified("Ice.OptionalFormat", scope)
<< ".Size))";
out << sb;
string typeS = typeToString(type, scope);
string tmp = "tmpVal";
out << nl << typeS << ' ' << tmp << ';';
writeMarshalUnmarshalCode(out, type, scope, tmp, marshal, customStream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">();";
out << eb;
}
return;
@@ -1176,11 +1176,11 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
string tmp = "tmpVal";
out << nl << typeS << ' ' << tmp << " = new " << typeS << "();";
writeMarshalUnmarshalCode(out, type, scope, tmp, marshal, customStream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">(" << tmp << ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << typeS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << typeS << ">();";
out << eb;
}
}
@@ -1204,7 +1204,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
assert(cont);
if(useHelper)
{
- string helperName = getAbsolute(fixId(cont->scoped(), DotNet::ICloneable) + "." + seq->name() + "Helper", scope);
+ string helperName = getUnqualified(fixId(cont->scoped(), DotNet::ICloneable) + "." + seq->name() + "Helper", scope);
if(marshal)
{
out << nl << helperName << ".write(" << stream << ", " << param << ");";
@@ -1292,7 +1292,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
// If the collection is a stack, write in top-to-bottom order. Stacks
// cannot contain Ice.Object.
//
- out << nl << getAbsolute("Ice.ObjectPrx", scope) << "[] " << param << "_tmp = " << param
+ out << nl << getUnqualified("Ice.ObjectPrx", scope) << "[] " << param << "_tmp = " << param
<< ".ToArray();";
out << nl << "for(int ix = 0; ix < " << param << "_tmp.Length; ++ix)";
out << sb;
@@ -1770,11 +1770,11 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
string helperName;
if(ProxyPtr::dynamicCast(type))
{
- helperName = getAbsolute(fixId(ProxyPtr::dynamicCast(type)->_class()->scoped() + "PrxHelper"), scope);
+ helperName = getUnqualified(fixId(ProxyPtr::dynamicCast(type)->_class()->scoped() + "PrxHelper"), scope);
}
else
{
- helperName = getAbsolute(fixId(ContainedPtr::dynamicCast(type)->scoped() + "Helper"), scope);
+ helperName = getUnqualified(fixId(ContainedPtr::dynamicCast(type)->scoped() + "Helper"), scope);
}
string func;
@@ -1912,7 +1912,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
if(isSerializable)
{
out << nl << "if(" << param << ".HasValue && " << stream << ".writeOptional(" << tag
- << ", " << getAbsolute("Ice.OptionalFormat", scope) << ".VSize))";
+ << ", " << getUnqualified("Ice.OptionalFormat", scope) << ".VSize))";
out << sb;
out << nl << stream << ".writeSerializable(" << param << ".Value);";
out << eb;
@@ -1945,12 +1945,12 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
string tmp = "tmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, scope, tmp, marshal, true, stream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">(" << tmp
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">(" << tmp
<< ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">();";
out << eb;
}
break;
@@ -1978,12 +1978,12 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
string tmp = "tmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, scope, tmp, marshal, true, stream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">(" << tmp
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">(" << tmp
<< ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">();";
out << eb;
}
break;
@@ -2035,11 +2035,11 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
string tmp = "tmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, scope, tmp, marshal, true, stream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">(" << tmp << ");";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">(" << tmp << ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">();";
out << eb;
}
return;
@@ -2066,11 +2066,11 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
string tmp = "tmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, scope, tmp, marshal, true, stream);
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">(" << tmp << ");";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">(" << tmp << ");";
out << eb;
out << nl << "else";
out << sb;
- out << nl << param << " = new " << getAbsolute("Ice.Optional", scope) << "<" << seqS << ">();";
+ out << nl << param << " = new " << getUnqualified("Ice.Optional", scope) << "<" << seqS << ">();";
out << eb;
}
}
diff --git a/cpp/src/slice2cs/CsUtil.h b/cpp/src/slice2cs/CsUtil.h
index f7588094192..b1cd9a80fe1 100644
--- a/cpp/src/slice2cs/CsUtil.h
+++ b/cpp/src/slice2cs/CsUtil.h
@@ -34,7 +34,7 @@ public:
protected:
- static std::string getAbsolute(const std::string&, const std::string&);
+ static std::string getUnqualified(const std::string&, const std::string&);
static std::string resultStructName(const std::string&, const std::string&, bool = false);
static std::string resultType(const OperationPtr&, const std::string&, bool = false);
static std::string taskResultType(const OperationPtr&, const std::string&, bool = false);
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 119f0b86668..b5dd7b25c61 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -430,7 +430,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override bool ice_isA(string s, " << getAbsolute("Ice.Current", scope) << " current = null)";
+ _out << nl << "public override bool ice_isA(string s, " << getUnqualified("Ice.Current", scope) << " current = null)";
_out << sb;
_out << nl << "return _System.Array.BinarySearch(_ids, s, IceUtilInternal.StringUtil.OrdinalStringComparer) >= 0;";
_out << eb;
@@ -440,7 +440,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override string[] ice_ids(" << getAbsolute("Ice.Current", scope) << " current = null)";
+ _out << nl << "public override string[] ice_ids(" << getUnqualified("Ice.Current", scope) << " current = null)";
_out << sb;
_out << nl << "return _ids;";
_out << eb;
@@ -450,7 +450,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override string ice_id(" << getAbsolute("Ice.Current", scope) << " current = null)";
+ _out << nl << "public override string ice_id(" << getUnqualified("Ice.Current", scope) << " current = null)";
_out << sb;
_out << nl << "return _ids[" << scopedPos << "];";
_out << eb;
@@ -488,16 +488,16 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public static _System.Threading.Tasks.Task<" << getAbsolute("Ice.OutputStream", scope) << ">";
+ _out << nl << "public static _System.Threading.Tasks.Task<" << getUnqualified("Ice.OutputStream", scope) << ">";
_out << nl << "iceD_" << opName << "(" << name << (p->isInterface() ? "" : "Disp_") << " obj, "
- << "IceInternal.Incoming inS, " << getAbsolute("Ice.Current", scope) << " current)";
+ << "IceInternal.Incoming inS, " << getUnqualified("Ice.Current", scope) << " current)";
_out << sb;
TypePtr ret = op->returnType();
ParamDeclList inParams = op->inParameters();
ParamDeclList outParams = op->outParameters();
- _out << nl << getAbsolute("Ice.ObjectImpl", scope) << ".iceCheckMode(" << sliceModeToIceMode(op->mode())
+ _out << nl << getUnqualified("Ice.ObjectImpl", scope) << ".iceCheckMode(" << sliceModeToIceMode(op->mode())
<< ", current.mode);";
if(!inParams.empty())
{
@@ -516,7 +516,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
_out << nl << typeS << ' ' << param;
if(isClass)
{
- _out << " = " << getAbsolute("Ice.Util", scope) << ".None";
+ _out << " = " << getUnqualified("Ice.Util", scope) << ".None";
}
_out << ';';
}
@@ -668,13 +668,13 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
emitGeneratedCodeAttribute();
}
_out << nl << "public override _System.Threading.Tasks.Task<Ice.OutputStream>";
- _out << nl << "iceDispatch(IceInternal.Incoming inS, " << getAbsolute("Ice.Current", scope) << " current)";
+ _out << nl << "iceDispatch(IceInternal.Incoming inS, " << getUnqualified("Ice.Current", scope) << " current)";
_out << sb;
_out << nl << "int pos = _System.Array.BinarySearch(_all, current.operation, "
<< "IceUtilInternal.StringUtil.OrdinalStringComparer);";
_out << nl << "if(pos < 0)";
_out << sb;
- _out << nl << "throw new " << getAbsolute("Ice.OperationNotExistException", scope)
+ _out << nl << "throw new " << getUnqualified("Ice.OperationNotExistException", scope)
<< "(current.id, current.facet, current.operation);";
_out << eb;
_out << sp << nl << "switch(pos)";
@@ -688,19 +688,19 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
_out << sb;
if(opName == "ice_id")
{
- _out << nl << "return " << getAbsolute("Ice.ObjectImpl", scope) << ".iceD_ice_id(this, inS, current);";
+ _out << nl << "return " << getUnqualified("Ice.ObjectImpl", scope) << ".iceD_ice_id(this, inS, current);";
}
else if(opName == "ice_ids")
{
- _out << nl << "return " << getAbsolute("Ice.ObjectImpl", scope) << ".iceD_ice_ids(this, inS, current);";
+ _out << nl << "return " << getUnqualified("Ice.ObjectImpl", scope) << ".iceD_ice_ids(this, inS, current);";
}
else if(opName == "ice_isA")
{
- _out << nl << "return " << getAbsolute("Ice.ObjectImpl", scope) << ".iceD_ice_isA(this, inS, current);";
+ _out << nl << "return " << getUnqualified("Ice.ObjectImpl", scope) << ".iceD_ice_isA(this, inS, current);";
}
else if(opName == "ice_ping")
{
- _out << nl << "return " << getAbsolute("Ice.ObjectImpl", scope) << ".iceD_ice_ping(this, inS, current);";
+ _out << nl << "return " << getUnqualified("Ice.ObjectImpl", scope) << ".iceD_ice_ping(this, inS, current);";
}
else
{
@@ -720,7 +720,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
}
else
{
- _out << nl << "return " << getAbsolute(fixId(cl->scoped() + "Disp_"), scope) << ".iceD_"
+ _out << nl << "return " << getUnqualified(fixId(cl->scoped() + "Disp_"), scope) << ".iceD_"
<< opName << "(this, inS, current);";
}
break;
@@ -731,7 +731,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
}
_out << eb;
_out << sp << nl << "_System.Diagnostics.Debug.Assert(false);";
- _out << nl << "throw new " << getAbsolute("Ice.OperationNotExistException", scope)
+ _out << nl << "throw new " << getUnqualified("Ice.OperationNotExistException", scope)
<< "(current.id, current.facet, current.operation);";
_out << eb;
}
@@ -787,7 +787,7 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override " << getAbsolute("Ice.SlicedData", scope) << " ice_getSlicedData()";
+ _out << nl << "public override " << getUnqualified("Ice.SlicedData", scope) << " ice_getSlicedData()";
_out << sb;
_out << nl << "return iceSlicedData_;";
_out << eb;
@@ -797,7 +797,7 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override void iceWrite(" << getAbsolute("Ice.OutputStream", scope) << " ostr_)";
+ _out << nl << "public override void iceWrite(" << getUnqualified("Ice.OutputStream", scope) << " ostr_)";
_out << sb;
_out << nl << "ostr_.startValue(iceSlicedData_);";
_out << nl << "iceWriteImpl(ostr_);";
@@ -809,7 +809,7 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override void iceRead(" << getAbsolute("Ice.InputStream", scope) << " istr_)";
+ _out << nl << "public override void iceRead(" << getUnqualified("Ice.InputStream", scope) << " istr_)";
_out << sb;
_out << nl << "istr_.startValue();";
_out << nl << "iceReadImpl(istr_);";
@@ -822,7 +822,7 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "protected override void iceWriteImpl(" << getAbsolute("Ice.OutputStream", scope) << " ostr_)";
+ _out << nl << "protected override void iceWriteImpl(" << getUnqualified("Ice.OutputStream", scope) << " ostr_)";
_out << sb;
_out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
@@ -848,7 +848,7 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "protected override void iceReadImpl(" << getAbsolute("Ice.InputStream", scope) << " istr_)";
+ _out << nl << "protected override void iceReadImpl(" << getUnqualified("Ice.InputStream", scope) << " istr_)";
_out << sb;
_out << nl << "istr_.startSlice();";
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
@@ -871,7 +871,7 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
if(preserved && !basePreserved)
{
- _out << sp << nl << "protected " << getAbsolute("Ice.SlicedData", scope) << " iceSlicedData_;";
+ _out << sp << nl << "protected " << getUnqualified("Ice.SlicedData", scope) << " iceSlicedData_;";
}
_out << sp << nl << "#endregion"; // Marshalling support
@@ -1022,7 +1022,7 @@ Slice::CsVisitor::getDispatchParams(const OperationPtr& op, string& retS, vector
}
string currentParamName = getEscapedParamName(op, "current");
- params.push_back(getAbsolute("Ice.Current", scope) + " " + currentParamName + " = null");
+ params.push_back(getUnqualified("Ice.Current", scope) + " " + currentParamName + " = null");
args.push_back(currentParamName);
return name;
}
@@ -2219,12 +2219,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "public partial interface " << fixId(name);
if(!p->isLocal())
{
- baseNames.push_back(getAbsolute("Ice.Object", scope));
+ baseNames.push_back(getUnqualified("Ice.Object", scope));
baseNames.push_back(name + "Operations_");
}
for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q)
{
- baseNames.push_back(getAbsolute(fixId((*q)->scoped()), scope));
+ baseNames.push_back(getUnqualified(fixId((*q)->scoped()), scope));
}
}
else
@@ -2290,7 +2290,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << ", ";
}
- _out << getAbsolute(*q, scope);
+ _out << getUnqualified(*q, scope);
}
}
@@ -2520,8 +2520,8 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p)
{
_out << "public abstract ";
}
- _out << getAbsolute("Ice.AsyncResult", scope) << " begin_" << name << spar << inParams
- << getAbsolute("Ice.AsyncCallback", scope) + " " + getEscapedParamName(p, "callback") + " = null"
+ _out << getUnqualified("Ice.AsyncResult", scope) << " begin_" << name << spar << inParams
+ << getUnqualified("Ice.AsyncCallback", scope) + " " + getEscapedParamName(p, "callback") + " = null"
<< "object " + getEscapedParamName(p, "cookie") + " = null" << epar << ';';
_out << sp;
@@ -2533,7 +2533,7 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p)
_out << "public abstract ";
}
_out << retS << " end_" << name << spar << getOutParams(p, scope, false, true)
- << (getAbsolute("Ice.AsyncResult", scope) + " " + getEscapedParamName(p, "asyncResult")) << epar << ';';
+ << (getUnqualified("Ice.AsyncResult", scope) + " " + getEscapedParamName(p, "asyncResult")) << epar << ';';
}
}
}
@@ -2568,11 +2568,11 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
_out << nl << "public partial class " << name << " : ";
if(base)
{
- _out << getAbsolute(fixId(base->scoped()), scope);
+ _out << getUnqualified(fixId(base->scoped()), scope);
}
else
{
- _out << getAbsolute(p->isLocal() ? "Ice.LocalException" : "Ice.UserException", scope);
+ _out << getUnqualified(p->isLocal() ? "Ice.LocalException" : "Ice.UserException", scope);
}
_out << sb;
@@ -2835,14 +2835,14 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override " << getAbsolute("Ice.SlicedData", scope) << " ice_getSlicedData()";
+ _out << nl << "public override " << getUnqualified("Ice.SlicedData", scope) << " ice_getSlicedData()";
_out << sb;
_out << nl << "return slicedData_;";
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override void iceWrite(" << getAbsolute("Ice.OutputStream", scope) << " ostr_)";
+ _out << nl << "public override void iceWrite(" << getUnqualified("Ice.OutputStream", scope) << " ostr_)";
_out << sb;
_out << nl << "ostr_.startException(slicedData_);";
_out << nl << "iceWriteImpl(ostr_);";
@@ -2851,7 +2851,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override void iceRead(" << getAbsolute("Ice.InputStream", scope) << " istr_)";
+ _out << nl << "public override void iceRead(" << getUnqualified("Ice.InputStream", scope) << " istr_)";
_out << sb;
_out << nl << "istr_.startException();";
_out << nl << "iceReadImpl(istr_);";
@@ -2861,7 +2861,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "protected override void iceWriteImpl(" << getAbsolute("Ice.OutputStream", scope) << " ostr_)";
+ _out << nl << "protected override void iceWriteImpl(" << getUnqualified("Ice.OutputStream", scope) << " ostr_)";
_out << sb;
_out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
@@ -2877,7 +2877,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "protected override void iceReadImpl(" << getAbsolute("Ice.InputStream", scope) << " istr_)";
+ _out << nl << "protected override void iceReadImpl(" << getUnqualified("Ice.InputStream", scope) << " istr_)";
_out << sb;
_out << nl << "istr_.startSlice();";
@@ -2904,7 +2904,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- _out << sp << nl << "protected " << getAbsolute("Ice.SlicedData", scope) << " slicedData_;";
+ _out << sp << nl << "protected " << getUnqualified("Ice.SlicedData", scope) << " slicedData_;";
}
_out << sp << nl << "#endregion"; // Marshalling support
@@ -2955,7 +2955,7 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
{
_out << ", ";
}
- _out << getAbsolute(*q, scope);
+ _out << getUnqualified(*q, scope);
}
}
@@ -3116,7 +3116,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public void ice_writeMembers(" << getAbsolute("Ice.OutputStream", scope) << " ostr)";
+ _out << nl << "public void ice_writeMembers(" << getUnqualified("Ice.OutputStream", scope) << " ostr)";
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -3126,7 +3126,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public void ice_readMembers(" << getAbsolute("Ice.InputStream", scope) << " istr)";
+ _out << nl << "public void ice_readMembers(" << getUnqualified("Ice.InputStream", scope) << " istr)";
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -3136,7 +3136,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static void ice_write(" << getAbsolute("Ice.OutputStream", scope) << " ostr, " << name
+ _out << nl << "public static void ice_write(" << getUnqualified("Ice.OutputStream", scope) << " ostr, " << name
<< " v)";
_out << sb;
if(isClass)
@@ -3158,7 +3158,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static " << name << " ice_read(" << getAbsolute("Ice.InputStream", scope) << " istr)";
+ _out << nl << "public static " << name << " ice_read(" << getUnqualified("Ice.InputStream", scope) << " istr)";
_out << sb;
_out << nl << "var v = new " << name << "();";
_out << nl << "v.ice_readMembers(istr);";
@@ -3216,14 +3216,14 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
_out << nl << "public sealed class " << p->name() << "Helper";
_out << sb;
_out << sp;
- _out << nl << "public static void write(" << getAbsolute("Ice.OutputStream", scope) << " ostr, " << name << " v)";
+ _out << nl << "public static void write(" << getUnqualified("Ice.OutputStream", scope) << " ostr, " << name << " v)";
_out << sb;
writeMarshalUnmarshalCode(_out, p, scope, "v", true);
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static " << name << " read(" << getAbsolute("Ice.InputStream", scope) << " istr)";
+ _out << nl << "public static " << name << " read(" << getUnqualified("Ice.InputStream", scope) << " istr)";
_out << sb;
_out << nl << name << " v;";
writeMarshalUnmarshalCode(_out, p, scope, "v", false);
@@ -3601,14 +3601,14 @@ Slice::Gen::ResultVisitor::visitOperation(const OperationPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public struct " << name << " : " << getAbsolute("Ice.MarshaledResult", scope);
+ _out << nl << "public struct " << name << " : " << getUnqualified("Ice.MarshaledResult", scope);
_out << sb;
//
// One shot constructor
//
_out << nl << "public " << name << spar << getOutParams(p, scope, true, false)
- << getAbsolute("Ice.Current", scope) + " current" << epar;
+ << getUnqualified("Ice.Current", scope) + " current" << epar;
_out << sb;
_out << nl << "_ostr = IceInternal.Incoming.createResponseOutputStream(current);";
_out << nl << "_ostr.startEncapsulation(current.encoding, " << opFormatTypeToString(p) << ");";
@@ -3620,8 +3620,8 @@ Slice::Gen::ResultVisitor::visitOperation(const OperationPtr& p)
_out << nl << "_ostr.endEncapsulation();";
_out << eb;
_out << sp;
- _out << nl << "public " << getAbsolute("Ice.OutputStream", scope) << " getOutputStream("
- << getAbsolute("Ice.Current", scope) << " current)";
+ _out << nl << "public " << getUnqualified("Ice.OutputStream", scope) << " getOutputStream("
+ << getUnqualified("Ice.Current", scope) << " current)";
_out << sb;
_out << nl << "if(_ostr == null)";
_out << sb;
@@ -3639,7 +3639,7 @@ Slice::Gen::ResultVisitor::visitOperation(const OperationPtr& p)
_out << nl << "return _ostr;";
_out << eb;
_out << sp;
- _out << nl << "private " << getAbsolute("Ice.OutputStream", scope) << " _ostr;";
+ _out << nl << "private " << getUnqualified("Ice.OutputStream", scope) << " _ostr;";
_out << eb;
}
}
@@ -3691,13 +3691,13 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
ClassDefPtr def = *q;
if(def->isInterface() || def->allOperations().size() > 0)
{
- baseInterfaces.push_back(getAbsolute(fixId((*q)->scoped() + "Prx"), scope));
+ baseInterfaces.push_back(getUnqualified(fixId((*q)->scoped() + "Prx"), scope));
}
}
if(baseInterfaces.empty())
{
- baseInterfaces.push_back(getAbsolute("Ice.ObjectPrx", scope));
+ baseInterfaces.push_back(getUnqualified("Ice.ObjectPrx", scope));
}
for(vector<string>::const_iterator q = baseInterfaces.begin(); q != baseInterfaces.end();)
@@ -3743,8 +3743,8 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
_out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
}
_out << nl << retS << " " << name << spar << getParams(p, scope)
- << (getAbsolute("Ice.OptionalContext", scope) + " " + context + " = new " +
- getAbsolute("Ice.OptionalContext", scope) + "()") << epar << ';';
+ << (getUnqualified("Ice.OptionalContext", scope) + " " + context + " = new " +
+ getUnqualified("Ice.OptionalContext", scope) + "()") << epar << ';';
}
{
@@ -3766,8 +3766,8 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
}
_out << nl << taskResultType(p, scope);
_out << " " << p->name() << "Async" << spar << inParams
- << (getAbsolute("Ice.OptionalContext", scope) + " " + context + " = new " +
- getAbsolute("Ice.OptionalContext", scope) + "()")
+ << (getUnqualified("Ice.OptionalContext", scope) + " " + context + " = new " +
+ getUnqualified("Ice.OptionalContext", scope) + "()")
<< ("_System.IProgress<bool> " + progress + " = null")
<< ("_System.Threading.CancellationToken " + cancel + " = new _System.Threading.CancellationToken()")
<< epar << ";";
@@ -3791,10 +3791,10 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
_out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
}
- _out << nl << getAbsolute("Ice.AsyncResult", scope) << "<" << delType << "> begin_" << p->name() << spar
+ _out << nl << getUnqualified("Ice.AsyncResult", scope) << "<" << delType << "> begin_" << p->name() << spar
<< inParams
- << (getAbsolute("Ice.OptionalContext", scope) + " " + context + " = new " +
- getAbsolute("Ice.OptionalContext", scope) + "()") << epar << ';';
+ << (getUnqualified("Ice.OptionalContext", scope) + " " + context + " = new " +
+ getUnqualified("Ice.OptionalContext", scope) + "()") << epar << ';';
//
// Type-unsafe begin_ methods.
@@ -3807,8 +3807,8 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
_out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
}
- _out << nl << getAbsolute("Ice.AsyncResult", scope) << " begin_" << p->name() << spar << inParams
- << getAbsolute("Ice.AsyncCallback", scope) + " " + callback << "object " + cookie << epar << ';';
+ _out << nl << getUnqualified("Ice.AsyncResult", scope) << " begin_" << p->name() << spar << inParams
+ << getUnqualified("Ice.AsyncCallback", scope) + " " + callback << "object " + cookie << epar << ';';
_out << sp;
writeDocCommentAMI(p, InParam, deprecateReason,
@@ -3819,9 +3819,9 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
_out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
}
- _out << nl << getAbsolute("Ice.AsyncResult", scope) << " begin_" << p->name() << spar << inParams
- << getAbsolute("Ice.OptionalContext", scope) + " " + context
- << getAbsolute("Ice.AsyncCallback", scope) + " " + callback
+ _out << nl << getUnqualified("Ice.AsyncResult", scope) << " begin_" << p->name() << spar << inParams
+ << getUnqualified("Ice.OptionalContext", scope) + " " + context
+ << getUnqualified("Ice.AsyncCallback", scope) + " " + callback
<< "object " + cookie << epar << ';';
//
@@ -3835,7 +3835,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
_out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
}
_out << nl << retS << " end_" << p->name() << spar << getOutParams(p, scope, false, true)
- << getAbsolute("Ice.AsyncResult", scope) + " " + asyncResult << epar << ';';
+ << getUnqualified("Ice.AsyncResult", scope) + " " + asyncResult << epar << ';';
}
}
@@ -3960,7 +3960,7 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
}
string s = (*q)->scoped();
s += "Operations";
- _out << getAbsolute(fixId(s), scope) << '_';
+ _out << getUnqualified(fixId(s), scope) << '_';
}
++q;
}
@@ -4036,7 +4036,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
emitComVisibleAttribute();
emitGeneratedCodeAttribute();
_out << nl << "[_System.Serializable]";
- _out << nl << "public sealed class " << name << "PrxHelper : " << getAbsolute("Ice.ObjectPrxHelperBase", scope)
+ _out << nl << "public sealed class " << name << "PrxHelper : " << getUnqualified("Ice.ObjectPrxHelperBase", scope)
<< ", " << name << "Prx";
_out << sb;
@@ -4095,8 +4095,8 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp;
_out << nl << "public " << retS << " " << opName << spar << params
- << (getAbsolute("Ice.OptionalContext", scope) + " " + context + " = new " +
- getAbsolute("Ice.OptionalContext", scope) + "()") << epar;
+ << (getUnqualified("Ice.OptionalContext", scope) + " " + context + " = new " +
+ getUnqualified("Ice.OptionalContext", scope) + "()") << epar;
_out << sb;
_out << nl << "try";
_out << sb;
@@ -4209,8 +4209,8 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << "<" << returnTypeS << ">";
}
_out << " " << opName << "Async" << spar << paramsAMI
- << (getAbsolute("Ice.OptionalContext", scope) + " " + context + " = new " +
- getAbsolute("Ice.OptionalContext", scope) + "()")
+ << (getUnqualified("Ice.OptionalContext", scope) + " " + context + " = new " +
+ getUnqualified("Ice.OptionalContext", scope) + "()")
<< ("_System.IProgress<bool> " + progress + " = null")
<< ("_System.Threading.CancellationToken " + cancel + " = new _System.Threading.CancellationToken()")
<< epar;
@@ -4230,7 +4230,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << "<" << returnTypeS << ">";
}
_out << " _iceI_" << opName << "Async" << spar << getInParams(op, scope, true)
- << getAbsolute("Ice.OptionalContext", scope) + " context"
+ << getUnqualified("Ice.OptionalContext", scope) + " context"
<< "_System.IProgress<bool> progress"
<< "_System.Threading.CancellationToken cancel"
<< "bool synchronous" << epar;
@@ -4289,7 +4289,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!inParams.empty())
{
_out << ",";
- _out << nl << "write: (" << getAbsolute("Ice.OutputStream", scope) << " ostr) =>";
+ _out << nl << "write: (" << getUnqualified("Ice.OutputStream", scope) << " ostr) =>";
_out << sb;
writeMarshalUnmarshalParams(inParams, 0, true, scope);
if(op->sendsClasses(false))
@@ -4302,7 +4302,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!throws.empty())
{
_out << ",";
- _out << nl << "userException: (" << getAbsolute("Ice.UserException", scope) << " ex) =>";
+ _out << nl << "userException: (" << getUnqualified("Ice.UserException", scope) << " ex) =>";
_out << sb;
_out << nl << "try";
_out << sb;
@@ -4314,13 +4314,13 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
//
for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
{
- _out << nl << "catch(" << getAbsolute(fixId((*i)->scoped()), scope) << ")";
+ _out << nl << "catch(" << getUnqualified(fixId((*i)->scoped()), scope) << ")";
_out << sb;
_out << nl << "throw;";
_out << eb;
}
- _out << nl << "catch(" << getAbsolute("Ice.UserException", scope) << ")";
+ _out << nl << "catch(" << getUnqualified("Ice.UserException", scope) << ")";
_out << sb;
_out << eb;
@@ -4330,7 +4330,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
if(ret || !outParams.empty())
{
_out << ",";
- _out << nl << "read: (" << getAbsolute("Ice.InputStream", scope) << " istr) =>";
+ _out << nl << "read: (" << getUnqualified("Ice.InputStream", scope) << " istr) =>";
_out << sb;
if(outParams.empty())
{
@@ -4349,7 +4349,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else if(isClassType(ret))
{
- _out << " = " << getAbsolute("Ice.Util", scope) << ".None";
+ _out << " = " << getUnqualified("Ice.Util", scope) << ".None";
}
_out << ";";
}
@@ -4376,7 +4376,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else if(isClassType(t))
{
- _out << " = " << getAbsolute("Ice.Util", scope) << ".None";
+ _out << " = " << getUnqualified("Ice.Util", scope) << ".None";
}
_out << ";";
}
@@ -4428,33 +4428,33 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
// Write the begin_ methods.
//
string clScope = fixId(cl->scope());
- string delType = getAbsolute(clScope + "Callback_" + cl->name() + "_" + op->name(), scope);
+ string delType = getUnqualified(clScope + "Callback_" + cl->name() + "_" + op->name(), scope);
string context = getEscapedParamName(op, "context");
string callback = getEscapedParamName(op, "callback");
string cookie = getEscapedParamName(op, "cookie");
_out << sp;
- _out << nl << "public " << getAbsolute("Ice.AsyncResult", scope) << "<" << delType << "> begin_" << opName
- << spar << paramsAMI << (getAbsolute("Ice.OptionalContext", scope) + " " + context + " = new " +
- getAbsolute("Ice.OptionalContext", scope) + "()") << epar;
+ _out << nl << "public " << getUnqualified("Ice.AsyncResult", scope) << "<" << delType << "> begin_" << opName
+ << spar << paramsAMI << (getUnqualified("Ice.OptionalContext", scope) + " " + context + " = new " +
+ getUnqualified("Ice.OptionalContext", scope) + "()") << epar;
_out << sb;
_out << nl << "return begin_" << opName << spar << argsAMI << context << "null" << "null" << "false"
<< epar << ';';
_out << eb;
_out << sp;
- _out << nl << "public " << getAbsolute("Ice.AsyncResult", scope) << " begin_" << opName << spar << paramsAMI
- << getAbsolute("Ice.AsyncCallback", scope) + " " + callback << "object " + cookie << epar;
+ _out << nl << "public " << getUnqualified("Ice.AsyncResult", scope) << " begin_" << opName << spar << paramsAMI
+ << getUnqualified("Ice.AsyncCallback", scope) + " " + callback << "object " + cookie << epar;
_out << sb;
_out << nl << "return begin_" << opName << spar << argsAMI
- << "new " + getAbsolute("Ice.OptionalContext", scope) + "()" << callback << cookie << "false" << epar << ';';
+ << "new " + getUnqualified("Ice.OptionalContext", scope) + "()" << callback << cookie << "false" << epar << ';';
_out << eb;
_out << sp;
- _out << nl << "public " << getAbsolute("Ice.AsyncResult", scope) + " begin_" << opName << spar << paramsAMI
- << getAbsolute("Ice.OptionalContext", scope) + " " + context
- << getAbsolute("Ice.AsyncCallback", scope) + " " + callback
+ _out << nl << "public " << getUnqualified("Ice.AsyncResult", scope) + " begin_" << opName << spar << paramsAMI
+ << getUnqualified("Ice.OptionalContext", scope) + " " + context
+ << getUnqualified("Ice.AsyncCallback", scope) + " " + callback
<< "object " + cookie << epar;
_out << sb;
_out << nl << "return begin_" << opName << spar << argsAMI << context << callback
@@ -4468,7 +4468,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
string asyncResult = getEscapedParamName(op, "asyncResult");
_out << sp << nl << "public " << retS << " end_" << opName << spar << getOutParams(op, scope, false, true)
- << getAbsolute("Ice.AsyncResult", scope) + " " + asyncResult << epar;
+ << getUnqualified("Ice.AsyncResult", scope) + " " + asyncResult << epar;
_out << sb;
_out << nl << "var resultI_ = IceInternal.AsyncResultI.check(" + asyncResult + ", this, " << flatName << ");";
@@ -4508,10 +4508,10 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
// Write the common begin_ implementation.
//
_out << sp;
- _out << nl << "private " << getAbsolute("Ice.AsyncResult", scope) << "<" << delType << "> begin_" << opName << spar
+ _out << nl << "private " << getUnqualified("Ice.AsyncResult", scope) << "<" << delType << "> begin_" << opName << spar
<< getInParams(op, scope, true)
<< "_System.Collections.Generic.Dictionary<string, string> context"
- << getAbsolute("Ice.AsyncCallback", scope) + " completedCallback" << "object cookie" << "bool synchronous"
+ << getUnqualified("Ice.AsyncCallback", scope) + " completedCallback" << "object cookie" << "bool synchronous"
<< epar;
_out << sb;
@@ -4565,7 +4565,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "#endregion"; // Asynchronous operations
_out << sp << nl << "#region Checked and unchecked cast operations";
- _out << sp << nl << "public static " << name << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", scope) << " b)";
+ _out << sp << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", scope) << " b)";
_out << sb;
_out << nl << "if(b == null)";
_out << sb;
@@ -4582,7 +4582,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << sp << nl << "public static " << name
- << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", scope)
+ << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", scope)
<< " b, _System.Collections.Generic.Dictionary<string, string> ctx)";
_out << sb;
_out << nl << "if(b == null)";
@@ -4599,14 +4599,14 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "return r;";
_out << eb;
- _out << sp << nl << "public static " << name << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", scope)
+ _out << sp << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", scope)
<< " b, string f)";
_out << sb;
_out << nl << "if(b == null)";
_out << sb;
_out << nl << "return null;";
_out << eb;
- _out << nl << getAbsolute("Ice.ObjectPrx", scope) << " bb = b.ice_facet(f);";
+ _out << nl << getUnqualified("Ice.ObjectPrx", scope) << " bb = b.ice_facet(f);";
_out << nl << "try";
_out << sb;
_out << nl << "if(bb.ice_isA(ice_staticId()))";
@@ -4616,21 +4616,21 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "return h;";
_out << eb;
_out << eb;
- _out << nl << "catch(" << getAbsolute("Ice.FacetNotExistException", scope) << ")";
+ _out << nl << "catch(" << getUnqualified("Ice.FacetNotExistException", scope) << ")";
_out << sb;
_out << eb;
_out << nl << "return null;";
_out << eb;
_out << sp << nl << "public static " << name
- << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", scope) << " b, string f, "
+ << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", scope) << " b, string f, "
<< "_System.Collections.Generic.Dictionary<string, string> ctx)";
_out << sb;
_out << nl << "if(b == null)";
_out << sb;
_out << nl << "return null;";
_out << eb;
- _out << nl << getAbsolute("Ice.ObjectPrx", scope) << " bb = b.ice_facet(f);";
+ _out << nl << getUnqualified("Ice.ObjectPrx", scope) << " bb = b.ice_facet(f);";
_out << nl << "try";
_out << sb;
_out << nl << "if(bb.ice_isA(ice_staticId(), ctx))";
@@ -4640,13 +4640,13 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "return h;";
_out << eb;
_out << eb;
- _out << nl << "catch(" << getAbsolute("Ice.FacetNotExistException", scope) << ")";
+ _out << nl << "catch(" << getUnqualified("Ice.FacetNotExistException", scope) << ")";
_out << sb;
_out << eb;
_out << nl << "return null;";
_out << eb;
- _out << sp << nl << "public static " << name << "Prx uncheckedCast(" << getAbsolute("Ice.ObjectPrx", scope) << " b)";
+ _out << sp << nl << "public static " << name << "Prx uncheckedCast(" << getUnqualified("Ice.ObjectPrx", scope) << " b)";
_out << sb;
_out << nl << "if(b == null)";
_out << sb;
@@ -4662,14 +4662,14 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "return r;";
_out << eb;
- _out << sp << nl << "public static " << name << "Prx uncheckedCast(" << getAbsolute("Ice.ObjectPrx", scope)
+ _out << sp << nl << "public static " << name << "Prx uncheckedCast(" << getUnqualified("Ice.ObjectPrx", scope)
<< " b, string f)";
_out << sb;
_out << nl << "if(b == null)";
_out << sb;
_out << nl << "return null;";
_out << eb;
- _out << nl << getAbsolute("Ice.ObjectPrx", scope) << " bb = b.ice_facet(f);";
+ _out << nl << getUnqualified("Ice.ObjectPrx", scope) << " bb = b.ice_facet(f);";
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
_out << nl << "h.iceCopyFrom(bb);";
_out << nl << "return h;";
@@ -4719,15 +4719,15 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "#region Marshaling support";
- _out << sp << nl << "public static void write(" << getAbsolute("Ice.OutputStream", scope) << " ostr, " << name
+ _out << sp << nl << "public static void write(" << getUnqualified("Ice.OutputStream", scope) << " ostr, " << name
<< "Prx v)";
_out << sb;
_out << nl << "ostr.writeProxy(v);";
_out << eb;
- _out << sp << nl << "public static " << name << "Prx read(" << getAbsolute("Ice.InputStream", scope) << " istr)";
+ _out << sp << nl << "public static " << name << "Prx read(" << getUnqualified("Ice.InputStream", scope) << " istr)";
_out << sb;
- _out << nl << getAbsolute("Ice.ObjectPrx", scope) << " proxy = istr.readProxy();";
+ _out << nl << getUnqualified("Ice.ObjectPrx", scope) << " proxy = istr.readProxy();";
_out << nl << "if(proxy != null)";
_out << sb;
_out << nl << name << "PrxHelper result = new " << name << "PrxHelper();";
@@ -4766,13 +4766,13 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
_out << nl << "public sealed class " << p->name() << "Helper";
_out << sb;
- _out << sp << nl << "public static void write(" << getAbsolute("Ice.OutputStream", scope) << " ostr, " << typeS
+ _out << sp << nl << "public static void write(" << getUnqualified("Ice.OutputStream", scope) << " ostr, " << typeS
<< " v)";
_out << sb;
writeSequenceMarshalUnmarshalCode(_out, p, scope, "v", true, false);
_out << eb;
- _out << sp << nl << "public static " << typeS << " read(" << getAbsolute("Ice.InputStream", scope) << " istr)";
+ _out << sp << nl << "public static " << typeS << " read(" << getUnqualified("Ice.InputStream", scope) << " istr)";
_out << sb;
_out << nl << typeS << " v;";
writeSequenceMarshalUnmarshalCode(_out, p, scope, "v", false, false);
@@ -4852,7 +4852,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "public static void write(";
_out.useCurrentPosAsIndent();
- _out << getAbsolute("Ice.OutputStream", scope) << " ostr,";
+ _out << getUnqualified("Ice.OutputStream", scope) << " ostr,";
_out << nl << name << " v)";
_out.restoreIndent();
_out << sb;
@@ -4873,7 +4873,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << eb;
_out << eb;
- _out << sp << nl << "public static " << name << " read(" << getAbsolute("Ice.InputStream", scope) << " istr)";
+ _out << sp << nl << "public static " << name << " read(" << getUnqualified("Ice.InputStream", scope) << " istr)";
_out << sb;
_out << nl << "int sz = istr.readSize();";
_out << nl << name << " r = new " << name << "();";
@@ -4962,7 +4962,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
bool hasBaseClass = !bases.empty() && !bases.front()->isInterface();
string name = p->name();
string scope = fixId(p->scope());
- string baseClass = getAbsolute("Ice.ObjectImpl", scope);
+ string baseClass = getUnqualified("Ice.ObjectImpl", scope);
if(hasBaseClass && !bases.front()->allOperations().empty())
{
baseClass = fixId(bases.front()->scoped() + "Disp_");
@@ -4992,7 +4992,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
for(ClassList::const_iterator i = allBases.begin(); i != allBases.end(); ++i)
{
- _out << ", " << getAbsolute(fixId((*i)->scoped()), scope);
+ _out << ", " << getUnqualified(fixId((*i)->scoped()), scope);
}
}
@@ -5032,7 +5032,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp;
emitComVisibleAttribute();
emitGeneratedCodeAttribute();
- _out << nl << "public class " << name << "Tie_ : " << name << "Disp_, " << getAbsolute("Ice.TieBase", scope);
+ _out << nl << "public class " << name << "Tie_ : " << name << "Disp_, " << getUnqualified("Ice.TieBase", scope);
_out << sb;
@@ -5193,7 +5193,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
{
_out << "<" << resultType << ">";
}
- _out << " " << opName << "Async" << spar << pDecl << getAbsolute("Ice.Current", scope) + " current = null"
+ _out << " " << opName << "Async" << spar << pDecl << getUnqualified("Ice.Current", scope) + " current = null"
<< epar;
if(comment)
@@ -5275,7 +5275,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
_out << retS << ' ' << fixId(opName, DotNet::ICloneable, true) << spar << pDecls;
if(!cl->isLocal())
{
- _out << getAbsolute("Ice.Current", scope) + " current = null";
+ _out << getUnqualified("Ice.Current", scope) + " current = null";
}
_out << epar;
if(comment)
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index fb79c634628..2db53d50907 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -162,11 +162,11 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package,
string abs;
if(c->isInterface())
{
- abs = getAbsolute(c, package);
+ abs = getUnqualified(c, package);
}
else
{
- abs = getAbsolute(c, package, "", "Disp");
+ abs = getUnqualified(c, package, "", "Disp");
}
string name = op->name();
name[0] = toupper(static_cast<unsigned char>(name[0]));
@@ -176,7 +176,7 @@ Slice::JavaVisitor::getResultType(const OperationPtr& op, const string& package,
{
const ContainedPtr c = ContainedPtr::dynamicCast(op->container());
assert(c);
- const string abs = getAbsolute(c, package);
+ const string abs = getUnqualified(c, package);
string name = op->name();
name[0] = toupper(static_cast<unsigned char>(name[0]));
return abs + "." + name + "Result";
@@ -397,7 +397,7 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s
ParamDeclList required, optional;
op->outParameters(required, optional);
- out << sp << nl << "public void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
int iter = 0;
@@ -441,7 +441,7 @@ Slice::JavaVisitor::writeResultType(Output& out, const OperationPtr& op, const s
out << eb;
- out << sp << nl << "public void read(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public void read(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr)";
out << sb;
iter = 0;
@@ -505,12 +505,12 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op
opName[0] = toupper(static_cast<unsigned char>(opName[0]));
out << sp << nl << "public static class " << opName << "MarshaledResult implements "
- << getAbsolute("com.zeroc.Ice.MarshaledResult", package) << sb;
+ << getUnqualified("com.zeroc.Ice.MarshaledResult", package) << sb;
const ParamDeclList outParams = op->outParameters();
const string retval = getEscapedParamName(op, "returnValue");
const string currentParamName = getEscapedParamName(op, "current");
- const string currentParam = getAbsolute("com.zeroc.Ice.Current", package) + " " + currentParamName;
+ const string currentParam = getUnqualified("com.zeroc.Ice.Current", package) + " " + currentParamName;
out << sp;
@@ -559,7 +559,7 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op
}
out << currentParam << epar;
out << sb;
- out << nl << "_ostr = " << getAbsolute("com.zeroc.IceInternal.Incoming", package) << ".createResponseOutputStream("
+ out << nl << "_ostr = " << getUnqualified("com.zeroc.IceInternal.Incoming", package) << ".createResponseOutputStream("
<< currentParamName << ");";
out << nl << "_ostr.startEncapsulation(" << currentParamName << ".encoding, " << opFormatTypeToString(op) << ");";
@@ -690,13 +690,13 @@ Slice::JavaVisitor::writeMarshaledResultType(Output& out, const OperationPtr& op
out << sp;
out << nl << "@Override"
- << nl << "public " << getAbsolute("com.zeroc.Ice.OutputStream", package) << " getOutputStream()"
+ << nl << "public " << getUnqualified("com.zeroc.Ice.OutputStream", package) << " getOutputStream()"
<< sb
<< nl << "return _ostr;"
<< eb;
out << sp;
- out << nl << "private " << getAbsolute("com.zeroc.Ice.OutputStream", package) << " _ostr;";
+ out << nl << "private " << getUnqualified("com.zeroc.Ice.OutputStream", package) << " _ostr;";
out << eb;
}
@@ -711,11 +711,11 @@ Slice::JavaVisitor::allocatePatcher(Output& out, const TypePtr& type, const stri
string clsName;
if(b || cl->isInterface())
{
- clsName = getAbsolute("com.zeroc.Ice.Value", package);
+ clsName = getUnqualified("com.zeroc.Ice.Value", package);
}
else
{
- clsName = getAbsolute(cl, package);
+ clsName = getUnqualified(cl, package);
}
if(optionalMapping)
{
@@ -736,11 +736,11 @@ Slice::JavaVisitor::getPatcher(const TypePtr& type, const string& package, const
string clsName;
if(b || cl->isInterface())
{
- clsName = getAbsolute("com.zeroc.Ice.Value", package);
+ clsName = getUnqualified("com.zeroc.Ice.Value", package);
}
else
{
- clsName = getAbsolute(cl, package);
+ clsName = getUnqualified(cl, package);
}
ostr << "v -> " << dest << " = v, " << clsName << ".class";
}
@@ -1000,7 +1000,7 @@ Slice::JavaVisitor::writeThrowsClause(const string& package, const ExceptionList
if(op && (op->hasMetaData("java:UserException") || op->hasMetaData("UserException")))
{
out.inc();
- out << nl << "throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("com.zeroc.Ice.UserException", package);
out.dec();
}
else if(throws.size() > 0)
@@ -1015,7 +1015,7 @@ Slice::JavaVisitor::writeThrowsClause(const string& package, const ExceptionList
{
out << "," << nl;
}
- out << getAbsolute(*r, package);
+ out << getUnqualified(*r, package);
count++;
}
out.restoreIndent();
@@ -1111,7 +1111,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
vector<string> params = getParams(op, package);
- const string currentParam = getAbsolute("com.zeroc.Ice.Current", package) + " " +
+ const string currentParam = getUnqualified("com.zeroc.Ice.Current", package) + " " +
getEscapedParamName(op, "current");
const bool amd = p->hasMetaData("amd") || op->hasMetaData("amd");
@@ -1170,13 +1170,13 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
out << eb << ';';
- out << sp << nl << "@Override" << nl << "default String[] ice_ids(" << getAbsolute("com.zeroc.Ice.Current", package)
+ out << sp << nl << "@Override" << nl << "default String[] ice_ids(" << getUnqualified("com.zeroc.Ice.Current", package)
<< " current)";
out << sb;
out << nl << "return _iceIds;";
out << eb;
- out << sp << nl << "@Override" << nl << "default String ice_id(" << getAbsolute("com.zeroc.Ice.Current", package)
+ out << sp << nl << "@Override" << nl << "default String ice_id(" << getUnqualified("com.zeroc.Ice.Current", package)
<< " current)";
out << sb;
out << nl << "return ice_staticId();";
@@ -1214,7 +1214,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << nl << "@Deprecated";
}
out << nl << "static java.util.concurrent.CompletionStage<"
- << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< "> _iceD_" << opName << '(';
if(p->isInterface())
{
@@ -1224,12 +1224,12 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
{
out << p->name() << "Disp";
}
- out << " obj, final " << getAbsolute("com.zeroc.IceInternal.Incoming", package) << " inS, "
- << getAbsolute("com.zeroc.Ice.Current", package) << " current)";
+ out << " obj, final " << getUnqualified("com.zeroc.IceInternal.Incoming", package) << " inS, "
+ << getUnqualified("com.zeroc.Ice.Current", package) << " current)";
if(!op->throws().empty() || op->hasMetaData("java:UserException") || op->hasMetaData("UserException"))
{
out.inc();
- out << nl << "throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("com.zeroc.Ice.UserException", package);
out.dec();
}
out << sb;
@@ -1241,7 +1241,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
const ParamDeclList inParams = op->inParameters();
const ParamDeclList outParams = op->outParameters();
- out << nl << getAbsolute("com.zeroc.Ice.Object", package) << "._iceCheckMode(" << sliceModeToIceMode(op->mode())
+ out << nl << getUnqualified("com.zeroc.Ice.Object", package) << "._iceCheckMode(" << sliceModeToIceMode(op->mode())
<< ", current.mode);";
if(!inParams.empty())
@@ -1251,7 +1251,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
//
// Declare 'in' parameters.
//
- out << nl << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr = inS.startReadParams();";
+ out << nl << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr = inS.startReadParams();";
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
const TypePtr paramType = (*pli)->type();
@@ -1356,7 +1356,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
else if(ret || !outParams.empty())
{
- out << nl << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
+ out << nl << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
writeMarshalServantResults(out, package, op, "ret");
out << nl << "inS.endWriteParams(ostr);";
out << nl << "return inS.setResult(ostr);";
@@ -1411,18 +1411,18 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
}
out << nl << "@Override" << nl
- << "default java.util.concurrent.CompletionStage<" << getAbsolute("com.zeroc.Ice.OutputStream", package)
- << "> _iceDispatch(" << getAbsolute("com.zeroc.IceInternal.Incoming", package) << " in, "
- << getAbsolute("com.zeroc.Ice.Current", package) << " current)";
+ << "default java.util.concurrent.CompletionStage<" << getUnqualified("com.zeroc.Ice.OutputStream", package)
+ << "> _iceDispatch(" << getUnqualified("com.zeroc.IceInternal.Incoming", package) << " in, "
+ << getUnqualified("com.zeroc.Ice.Current", package) << " current)";
out.inc();
- out << nl << "throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("com.zeroc.Ice.UserException", package);
out.dec();
out << sb;
out << nl << "int pos = java.util.Arrays.binarySearch(_iceOps, current.operation);";
out << nl << "if(pos < 0)";
out << sb;
out << nl << "throw new "
- << getAbsolute("com.zeroc.Ice.OperationNotExistException", package)
+ << getUnqualified("com.zeroc.Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
out << sp << nl << "switch(pos)";
@@ -1436,22 +1436,22 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
out << sb;
if(opName == "ice_id")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_id(this, in, current);";
}
else if(opName == "ice_ids")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_ids(this, in, current);";
}
else if(opName == "ice_isA")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_isA(this, in, current);";
}
else if(opName == "ice_ping")
{
- out << nl << "return " << getAbsolute("com.zeroc.Ice.Object", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.Object", package)
<< "._iceD_ice_ping(this, in, current);";
}
else
@@ -1475,11 +1475,11 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
string base;
if(cl->isInterface())
{
- base = getAbsolute(cl, package);
+ base = getUnqualified(cl, package);
}
else
{
- base = getAbsolute(cl, package, "", "Disp");
+ base = getUnqualified(cl, package, "", "Disp");
}
out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);";
}
@@ -1491,7 +1491,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p)
}
out << eb;
out << sp << nl << "assert(false);";
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.OperationNotExistException", package)
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
}
@@ -1520,14 +1520,14 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
{
out << sp;
out << nl << "@Override";
- out << nl << "public " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
+ out << nl << "public " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
out << sb;
out << nl << "return _iceSlicedData;";
out << eb;
out << sp;
out << nl << "@Override";
- out << nl << "public void _iceWrite(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << nl << "public void _iceWrite(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startValue(_iceSlicedData);";
out << nl << "_iceWriteImpl(ostr);";
@@ -1536,7 +1536,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "public void _iceRead(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr)";
+ out << nl << "public void _iceRead(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startValue();";
out << nl << "_iceReadImpl(istr);";
@@ -1546,7 +1546,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _iceWriteImpl(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr_)";
+ out << nl << "protected void _iceWriteImpl(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
iter = 0;
@@ -1573,7 +1573,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _iceReadImpl(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr_)";
+ out << nl << "protected void _iceReadImpl(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
@@ -1599,7 +1599,7 @@ Slice::JavaVisitor::writeMarshaling(Output& out, const ClassDefPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " _iceSlicedData;";
+ out << sp << nl << "protected " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " _iceSlicedData;";
}
}
@@ -1610,7 +1610,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
ConstPtr constant = ConstPtr::dynamicCast(valueType);
if(constant)
{
- out << getAbsolute(constant, package) << ".value";
+ out << getUnqualified(constant, package) << ".value";
}
else
{
@@ -1663,7 +1663,7 @@ Slice::JavaVisitor::writeConstantValue(Output& out, const TypePtr& type, const S
{
EnumeratorPtr lte = EnumeratorPtr::dynamicCast(valueType);
assert(lte);
- out << getAbsolute(lte, package);
+ out << getUnqualified(lte, package);
}
else
{
@@ -1707,7 +1707,7 @@ Slice::JavaVisitor::writeDataMemberInitializers(Output& out, const DataMemberLis
if(en)
{
string firstEnum = fixKwd(en->enumerators().front()->name());
- out << nl << "this." << fixKwd((*p)->name()) << " = " << getAbsolute(en, package) << '.' << firstEnum << ';';
+ out << nl << "this." << fixKwd((*p)->name()) << " = " << getUnqualified(en, package) << '.' << firstEnum << ';';
}
StructPtr st = StructPtr::dynamicCast(t);
@@ -2090,7 +2090,7 @@ Slice::JavaVisitor::writeServantDocComment(Output& out, const OperationPtr& p, c
if(p->hasMetaData("java:UserException") || p->hasMetaData("UserException"))
{
- out << nl << " * @throws " << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << nl << " * @throws " << getUnqualified("com.zeroc.Ice.UserException", package);
}
else
{
@@ -2173,7 +2173,7 @@ Slice::JavaVisitor::writeSeeAlso(Output& out, const UnitPtr& unit, const string&
{
ContainedPtr cont = ContainedPtr::dynamicCast(l.front());
assert(cont);
- out << getAbsolute(cont) << rest;
+ out << getUnqualified(cont) << rest;
}
}
@@ -2316,7 +2316,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -2366,11 +2366,11 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out.useCurrentPosAsIndent();
if(!p->isLocal() && bases.empty())
{
- out << getAbsolute("com.zeroc.Ice.Object", package);
+ out << getUnqualified("com.zeroc.Ice.Object", package);
}
else if(q != bases.end())
{
- out << getAbsolute(*q++, package);
+ out << getUnqualified(*q++, package);
}
else if(r != implements.end())
{
@@ -2379,7 +2379,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
for(;q != bases.end(); ++q)
{
- out << ',' << nl << getAbsolute(*q, package);
+ out << ',' << nl << getUnqualified(*q, package);
}
for(; r != implements.end(); ++r)
{
@@ -2399,12 +2399,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(baseClass)
{
- out << " extends " << getAbsolute(baseClass, package);
+ out << " extends " << getUnqualified(baseClass, package);
bases.pop_front();
}
else if(!p->isLocal())
{
- out << " extends " << getAbsolute("com.zeroc.Ice.Value", package);
+ out << " extends " << getUnqualified("com.zeroc.Ice.Value", package);
}
if(p->isLocal())
@@ -2416,7 +2416,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q)
{
- implements.push_back(getAbsolute(*q, package));
+ implements.push_back(getUnqualified(*q, package));
}
}
@@ -2788,7 +2788,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
string scoped = p->scoped();
ExceptionPtr base = p->base();
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -2811,16 +2811,16 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
if(p->isLocal())
{
- out << getAbsolute("com.zeroc.Ice.LocalException", package);
+ out << getUnqualified("com.zeroc.Ice.LocalException", package);
}
else
{
- out << getAbsolute("com.zeroc.Ice.UserException", package);
+ out << getUnqualified("com.zeroc.Ice.UserException", package);
}
}
else
{
- out << getAbsolute(base, package);
+ out << getUnqualified(base, package);
}
out << sb;
@@ -3087,14 +3087,14 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
out << sp;
out << nl << "@Override";
- out << nl << "public " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
+ out << nl << "public " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " ice_getSlicedData()";
out << sb;
out << nl << "return _slicedData;";
out << eb;
out << sp;
out << nl << "@Override";
- out << nl << "public void _write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << nl << "public void _write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startException(_slicedData);";
out << nl << "_writeImpl(ostr);";
@@ -3103,7 +3103,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "public void _read(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr)";
+ out << nl << "public void _read(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startException();";
out << nl << "_readImpl(istr);";
@@ -3113,7 +3113,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _writeImpl(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr_)";
+ out << nl << "protected void _writeImpl(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
iter = 0;
@@ -3140,7 +3140,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << sp;
out << nl << "@Override";
- out << nl << "protected void _readImpl(" << getAbsolute("com.zeroc.Ice.InputStream", package) << " istr_)";
+ out << nl << "protected void _readImpl(" << getUnqualified("com.zeroc.Ice.InputStream", package) << " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
iter = 0;
@@ -3177,7 +3177,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("com.zeroc.Ice.SlicedData", package) << " _slicedData;";
+ out << sp << nl << "protected " << getUnqualified("com.zeroc.Ice.SlicedData", package) << " _slicedData;";
}
}
@@ -3229,7 +3229,7 @@ bool
Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
{
string name = fixKwd(p->name());
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
open(absolute, p->file());
@@ -3454,7 +3454,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void ice_writeMembers(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << sp << nl << "public void ice_writeMembers(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr)";
out << sb;
iter = 0;
@@ -3466,7 +3466,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
DataMemberList classMembers = p->classDataMembers();
- out << sp << nl << "public void ice_readMembers(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "public void ice_readMembers(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
iter = 0;
@@ -3476,7 +3476,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
}
out << eb;
- out << sp << nl << "static public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << sp << nl << "static public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, " << name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -3489,7 +3489,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << eb;
- out << sp << nl << "static public " << name << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "static public " << name << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << name << " v = new " << name << "();";
@@ -3499,7 +3499,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
string optName = "java.util.Optional<" + name + ">";
out << sp;
- out << nl << "static public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "static public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << optName << " v)";
out << sb;
out << nl << "if(v != null && v.isPresent())";
@@ -3509,7 +3509,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << sp;
- out << nl << "static public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "static public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << name << " v)";
out << sb;
out << nl << "if(ostr.writeOptional(tag, " << getOptionalFormat(p) << "))";
@@ -3529,7 +3529,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << sp;
- out << nl << "static public " << optName << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "static public " << optName << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
out << nl << "if(istr.readOptional(tag, " << getOptionalFormat(p) << "))";
@@ -3945,7 +3945,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
EnumeratorList enumerators = p->enumerators();
open(absolute, p->file());
@@ -4013,12 +4013,12 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.writeEnum(_value, " << p->maxValue() << ");";
out << eb;
- out << sp << nl << "public static void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << sp << nl << "public static void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, " << name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -4032,7 +4032,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << eb;
- out << sp << nl << "public static " << name << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "public static " << name << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << "int v = istr.readEnum(" << p->maxValue() << ");";
@@ -4041,7 +4041,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
string optName = "java.util.Optional<" + name + ">";
out << sp;
- out << nl << "public static void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << optName << " v)";
out << sb;
out << nl << "if(v != null && v.isPresent())";
@@ -4051,7 +4051,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << sp;
- out << nl << "public static void ice_write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void ice_write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << name << " v)";
out << sb;
out << nl << "if(ostr.writeOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4061,7 +4061,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << sp;
- out << nl << "public static " << optName << " ice_read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << optName << " ice_read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
out << nl << "if(istr.readOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4079,7 +4079,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
out << nl << "final " << name << " e = valueOf(v);";
out << nl << "if(e == null)";
out << sb;
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.MarshalException", package)
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.MarshalException", package)
<< "(\"enumerator value \" + v + \" is out of range\");";
out << eb;
out << nl << "return e;";
@@ -4097,7 +4097,7 @@ Slice::Gen::TypesVisitor::visitConst(const ConstPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
TypePtr type = p->type();
open(absolute, p->file());
@@ -4201,8 +4201,8 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
}
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
string typeS = typeToString(p, TypeModeIn, package);
@@ -4265,7 +4265,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, " << typeS << " v)";
out << sb;
iter = 0;
@@ -4277,7 +4277,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
{
out << nl << "@SuppressWarnings(\"unchecked\")";
}
- out << nl << "public static " << typeS << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << typeS << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << "final " << typeS << " v;";
@@ -4290,7 +4290,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
string optTypeS = "java.util.Optional<" + typeS + ">";
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << optTypeS << " v)";
out << sb;
if(!hasTypeMetaData(p) && builtin && builtin->kind() < Builtin::KindObject)
@@ -4307,7 +4307,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << eb;
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package)
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package)
<< " ostr, int tag, " << typeS << " v)";
out << sb;
if(!hasTypeMetaData(p) && builtin && builtin->kind() < Builtin::KindObject)
@@ -4356,7 +4356,7 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
out << eb;
out << sp;
- out << nl << "public static " << optTypeS << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << optTypeS << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
if(!hasTypeMetaData(p) && builtin && builtin->kind() < Builtin::KindObject)
@@ -4405,8 +4405,8 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
TypePtr value = p->valueType();
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
StringList metaData = p->getMetaData();
string formalType = typeToString(p, TypeModeIn, package, StringList(), true);
@@ -4419,14 +4419,14 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr, "
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr, "
<< formalType << " v)";
out << sb;
iter = 0;
writeDictionaryMarshalUnmarshalCode(out, package, p, "v", true, iter, false);
out << eb;
- out << sp << nl << "public static " << formalType << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << sp << nl << "public static " << formalType << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << formalType << " v;";
@@ -4437,7 +4437,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
string optTypeS = "java.util.Optional<" + formalType + ">";
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
<< optTypeS << " v)";
out << sb;
out << nl << "if(v != null && v.isPresent())";
@@ -4447,7 +4447,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << eb;
out << sp;
- out << nl << "public static void write(" << getAbsolute("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
+ out << nl << "public static void write(" << getUnqualified("com.zeroc.Ice.OutputStream", package) << " ostr, int tag, "
<< formalType << " v)";
out << sb;
out << nl << "if(ostr.writeOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4471,7 +4471,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << eb;
out << sp;
- out << nl << "public static " << optTypeS << " read(" << getAbsolute("com.zeroc.Ice.InputStream", package)
+ out << nl << "public static " << optTypeS << " read(" << getUnqualified("com.zeroc.Ice.InputStream", package)
<< " istr, int tag)";
out << sb;
out << nl << "if(istr.readOptional(tag, " << getOptionalFormat(p) << "))";
@@ -4523,7 +4523,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "Prx");
+ string absolute = getUnqualified(p, "", "", "Prx");
open(absolute, p->file());
@@ -4552,7 +4552,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
out.useCurrentPosAsIndent();
if(bases.empty())
{
- out << getAbsolute("com.zeroc.Ice.ObjectPrx", package);
+ out << getUnqualified("com.zeroc.Ice.ObjectPrx", package);
}
else
{
@@ -4562,7 +4562,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << ',' << nl;
}
- out << getAbsolute(*q, package, "", "Prx");
+ out << getUnqualified(*q, package, "", "Prx");
}
}
out.restoreIndent();
@@ -4588,10 +4588,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"Raises a local exception if a communication error occurs.\n"
"@param obj The untyped proxy.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "static " << p->name() << "Prx checkedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package) << "._checkedCast(obj, ice_staticId(), "
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package) << "._checkedCast(obj, ice_staticId(), "
<< p->name() << "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4602,10 +4602,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param obj The untyped proxy.\n"
"@param context The Context map to send with the invocation.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "static " << p->name() << "Prx checkedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, " << contextParam << ')';
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< "._checkedCast(obj, context, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4616,10 +4616,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param obj The untyped proxy.\n"
"@param facet The name of the desired facet.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "static " << p->name() << "Prx checkedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< "._checkedCast(obj, facet, ice_staticId(), " << p->name() << "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4631,10 +4631,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param facet The name of the desired facet.\n"
"@param context The Context map to send with the invocation.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "static " << p->name() << "Prx checkedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx checkedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, String facet, " << contextParam << ')';
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< "._checkedCast(obj, facet, context, ice_staticId(), " << p->name()
<< "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4644,10 +4644,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"Downcasts the given proxy to this type without contacting the remote server.\n"
"@param obj The untyped proxy.\n"
"@return A proxy for this type.");
- out << nl << "static " << p->name() << "Prx uncheckedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx uncheckedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, " << p->name()
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, " << p->name()
<< "Prx.class, _" << p->name() << "PrxI.class);";
out << eb;
@@ -4657,10 +4657,10 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param obj The untyped proxy.\n"
"@param facet The name of the desired facet.\n"
"@return A proxy for this type.");
- out << nl << "static " << p->name() << "Prx uncheckedCast(" << getAbsolute("com.zeroc.Ice.ObjectPrx", package)
+ out << nl << "static " << p->name() << "Prx uncheckedCast(" << getUnqualified("com.zeroc.Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
- out << nl << "return " << getAbsolute("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, facet, "
+ out << nl << "return " << getUnqualified("com.zeroc.Ice.ObjectPrx", package) << "._uncheckedCast(obj, facet, "
<< p->name() << "Prx.class, _"
<< p->name() << "PrxI.class);";
out << eb;
@@ -4693,7 +4693,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param newEndpoints The endpoints for the new proxy.\n"
"@return A proxy with the specified endpoints.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_endpoints(" << getAbsolute("com.zeroc.Ice.Endpoint", package) << "[] newEndpoints)";
+ out << nl << "default " << p->name() << "Prx ice_endpoints(" << getUnqualified("com.zeroc.Ice.Endpoint", package) << "[] newEndpoints)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_endpoints(newEndpoints);";
out << eb;
@@ -4738,7 +4738,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@return A proxy with the specified endpoint selection policy.");
out << nl << "@Override";
out << nl << "default " << p->name() << "Prx ice_endpointSelection("
- << getAbsolute("com.zeroc.Ice.EndpointSelectionType", package)
+ << getUnqualified("com.zeroc.Ice.EndpointSelectionType", package)
<< " newType)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_endpointSelection(newType);";
@@ -4763,7 +4763,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param e The encoding version to use to marshal request parameters.\n"
"@return A proxy with the specified encoding version.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_encodingVersion(" << getAbsolute("com.zeroc.Ice.EncodingVersion", package)
+ out << nl << "default " << p->name() << "Prx ice_encodingVersion(" << getUnqualified("com.zeroc.Ice.EncodingVersion", package)
<< " e)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_encodingVersion(e);";
@@ -4788,7 +4788,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param router The router for the new proxy.\n"
"@return A proxy with the specified router.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_router(" << getAbsolute("com.zeroc.Ice.RouterPrx", package) << " router)";
+ out << nl << "default " << p->name() << "Prx ice_router(" << getUnqualified("com.zeroc.Ice.RouterPrx", package) << " router)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_router(router);";
out << eb;
@@ -4799,7 +4799,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
"@param locator The locator for the new proxy.\n"
"@return A proxy with the specified locator.");
out << nl << "@Override";
- out << nl << "default " << p->name() << "Prx ice_locator(" << getAbsolute("com.zeroc.Ice.LocatorPrx", package)
+ out << nl << "default " << p->name() << "Prx ice_locator(" << getUnqualified("com.zeroc.Ice.LocatorPrx", package)
<< " locator)";
out << sb;
out << nl << "return (" << p->name() << "Prx)_ice_locator(locator);";
@@ -4920,7 +4920,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
out << eb;
close();
- string absolute = getAbsolute(p, "", "_", "PrxI");
+ string absolute = getUnqualified(p, "", "_", "PrxI");
open(absolute, p->file());
@@ -4931,7 +4931,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
outi << nl << "@Deprecated";
}
- outi << nl << "public class _" << p->name() << "PrxI extends " << getAbsolute("com.zeroc.Ice._ObjectPrxI", package)
+ outi << nl << "public class _" << p->name() << "PrxI extends " << getUnqualified("com.zeroc.Ice._ObjectPrxI", package)
<< " implements " << p->name() << "Prx";
outi << sb;
outi << sp << nl << "public static final long serialVersionUID = 0L;";
@@ -5035,15 +5035,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
out << eb;
for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t)
{
- string exS = getAbsolute(*t, package);
+ string exS = getUnqualified(*t, package);
out << nl << "catch(" << exS << " ex)";
out << sb;
out << nl << "throw ex;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("com.zeroc.Ice.UserException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("com.zeroc.Ice.UserException", package) << " ex)";
out << sb;
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.UnknownUserException", package) << "(ex.ice_id(), ex);";
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.UnknownUserException", package) << "(ex.ice_id(), ex);";
out << eb;
}
out << eb;
@@ -5101,15 +5101,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
out << eb;
for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t)
{
- string exS = getAbsolute(*t, package);
+ string exS = getUnqualified(*t, package);
out << nl << "catch(" << exS << " ex)";
out << sb;
out << nl << "throw ex;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("com.zeroc.Ice.UserException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("com.zeroc.Ice.UserException", package) << " ex)";
out << sb;
- out << nl << "throw new " << getAbsolute("com.zeroc.Ice.UnknownUserException", package)
+ out << nl << "throw new " << getUnqualified("com.zeroc.Ice.UnknownUserException", package)
<< "(ex.ice_id(), ex);";
out << eb;
}
@@ -5153,7 +5153,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
<< "java.util.Map<String, String> context"
<< "boolean sync" << epar;
out << sb;
- out << nl << futureImpl << " f = new " << getAbsolute("com.zeroc.IceInternal.OutgoingAsync", package)
+ out << nl << futureImpl << " f = new " << getUnqualified("com.zeroc.IceInternal.OutgoingAsync", package)
<< "<>(this, \"" << p->name() << "\", " << sliceModeToIceMode(p->sendMode()) << ", sync, "
<< (throws.empty() ? "null" : "_iceE_" + p->name()) << ");";
@@ -5201,7 +5201,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
out << ",";
}
- out << nl << getAbsolute(*t, package) << ".class";
+ out << nl << getUnqualified(*t, package) << ".class";
}
out << eb << ';';
}
@@ -5240,7 +5240,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
<< "java.util.Map<String, String> context"
<< "boolean sync" << epar;
out << sb;
- out << nl << futureImpl << " f = new " << getAbsolute("com.zeroc.IceInternal.OutgoingAsync", package)
+ out << nl << futureImpl << " f = new " << getUnqualified("com.zeroc.IceInternal.OutgoingAsync", package)
<< "<>(this, \"" << p->name() << "\", " << sliceModeToIceMode(p->sendMode()) << ", sync, "
<< (throws.empty() ? "null" : "_iceE_" + p->name()) << ");";
@@ -5293,7 +5293,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
}
const string name = p->name();
- const string absolute = getAbsolute(p, "", "", "Disp");
+ const string absolute = getUnqualified(p, "", "", "Disp");
const string package = getPackage(p);
open(absolute, p->file());
@@ -5320,7 +5320,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
if(bases.empty())
{
- out << " extends " << getAbsolute("com.zeroc.Ice.Object", package);
+ out << " extends " << getUnqualified("com.zeroc.Ice.Object", package);
}
else
{
@@ -5334,11 +5334,11 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
}
if(!(*q)->isInterface())
{
- out << getAbsolute(*q, package, "", "Disp");
+ out << getUnqualified(*q, package, "", "Disp");
}
else
{
- out << getAbsolute(*q, package);
+ out << getUnqualified(*q, package);
}
}
out.restoreIndent();
@@ -5369,7 +5369,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "I");
+ string absolute = getUnqualified(p, "", "", "I");
open(absolute, p->file());
@@ -5490,7 +5490,7 @@ Slice::Gen::ImplVisitor::getDefaultValue(const string& package, const TypePtr& t
if(en)
{
EnumeratorList enumerators = en->enumerators();
- return getAbsolute(en, package) + '.' + fixKwd(enumerators.front()->name());
+ return getUnqualified(en, package) + '.' + fixKwd(enumerators.front()->name());
}
}
}
@@ -5577,7 +5577,7 @@ Slice::Gen::ImplVisitor::writeOperation(Output& out, const string& package, cons
const ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
const vector<string> params = getParams(op, package);
- const string currentParam = getAbsolute("com.zeroc.Ice.Current", package) + " " + getEscapedParamName(op, "current");
+ const string currentParam = getUnqualified("com.zeroc.Ice.Current", package) + " " + getEscapedParamName(op, "current");
if(local)
{
diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp
index ad41d4f4a44..0aae4ac5353 100644
--- a/cpp/src/slice2java/GenCompat.cpp
+++ b/cpp/src/slice2java/GenCompat.cpp
@@ -313,7 +313,7 @@ Slice::JavaCompatVisitor::getParamsAsync(const OperationPtr& op, const string& p
string name = op->name();
ContainerPtr container = op->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
- string classNameAsync = getAbsolute(cl, package, amd ? "AMD_" : "AMI_", '_' + name);
+ string classNameAsync = getUnqualified(cl, package, amd ? "AMD_" : "AMI_", '_' + name);
params.insert(params.begin(), classNameAsync + " " + getEscapedParamName(op, "cb"));
return params;
@@ -372,7 +372,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackInterface(const OperationPtr& op, cons
if(!ret && outParams.empty())
{
- return throws ? getAbsolute("Ice.TwowayCallbackVoidUE", package) : getAbsolute("Ice.OnewayCallback", package);
+ return throws ? getUnqualified("Ice.TwowayCallbackVoidUE", package) : getUnqualified("Ice.OnewayCallback", package);
}
else if((ret && outParams.empty()) || (!ret && outParams.size() == 1))
{
@@ -392,7 +392,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackInterface(const OperationPtr& op, cons
case Builtin::KindFloat:
case Builtin::KindDouble:
{
- return getAbsolute(prefix + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
+ return getUnqualified(prefix + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
}
default:
{
@@ -401,13 +401,13 @@ Slice::JavaCompatVisitor::getAsyncCallbackInterface(const OperationPtr& op, cons
}
}
- return getAbsolute("Ice.TwowayCallbackArg1" + suffix, package) + "<" +
+ return getUnqualified("Ice.TwowayCallbackArg1" + suffix, package) + "<" +
typeToString(t, TypeModeIn, package, op->getMetaData(), true, optional) + ">";
}
else
{
ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container());
- return getAbsolute(getPackage(cl) + "._Callback_" + cl->name(), package) + "_" + op->name();
+ return getUnqualified(getPackage(cl) + "._Callback_" + cl->name(), package) + "_" + op->name();
}
}
@@ -426,7 +426,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackBaseClass(const OperationPtr& op, bool
assert(throws);
return functional ?
"IceInternal.Functional_TwowayCallbackVoidUE" :
- "IceInternal.TwowayCallback implements " + getAbsolute("Ice.TwowayCallbackVoidUE", package);
+ "IceInternal.TwowayCallback implements " + getUnqualified("Ice.TwowayCallbackVoidUE", package);
}
else if((ret && outParams.empty()) || (!ret && outParams.size() == 1))
{
@@ -453,7 +453,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackBaseClass(const OperationPtr& op, bool
else
{
os << "IceInternal.TwowayCallback implements "
- << getAbsolute(string("Ice.") + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
+ << getUnqualified(string("Ice.") + builtinAsyncCallbackTable[builtin->kind()] + suffix, package);
}
return os.str();
}
@@ -471,7 +471,7 @@ Slice::JavaCompatVisitor::getAsyncCallbackBaseClass(const OperationPtr& op, bool
}
else
{
- os << "IceInternal.TwowayCallback implements " << getAbsolute("Ice.TwowayCallbackArg1", package);
+ os << "IceInternal.TwowayCallback implements " << getUnqualified("Ice.TwowayCallbackArg1", package);
}
os << suffix << "<" << typeToString(t, TypeModeIn, getPackage(op), op->getMetaData(), true, optional) + ">";
return os.str();
@@ -580,11 +580,11 @@ Slice::JavaCompatVisitor::getParamsAsyncLambda(const OperationPtr& op, const str
if(!op->throws().empty())
{
- params.push_back("IceInternal.Functional_GenericCallback1<" + getAbsolute("Ice.UserException", package) + "> " +
+ params.push_back("IceInternal.Functional_GenericCallback1<" + getUnqualified("Ice.UserException", package) + "> " +
userExceptionCbParamName);
}
- params.push_back("IceInternal.Functional_GenericCallback1<" + getAbsolute("Ice.Exception", package) + "> " +
+ params.push_back("IceInternal.Functional_GenericCallback1<" + getUnqualified("Ice.Exception", package) + "> " +
exceptionCbParamName);
if(sentCB)
@@ -830,7 +830,7 @@ Slice::JavaCompatVisitor::writeThrowsClause(const string& package, const Excepti
{
ClassDefPtr cl = ClassDefPtr::dynamicCast(op->container());
out.inc();
- out << nl << "throws " << getAbsolute("Ice.UserException", getPackage(cl));
+ out << nl << "throws " << getUnqualified("Ice.UserException", getPackage(cl));
out.dec();
}
else if(throws.size() > 0)
@@ -845,7 +845,7 @@ Slice::JavaCompatVisitor::writeThrowsClause(const string& package, const Excepti
{
out << "," << nl;
}
- out << getAbsolute(*r, package);
+ out << getUnqualified(*r, package);
count++;
}
out.restoreIndent();
@@ -925,7 +925,7 @@ void
Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const DataMemberList& classMembers,
const DataMemberList& optionalMembers)
{
- out << sp << nl << "private class Patcher implements " << getAbsolute("Ice.ReadValueCallback", package);
+ out << sp << nl << "private class Patcher implements " << getUnqualified("Ice.ReadValueCallback", package);
out << sb;
if(classMembers.size() > 1)
{
@@ -935,7 +935,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const
out << eb;
}
- out << sp << nl << "public void" << nl << "valueReady(" << getAbsolute("Ice.Object", package) << " v)";
+ out << sp << nl << "public void" << nl << "valueReady(" << getUnqualified("Ice.Object", package) << " v)";
out << sb;
if(classMembers.size() > 1)
{
@@ -963,7 +963,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const
out.inc();
if(b)
{
- out << nl << "_typeId = " << getAbsolute("Ice.ObjectImpl", package) << ".ice_staticId();";
+ out << nl << "_typeId = " << getUnqualified("Ice.ObjectImpl", package) << ".ice_staticId();";
}
else
{
@@ -1017,7 +1017,7 @@ Slice::JavaCompatVisitor::writePatcher(Output& out, const string& package, const
out.inc();
if(b)
{
- out << nl << "_typeId = " << getAbsolute("Ice.ObjectImpl", package) << ".ice_staticId();";
+ out << nl << "_typeId = " << getUnqualified("Ice.ObjectImpl", package) << ".ice_staticId();";
}
else
{
@@ -1126,7 +1126,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "return java.util.Arrays.binarySearch(_ids, s) >= 0;";
out << eb;
- out << sp << nl << "public boolean ice_isA(String s, " << getAbsolute("Ice.Current", package) << " current)";
+ out << sp << nl << "public boolean ice_isA(String s, " << getUnqualified("Ice.Current", package) << " current)";
out << sb;
out << nl << "return java.util.Arrays.binarySearch(_ids, s) >= 0;";
out << eb;
@@ -1136,7 +1136,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "return _ids;";
out << eb;
- out << sp << nl << "public String[] ice_ids(" << getAbsolute("Ice.Current", package) << " current)";
+ out << sp << nl << "public String[] ice_ids(" << getUnqualified("Ice.Current", package) << " current)";
out << sb;
out << nl << "return _ids;";
out << eb;
@@ -1146,7 +1146,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "return _ids[" << scopedPos << "];";
out << eb;
- out << sp << nl << "public String ice_id(" << getAbsolute("Ice.Current", package) << " current)";
+ out << sp << nl << "public String ice_id(" << getUnqualified("Ice.Current", package) << " current)";
out << sb;
out << nl << "return _ids[" << scopedPos << "];";
out << eb;
@@ -1281,9 +1281,9 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << sp;
writeSuppressDeprecation(out, op);
out << nl << "public static boolean _iceD_" << opName << '(' << name
- << " obj, IceInternal.Incoming inS, " << getAbsolute("Ice.Current", package) << " current)";
+ << " obj, IceInternal.Incoming inS, " << getUnqualified("Ice.Current", package) << " current)";
out.inc();
- out << nl << "throws " << getAbsolute("Ice.UserException", package);
+ out << nl << "throws " << getUnqualified("Ice.UserException", package);
out.dec();
out << sb;
@@ -1319,7 +1319,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
//
// Unmarshal 'in' parameters.
//
- out << nl << getAbsolute("Ice.InputStream", package) << " istr = inS.startReadParams();";
+ out << nl << getUnqualified("Ice.InputStream", package) << " istr = inS.startReadParams();";
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
TypePtr paramType = (*pli)->type();
@@ -1410,7 +1410,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
//
if(!outParams.empty() || ret)
{
- out << nl << getAbsolute("Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
+ out << nl << getUnqualified("Ice.OutputStream", package) << " ostr = inS.startWriteParams();";
writeMarshalUnmarshalParams(out, package, outParams, op, iter, true, optionalMapping, true, "", true);
if(op->returnsClasses(false))
{
@@ -1447,7 +1447,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
//
// Unmarshal 'in' parameters.
//
- out << nl << getAbsolute("Ice.InputStream", package) << " istr = inS.startReadParams();";
+ out << nl << getUnqualified("Ice.InputStream", package) << " istr = inS.startReadParams();";
iter = 0;
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
@@ -1569,7 +1569,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << nl << "int pos = java.util.Arrays.binarySearch(_all, current.operation);";
out << nl << "if(pos < 0)";
out << sb;
- out << nl << "throw new " << getAbsolute("Ice.OperationNotExistException", package)
+ out << nl << "throw new " << getUnqualified("Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
out << sp << nl << "switch(pos)";
@@ -1618,11 +1618,11 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
string base;
if(cl->isInterface())
{
- base = getAbsolute(cl, package, "_", "Disp");
+ base = getUnqualified(cl, package, "_", "Disp");
}
else
{
- base = getAbsolute(cl, package);
+ base = getUnqualified(cl, package);
}
out << nl << "return " << base << "._iceD_" << opName << "(this, in, current);";
}
@@ -1634,7 +1634,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
}
out << eb;
out << sp << nl << "assert(false);";
- out << nl << "throw new " << getAbsolute("Ice.OperationNotExistException", package)
+ out << nl << "throw new " << getUnqualified("Ice.OperationNotExistException", package)
<< "(current.id, current.facet, current.operation);";
out << eb;
@@ -1694,19 +1694,19 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
if(preserved && !basePreserved)
{
- out << sp << nl << "public " << getAbsolute("Ice.SlicedData", package) << " ice_getSlicedData()";
+ out << sp << nl << "public " << getUnqualified("Ice.SlicedData", package) << " ice_getSlicedData()";
out << sb;
out << nl << "return _iceSlicedData;";
out << eb;
- out << sp << nl << "public void _iceWrite(" << getAbsolute("Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void _iceWrite(" << getUnqualified("Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startValue(_iceSlicedData);";
out << nl << "_iceWriteImpl(ostr);";
out << nl << "ostr.endValue();";
out << eb;
- out << sp << nl << "public void _iceRead(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public void _iceRead(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startValue();";
out << nl << "_iceReadImpl(istr);";
@@ -1714,7 +1714,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
out << eb;
}
- out << sp << nl << "protected void _iceWriteImpl(" << getAbsolute("Ice.OutputStream", package) << " ostr_)";
+ out << sp << nl << "protected void _iceWriteImpl(" << getUnqualified("Ice.OutputStream", package) << " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
iter = 0;
@@ -1744,7 +1744,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
writePatcher(out, package, classMembers, optionalMembers);
}
- out << sp << nl << "protected void _iceReadImpl(" << getAbsolute("Ice.InputStream", package) << " istr_)";
+ out << sp << nl << "protected void _iceReadImpl(" << getUnqualified("Ice.InputStream", package) << " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
@@ -1771,7 +1771,7 @@ Slice::JavaCompatVisitor::writeDispatchAndMarshalling(Output& out, const ClassDe
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("Ice.SlicedData", package) << " _iceSlicedData;";
+ out << sp << nl << "protected " << getUnqualified("Ice.SlicedData", package) << " _iceSlicedData;";
}
}
@@ -1782,7 +1782,7 @@ Slice::JavaCompatVisitor::writeConstantValue(Output& out, const TypePtr& type, c
ConstPtr constant = ConstPtr::dynamicCast(valueType);
if(constant)
{
- out << getAbsolute(constant, package) << ".value";
+ out << getUnqualified(constant, package) << ".value";
}
else
{
@@ -1835,7 +1835,7 @@ Slice::JavaCompatVisitor::writeConstantValue(Output& out, const TypePtr& type, c
{
EnumeratorPtr lte = EnumeratorPtr::dynamicCast(valueType);
assert(lte);
- out << getAbsolute(lte, package);
+ out << getUnqualified(lte, package);
}
else
{
@@ -1879,7 +1879,7 @@ Slice::JavaCompatVisitor::writeDataMemberInitializers(Output& out, const DataMem
if(en)
{
string firstEnum = fixKwd(en->enumerators().front()->name());
- out << nl << "this." << fixKwd((*p)->name()) << " = " << getAbsolute(en, package) << '.' << firstEnum
+ out << nl << "this." << fixKwd((*p)->name()) << " = " << getUnqualified(en, package) << '.' << firstEnum
<< ';';
}
@@ -2516,7 +2516,7 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre
{
opIntfName += "NC";
}
- string absolute = getAbsolute(p, "", "_", opIntfName);
+ string absolute = getUnqualified(p, "", "_", opIntfName);
open(absolute, p->file());
@@ -2545,7 +2545,7 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre
{
first = false;
}
- out << getAbsolute(*q, package, "_", opIntfName);
+ out << getUnqualified(*q, package, "_", opIntfName);
}
++q;
}
@@ -2603,7 +2603,7 @@ Slice::GenCompat::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurre
out << nl << retS << ' ' << (amd ? opname + "_async" : fixKwd(opname)) << spar << params;
if(!noCurrent && !p->isLocal())
{
- out << getAbsolute("Ice.Current", package) + " " + currentParamName;
+ out << getUnqualified("Ice.Current", package) + " " + currentParamName;
}
out << epar;
writeThrowsClause(package, throws, op);
@@ -2657,7 +2657,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -2699,12 +2699,12 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << '_' << name << "Operations, _" << name << "OperationsNC";
if(bases.empty())
{
- out << "," << nl << getAbsolute("Ice.Object", package);
+ out << "," << nl << getUnqualified("Ice.Object", package);
}
}
else if(q != bases.end())
{
- out << getAbsolute(*q++, package);
+ out << getUnqualified(*q++, package);
}
else if(r != implements.end())
{
@@ -2713,7 +2713,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
for(;q != bases.end(); ++q)
{
- out << ',' << nl << getAbsolute(*q, package);
+ out << ',' << nl << getUnqualified(*q, package);
}
for(; r != implements.end(); ++r)
{
@@ -2733,12 +2733,12 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(baseClass)
{
- out << " extends " << getAbsolute(baseClass, package);
+ out << " extends " << getUnqualified(baseClass, package);
bases.pop_front();
}
else if(!p->isLocal())
{
- out << " extends " << getAbsolute("Ice.ObjectImpl", package);
+ out << " extends " << getUnqualified("Ice.ObjectImpl", package);
}
else
{
@@ -2752,7 +2752,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q)
{
- implements.push_back(getAbsolute(*q, package));
+ implements.push_back(getUnqualified(*q, package));
}
if(!implements.empty())
@@ -2831,7 +2831,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "public abstract ";
}
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << epar << ';';
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << epar << ';';
out << sp;
writeDocCommentAMI(out, op, InParam, "@param " + getEscapedParamName(op, "cb") + " A generic callback.");
@@ -2840,7 +2840,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "public abstract ";
}
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams
<< ("Ice.Callback " + getEscapedParamName(op, "cb")) << epar << ';';
out << sp;
@@ -2851,7 +2851,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
out << "public abstract ";
}
string cb = "Callback_" + name + "_" + opname + " " + getEscapedParamName(op, "cb");
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << cb << epar
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname << spar << inParams << cb << epar
<< ';';
out << sp;
@@ -2864,7 +2864,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
out << "public abstract ";
}
- out << getAbsolute("Ice.AsyncResult", package) << " begin_" << opname;
+ out << getUnqualified("Ice.AsyncResult", package) << " begin_" << opname;
writeParamList(out, getParamsAsyncLambda(op, package, false, true));
out << ';';
@@ -2878,7 +2878,7 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
out << retS << " end_" << opname << spar << outParams
- << (getAbsolute("Ice.AsyncResult", package) + " " + getEscapedParamName(op, "result")) << epar << ';';
+ << (getUnqualified("Ice.AsyncResult", package) + " " + getEscapedParamName(op, "result")) << epar << ';';
}
}
}
@@ -3029,17 +3029,17 @@ Slice::GenCompat::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isInterface() && p->allOperations().size() == 0 && !p->isLocal())
{
out << sp;
- out << nl << "private static class _F implements " << getAbsolute("Ice.ValueFactory", package);
+ out << nl << "private static class _F implements " << getUnqualified("Ice.ValueFactory", package);
out << sb;
- out << nl << "public " << getAbsolute("Ice.Object", package) << " create(String type)";
+ out << nl << "public " << getUnqualified("Ice.Object", package) << " create(String type)";
out << sb;
out << nl << "assert(type.equals(ice_staticId()));";
out << nl << "return new " << fixKwd(name) << "();";
out << eb;
out << eb;
- out << nl << "private static " << getAbsolute("Ice.ValueFactory", package) << " _factory = new _F();";
+ out << nl << "private static " << getUnqualified("Ice.ValueFactory", package) << " _factory = new _F();";
out << sp;
- out << nl << "public static " << getAbsolute("Ice.ValueFactory", package) << nl << "ice_factory()";
+ out << nl << "public static " << getUnqualified("Ice.ValueFactory", package) << nl << "ice_factory()";
out << sb;
out << nl << "return _factory;";
out << eb;
@@ -3150,7 +3150,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
string scoped = p->scoped();
ExceptionPtr base = p->base();
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
DataMemberList members = p->dataMembers();
DataMemberList allDataMembers = p->allDataMembers();
@@ -3168,16 +3168,16 @@ Slice::GenCompat::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
if(p->isLocal())
{
- out << getAbsolute("Ice.LocalException", package);
+ out << getUnqualified("Ice.LocalException", package);
}
else
{
- out << getAbsolute("Ice.UserException", package);
+ out << getUnqualified("Ice.UserException", package);
}
}
else
{
- out << getAbsolute(base, package);
+ out << getUnqualified(base, package);
}
out << sb;
@@ -3439,19 +3439,19 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
out << sp;
- out << nl << "public " << getAbsolute("Ice.SlicedData", package) << " " << nl << "ice_getSlicedData()";
+ out << nl << "public " << getUnqualified("Ice.SlicedData", package) << " " << nl << "ice_getSlicedData()";
out << sb;
out << nl << "return _slicedData;";
out << eb;
- out << sp << nl << "public void" << nl << "_write(" << getAbsolute("Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void" << nl << "_write(" << getUnqualified("Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.startException(_slicedData);";
out << nl << "_writeImpl(ostr);";
out << nl << "ostr.endException();";
out << eb;
- out << sp << nl << "public void" << nl << "_read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public void" << nl << "_read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << "istr.startException();";
out << nl << "_readImpl(istr);";
@@ -3459,7 +3459,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
out << eb;
}
- out << sp << nl << "protected void" << nl << "_writeImpl(" << getAbsolute("Ice.OutputStream", package)
+ out << sp << nl << "protected void" << nl << "_writeImpl(" << getUnqualified("Ice.OutputStream", package)
<< " ostr_)";
out << sb;
out << nl << "ostr_.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
@@ -3489,7 +3489,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
writePatcher(out, package, classMembers, optionalMembers);
}
- out << sp << nl << "protected void" << nl << "_readImpl(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "protected void" << nl << "_readImpl(" << getUnqualified("Ice.InputStream", package)
<< " istr_)";
out << sb;
out << nl << "istr_.startSlice();";
@@ -3527,7 +3527,7 @@ Slice::GenCompat::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- out << sp << nl << "protected " << getAbsolute("Ice.SlicedData", package) << " _slicedData;";
+ out << sp << nl << "protected " << getUnqualified("Ice.SlicedData", package) << " _slicedData;";
}
}
@@ -3578,7 +3578,7 @@ bool
Slice::GenCompat::TypesVisitor::visitStructStart(const StructPtr& p)
{
string name = fixKwd(p->name());
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
open(absolute, p->file());
@@ -3798,7 +3798,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void" << nl << "ice_writeMembers(" << getAbsolute("Ice.OutputStream", package)
+ out << sp << nl << "public void" << nl << "ice_writeMembers(" << getUnqualified("Ice.OutputStream", package)
<< " ostr)";
out << sb;
iter = 0;
@@ -3815,7 +3815,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
writePatcher(out, package, classMembers, DataMemberList());
}
- out << sp << nl << "public void" << nl << "ice_readMembers(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "public void" << nl << "ice_readMembers(" << getUnqualified("Ice.InputStream", package)
<< " istr)";
out << sb;
iter = 0;
@@ -3827,7 +3827,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
}
out << eb;
- out << sp << nl << "static public void" << nl << "ice_write(" << getAbsolute("Ice.OutputStream", package)
+ out << sp << nl << "static public void" << nl << "ice_write(" << getUnqualified("Ice.OutputStream", package)
<< " ostr, " << name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -3840,7 +3840,7 @@ Slice::GenCompat::TypesVisitor::visitStructEnd(const StructPtr& p)
out << eb;
out << eb;
- out << sp << nl << "static public " << name << nl << "ice_read(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "static public " << name << nl << "ice_read(" << getUnqualified("Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << name << " v = new " << name << "();";
@@ -4177,7 +4177,7 @@ void
Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
{
string name = fixKwd(p->name());
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
string package = getPackage(p);
EnumeratorList enumerators = p->enumerators();
@@ -4237,12 +4237,12 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
if(!p->isLocal())
{
- out << sp << nl << "public void ice_write(" << getAbsolute("Ice.OutputStream", package) << " ostr)";
+ out << sp << nl << "public void ice_write(" << getUnqualified("Ice.OutputStream", package) << " ostr)";
out << sb;
out << nl << "ostr.writeEnum(_value, " << p->maxValue() << ");";
out << eb;
- out << sp << nl << "public static void ice_write(" << getAbsolute("Ice.OutputStream", package) << " ostr, "
+ out << sp << nl << "public static void ice_write(" << getUnqualified("Ice.OutputStream", package) << " ostr, "
<< name << " v)";
out << sb;
out << nl << "if(v == null)";
@@ -4256,7 +4256,7 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
out << eb;
out << eb;
- out << sp << nl << "public static " << name << " ice_read(" << getAbsolute("Ice.InputStream", package)
+ out << sp << nl << "public static " << name << " ice_read(" << getUnqualified("Ice.InputStream", package)
<< " istr)";
out << sb;
out << nl << "int v = istr.readEnum(" << p->maxValue() << ");";
@@ -4268,7 +4268,7 @@ Slice::GenCompat::TypesVisitor::visitEnum(const EnumPtr& p)
out << nl << "final " << name << " e = valueOf(v);";
out << nl << "if(e == null)";
out << sb;
- out << nl << "throw new " << getAbsolute("Ice.MarshalException", package)
+ out << nl << "throw new " << getUnqualified("Ice.MarshalException", package)
<< "(\"enumerator value \" + v + \" is out of range\");";
out << eb;
out << nl << "return e;";
@@ -4286,7 +4286,7 @@ Slice::GenCompat::TypesVisitor::visitConst(const ConstPtr& p)
{
string name = fixKwd(p->name());
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
TypePtr type = p->type();
open(absolute, p->file());
@@ -4369,7 +4369,7 @@ Slice::GenCompat::HolderVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isLocal())
{
string name = p->name();
- string absolute = getAbsolute(p, "", "", "PrxHolder");
+ string absolute = getUnqualified(p, "", "", "PrxHolder");
open(absolute, p->file());
Output& out = output();
@@ -4426,7 +4426,7 @@ Slice::GenCompat::HolderVisitor::writeHolder(const TypePtr& p)
assert(contained);
string name = contained->name();
string package = getPackage(contained);
- string absolute = getAbsolute(contained, "", "", "Holder");
+ string absolute = getUnqualified(contained, "", "", "Holder");
string file;
if(p->definitionContext())
@@ -4449,10 +4449,10 @@ Slice::GenCompat::HolderVisitor::writeHolder(const TypePtr& p)
out << nl << "public final class " << name << "Holder";
if(!p->isLocal() && ((builtin && builtin->kind() == Builtin::KindObject) || cl))
{
- out << " extends " << getAbsolute("Ice.ObjectHolderBase", package) << "<" << typeS << ">";
+ out << " extends " << getUnqualified("Ice.ObjectHolderBase", package) << "<" << typeS << ">";
}
else {
- out << " extends " << getAbsolute("Ice.Holder", package) << "<" << typeS << ">";
+ out << " extends " << getUnqualified("Ice.Holder", package) << "<" << typeS << ">";
}
out << sb;
if(!p->isLocal() && ((builtin && builtin->kind() == Builtin::KindObject) || cl))
@@ -4466,7 +4466,7 @@ Slice::GenCompat::HolderVisitor::writeHolder(const TypePtr& p)
out << eb;
out << sp << nl << "public void";
- out << nl << "valueReady(" << getAbsolute("Ice.Object", package) << " v)";
+ out << nl << "valueReady(" << getUnqualified("Ice.Object", package) << " v)";
out << sb;
out << nl << "if(v == null || v instanceof " << typeS << ")";
out << sb;
@@ -4529,9 +4529,9 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
string scoped = p->scoped();
string package = getPackage(p);
- string absolute = getAbsolute(p);
+ string absolute = getUnqualified(p);
- open(getAbsolute(p, "", "", "PrxHelper"), p->file());
+ open(getUnqualified(p, "", "", "PrxHelper"), p->file());
Output& out = output();
OperationList ops = p->allOperations();
@@ -4556,7 +4556,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
out << nl << "public final class " << name << "PrxHelper extends "
- << getAbsolute("Ice.ObjectPrxHelperBase", package) << " implements " << name << "Prx";
+ << getUnqualified("Ice.ObjectPrxHelperBase", package) << " implements " << name << "Prx";
out << sb;
@@ -4600,7 +4600,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << sp;
const string iresultParamName = getEscapedParamName(op, "iresult");
out << nl << "public " << retS << " end_" << op->name() << spar << outParams
- << (getAbsolute("Ice.AsyncResult", package) + " " + iresultParamName) << epar;
+ << (getUnqualified("Ice.AsyncResult", package) + " " + iresultParamName) << epar;
writeThrowsClause(package, throws);
out << sb;
if(op->returnsData())
@@ -4629,20 +4629,20 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
#endif
for(ExceptionList::const_iterator eli = throws.begin(); eli != throws.end(); ++eli)
{
- out << nl << "catch(" << getAbsolute(*eli, package) << " ex_)";
+ out << nl << "catch(" << getUnqualified(*eli, package) << " ex_)";
out << sb;
out << nl << "throw ex_;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("Ice.UserException", package) << " ex_)";
+ out << nl << "catch(" << getUnqualified("Ice.UserException", package) << " ex_)";
out << sb;
- out << nl << "throw new " << getAbsolute("Ice.UnknownUserException", package) << "(ex_.ice_id(), ex_);";
+ out << nl << "throw new " << getUnqualified("Ice.UnknownUserException", package) << "(ex_.ice_id(), ex_);";
out << eb;
out << eb;
if(ret || !outParams.empty())
{
- out << nl << getAbsolute("Ice.InputStream", package) << " istr_ = result_.startReadParams();";
+ out << nl << getUnqualified("Ice.InputStream", package) << " istr_ = result_.startReadParams();";
const ParamDeclList paramList = op->parameters();
ParamDeclList pl;
for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
@@ -4712,8 +4712,8 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << sp << nl << "static public void _iceI_" << op->name() << "_completed("
<< getAsyncCallbackInterface(op, package) << " cb, Ice.AsyncResult result)";
out << sb;
- out << nl << getAbsolute(cl, "", "", "Prx") << " _proxy = ("
- << getAbsolute(cl, "", "", "Prx") << ")result.getProxy();";
+ out << nl << getUnqualified(cl, "", "", "Prx") << " _proxy = ("
+ << getUnqualified(cl, "", "", "Prx") << ")result.getProxy();";
TypePtr ret = op->returnType();
if(ret)
@@ -4741,18 +4741,18 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << eb;
if(!throws.empty())
{
- out << nl << "catch(" << getAbsolute("Ice.UserException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.UserException", package) << " ex)";
out << sb;
out << nl << "cb.exception(ex);";
out << nl << "return;";
out << eb;
}
- out << nl << "catch(" << getAbsolute("Ice.LocalException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.LocalException", package) << " ex)";
out << sb;
out << nl << "cb.exception(ex);";
out << nl << "return;";
out << eb;
- out << nl << "catch(" << getAbsolute("Ice.SystemException", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.SystemException", package) << " ex)";
out << sb;
out << nl << "cb.exception(ex);";
out << nl << "return;";
@@ -4786,7 +4786,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"Raises a local exception if a communication error occurs.\n"
"@param obj The untyped proxy.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "public static " << name << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", package) << " obj)";
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package) << " obj)";
out << sb;
out << nl << "return checkedCastImpl(obj, ice_staticId(), " << name << "Prx.class, "
<< name << "PrxHelper.class);";
@@ -4799,7 +4799,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@param obj The untyped proxy.\n"
"@param context The Context map to send with the invocation.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "public static " << name << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", package) << " obj, "
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package) << " obj, "
<< contextParam << ')';
out << sb;
out << nl << "return checkedCastImpl(obj, context, ice_staticId(), " << name
@@ -4813,7 +4813,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@param obj The untyped proxy.\n"
"@param facet The name of the desired facet.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "public static " << name << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", package)
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
out << nl << "return checkedCastImpl(obj, facet, ice_staticId(), " << name
@@ -4828,7 +4828,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@param facet The name of the desired facet.\n"
"@param context The Context map to send with the invocation.\n"
"@return A proxy for this type, or null if the object does not support this type.");
- out << nl << "public static " << name << "Prx checkedCast(" << getAbsolute("Ice.ObjectPrx", package)
+ out << nl << "public static " << name << "Prx checkedCast(" << getUnqualified("Ice.ObjectPrx", package)
<< " obj, String facet, " << contextParam << ')';
out << sb;
out << nl << "return checkedCastImpl(obj, facet, context, ice_staticId(), " << name
@@ -4840,7 +4840,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"Downcasts the given proxy to this type without contacting the remote server.\n"
"@param obj The untyped proxy.\n"
"@return A proxy for this type.");
- out << nl << "public static " << name << "Prx uncheckedCast(" << getAbsolute("Ice.ObjectPrx", package) << " obj)";
+ out << nl << "public static " << name << "Prx uncheckedCast(" << getUnqualified("Ice.ObjectPrx", package) << " obj)";
out << sb;
out << nl << "return uncheckedCastImpl(obj, " << name << "Prx.class, " << name
<< "PrxHelper.class);";
@@ -4852,7 +4852,7 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
"@param obj The untyped proxy.\n"
"@param facet The name of the desired facet.\n"
"@return A proxy for this type.");
- out << nl << "public static " << name << "Prx uncheckedCast(" << getAbsolute("Ice.ObjectPrx", package)
+ out << nl << "public static " << name << "Prx uncheckedCast(" << getUnqualified("Ice.ObjectPrx", package)
<< " obj, String facet)";
out << sb;
out << nl << "return uncheckedCastImpl(obj, facet, " << name << "Prx.class, " << name
@@ -4896,15 +4896,15 @@ Slice::GenCompat::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "return _ids[" << scopedPos << "];";
out << eb;
- out << sp << nl << "public static void write(" << getAbsolute("Ice.OutputStream", package) << " ostr, " << name
+ out << sp << nl << "public static void write(" << getUnqualified("Ice.OutputStream", package) << " ostr, " << name
<< "Prx v)";
out << sb;
out << nl << "ostr.writeProxy(v);";
out << eb;
- out << sp << nl << "public static " << name << "Prx read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << sp << nl << "public static " << name << "Prx read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
- out << nl << getAbsolute("Ice.ObjectPrx", package) << " proxy = istr.readProxy();";
+ out << nl << getUnqualified("Ice.ObjectPrx", package) << " proxy = istr.readProxy();";
out << nl << "if(proxy != null)";
out << sb;
out << nl << name << "PrxHelper result = new " << name << "PrxHelper();";
@@ -4951,8 +4951,8 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p)
}
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
string typeS = typeToString(p, TypeModeIn, package);
@@ -5015,7 +5015,7 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void" << nl << "write(" << getAbsolute("Ice.OutputStream", package) << " ostr, "
+ out << nl << "public static void" << nl << "write(" << getUnqualified("Ice.OutputStream", package) << " ostr, "
<< typeS << " v)";
out << sb;
iter = 0;
@@ -5027,7 +5027,7 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p)
{
out << nl << "@SuppressWarnings(\"unchecked\")";
}
- out << nl << "public static " << typeS << nl << "read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ out << nl << "public static " << typeS << nl << "read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << typeS << " v;";
iter = 0;
@@ -5054,8 +5054,8 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p)
TypePtr value = p->valueType();
string name = p->name();
- string absolute = getAbsolute(p);
- string helper = getAbsolute(p, "", "", "Helper");
+ string absolute = getUnqualified(p);
+ string helper = getUnqualified(p, "", "", "Helper");
string package = getPackage(p);
StringList metaData = p->getMetaData();
string formalType = typeToString(p, TypeModeIn, package, StringList(), true);
@@ -5068,7 +5068,7 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << sp << nl << "public final class " << name << "Helper";
out << sb;
- out << nl << "public static void" << nl << "write(" << getAbsolute("Ice.OutputStream", package) << " ostr, "
+ out << nl << "public static void" << nl << "write(" << getUnqualified("Ice.OutputStream", package) << " ostr, "
<< formalType << " v)";
out << sb;
iter = 0;
@@ -5076,7 +5076,7 @@ Slice::GenCompat::HelperVisitor::visitDictionary(const DictionaryPtr& p)
out << eb;
out << sp << nl << "public static " << formalType
- << nl << "read(" << getAbsolute("Ice.InputStream", package) << " istr)";
+ << nl << "read(" << getUnqualified("Ice.InputStream", package) << " istr)";
out << sb;
out << nl << formalType << " v;";
iter = 0;
@@ -5201,35 +5201,35 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
vector<string> inParams = getInOutParams(op, package, InParam, true, optionalMapping);
vector<string> inArgs = getInOutArgs(op, InParam);
const string callbackParamName = getEscapedParamName(op, "cb");
- const string callbackParam = getAbsolute("Ice.Callback", package) + " " + callbackParamName;
+ const string callbackParam = getUnqualified("Ice.Callback", package) + " " + callbackParamName;
const ParamDeclList paramList = op->parameters();
int iter;
//
// Type-unsafe begin methods
//
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false" << "null"
<< epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << contextParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false"
<< "null" << epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << callbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false"
<< callbackParamName << epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << contextParam << callbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false"
@@ -5247,17 +5247,17 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
//
ContainerPtr container = op->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
- string opClassName = getAbsolute(cl, package, "Callback_", '_' + op->name());
+ string opClassName = getUnqualified(cl, package, "Callback_", '_' + op->name());
typeSafeCallbackParam = opClassName + " " + getEscapedParamName(op, "cb");
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << typeSafeCallbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << "null" << "false" << "false"
<< callbackParamName << epar << ';';
out << eb;
- out << sp << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name() << spar
+ out << sp << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name() << spar
<< inParams << contextParam << typeSafeCallbackParam << epar;
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << inArgs << contextParamName << "true" << "false"
@@ -5268,14 +5268,14 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
// Async methods that accept Java 8 lambda callbacks.
//
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, false, false, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package) << epar << ';';
out << eb;
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, false, true, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, false, true) << epar
@@ -5283,14 +5283,14 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
out << eb;
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, true, false, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true) << epar << ';';
out << eb;
out << sp;
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << op->name();
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << op->name();
writeParamList(out, getParamsAsyncLambda(op, package, true, true, optionalMapping));
out << sb;
out << nl << "return _iceI_begin_" << op->name() << spar << getArgsAsyncLambda(op, package, true, true) << epar
@@ -5305,7 +5305,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
copy(asyncParams.begin(), asyncParams.end(), back_inserter(params));
out << sp;
- out << nl << "private " << getAbsolute("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
+ out << nl << "private " << getUnqualified("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
writeParamList(out, params);
out << sb;
@@ -5363,7 +5363,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
out << eb;
out << sp;
- out << nl << "public final void _iceCompleted(" << getAbsolute("Ice.AsyncResult", package) << " result)";
+ out << nl << "public final void _iceCompleted(" << getUnqualified("Ice.AsyncResult", package) << " result)";
out << sb;
out << nl << p->name() << "PrxHelper._iceI_" << op->name() << "_completed(this, result);";
out << eb;
@@ -5392,7 +5392,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
"new " + baseClass + "(responseCb, userExceptionCb, exceptionCb, sentCb)");
out.inc();
out << sb;
- out << nl << "public final void _iceCompleted(" << getAbsolute("Ice.AsyncResult", package) << " result)";
+ out << nl << "public final void _iceCompleted(" << getUnqualified("Ice.AsyncResult", package) << " result)";
out << sb;
out << nl << p->name() << "PrxHelper._iceI_" << op->name() << "_completed(this, result);";
out << eb;
@@ -5413,7 +5413,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
params.push_back("IceInternal.CallbackBase cb");
out << sp;
- out << nl << "private " << getAbsolute("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
+ out << nl << "private " << getUnqualified("Ice.AsyncResult", package) << " _iceI_begin_" << op->name();
writeParamList(out, params);
out << sb;
if(op->returnsData())
@@ -5431,7 +5431,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
iter = 0;
if(!inArgs.empty())
{
- out << nl << getAbsolute("Ice.OutputStream", package) << " ostr = result.startWriteParams("
+ out << nl << getUnqualified("Ice.OutputStream", package) << " ostr = result.startWriteParams("
<< opFormatTypeToString(op) << ");";
ParamDeclList pl;
for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
@@ -5455,7 +5455,7 @@ Slice::GenCompat::HelperVisitor::writeOperation(const ClassDefPtr& p, const stri
out << nl << "result.invoke();";
out << eb;
- out << nl << "catch(" << getAbsolute("Ice.Exception", package) << " ex)";
+ out << nl << "catch(" << getUnqualified("Ice.Exception", package) << " ex)";
out << sb;
out << nl << "result.abort(ex);";
out << eb;
@@ -5480,7 +5480,7 @@ Slice::GenCompat::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "Prx");
+ string absolute = getUnqualified(p, "", "", "Prx");
open(absolute, p->file());
@@ -5494,14 +5494,14 @@ Slice::GenCompat::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
out << nl << "public interface " << name << "Prx extends ";
if(bases.empty())
{
- out << getAbsolute("Ice.ObjectPrx", package);
+ out << getUnqualified("Ice.ObjectPrx", package);
}
else
{
out.useCurrentPosAsIndent();
for(ClassList::const_iterator q = bases.begin(); q != bases.end();)
{
- out << getAbsolute(*q, package, "", "Prx");
+ out << getUnqualified(*q, package, "", "Prx");
if(++q != bases.end())
{
out << ',' << nl;
@@ -5595,17 +5595,17 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p)
// Start with the type-unsafe begin methods.
//
vector<string> inParams = getInOutParams(p, package, InParam, true, true);
- string callbackParam = getAbsolute("Ice.Callback", package) + " " + getEscapedParamName(p, "cb");
+ string callbackParam = getUnqualified("Ice.Callback", package) + " " + getEscapedParamName(p, "cb");
string callbackDoc = "@param cb The asynchronous callback object.";
out << sp;
writeDocCommentAMI(out, p, InParam);
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
<< epar << ';';
out << sp;
writeDocCommentAMI(out, p, InParam, contextDoc);
- out << nl << "public " << getAbsolute("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
+ out << nl << "public " << getUnqualified("Ice.AsyncResult", package) << " begin_" << p->name() << spar << inParams
<< contextParam << epar << ';';
out << sp;
@@ -5628,7 +5628,7 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p)
//
ContainerPtr container = p->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
- string opClassName = getAbsolute(cl, package, "Callback_", '_' + p->name());
+ string opClassName = getUnqualified(cl, package, "Callback_", '_' + p->name());
typeSafeCallbackParam = opClassName + " " + getEscapedParamName(p, "cb");
out << sp;
@@ -5771,7 +5771,7 @@ Slice::GenCompat::ProxyVisitor::visitOperation(const OperationPtr& p)
//
ContainerPtr container = p->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container);
- string opClassName = getAbsolute(cl, package, "Callback_", '_' + p->name());
+ string opClassName = getUnqualified(cl, package, "Callback_", '_' + p->name());
typeSafeCallbackParam = opClassName + " " + getEscapedParamName(p, "cb");
out << sp;
@@ -5800,7 +5800,7 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
if(!p->isLocal() && p->isInterface())
{
- string absolute = getAbsolute(p, "", "_", "Disp");
+ string absolute = getUnqualified(p, "", "_", "Disp");
open(absolute, p->file());
@@ -5825,7 +5825,7 @@ Slice::GenCompat::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
// Tie class
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "_", "Tie");
+ string absolute = getUnqualified(p, "", "_", "Tie");
string opIntfName = "Operations";
if(p->isLocal())
{
@@ -6100,7 +6100,7 @@ Slice::GenCompat::BaseImplVisitor::writeDecl(Output& out, const string& package,
if(en)
{
EnumeratorList enumerators = en->enumerators();
- out << " = " << getAbsolute(en, package) << '.' << fixKwd(enumerators.front()->name());
+ out << " = " << getUnqualified(en, package) << '.' << fixKwd(enumerators.front()->name());
}
else
{
@@ -6306,7 +6306,7 @@ Slice::GenCompat::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "I");
+ string absolute = getUnqualified(p, "", "", "I");
open(absolute, p->file());
@@ -6362,7 +6362,7 @@ Slice::GenCompat::ImplTieVisitor::visitClassDefStart(const ClassDefPtr& p)
string name = p->name();
ClassList bases = p->bases();
string package = getPackage(p);
- string absolute = getAbsolute(p, "", "", "I");
+ string absolute = getUnqualified(p, "", "", "I");
open(absolute, p->file());
@@ -6480,13 +6480,13 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
//
if(p->returnsData() && ((ret && !outParams.empty()) || outParams.size() > 1))
{
- open(getAbsolute(cl, "", "_Callback_", "_" + name), p->file());
+ open(getUnqualified(cl, "", "_Callback_", "_" + name), p->file());
Output& out = output();
writeDocCommentOp(out, p);
out << sp << nl << "public interface " << ("_Callback_" + cl->name()) << '_' << name
- << " extends " << getAbsolute(throws.empty() ? "Ice.TwowayCallback" : "Ice.TwowayCallbackUE", package);
+ << " extends " << getUnqualified(throws.empty() ? "Ice.TwowayCallback" : "Ice.TwowayCallbackUE", package);
out << sb;
out << nl << "public void response" << spar << params << epar << ';';
out << eb;
@@ -6495,7 +6495,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
}
string classNameAsync = "Callback_" + cl->name();
- string absoluteAsync = getAbsolute(cl, "", "Callback_", "_" + name);
+ string absoluteAsync = getUnqualified(cl, "", "Callback_", "_" + name);
open(absoluteAsync, p->file());
@@ -6511,7 +6511,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
out.dec();
out << sb;
- out << sp << nl << "public final void _iceCompleted(" << getAbsolute("Ice.AsyncResult", package)
+ out << sp << nl << "public final void _iceCompleted(" << getUnqualified("Ice.AsyncResult", package)
<< " result)";
out << sb;
out << nl << cl->name() << "PrxHelper._iceI_" << p->name() << "_completed(this, result);";
@@ -6521,7 +6521,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
}
else
{
- out << " extends " << getAbsolute("Ice.OnewayCallback", package);
+ out << " extends " << getUnqualified("Ice.OnewayCallback", package);
out << sb;
out << eb;
}
@@ -6532,10 +6532,10 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
string classNameAMD = "AMD_" + cl->name();
- string absoluteAMD = getAbsolute(cl, "", "AMD_", "_" + name);
+ string absoluteAMD = getUnqualified(cl, "", "AMD_", "_" + name);
string classNameAMDI = "_AMD_" + cl->name();
- string absoluteAMDI = getAbsolute(cl, "", "_AMD_", "_" + name);
+ string absoluteAMDI = getUnqualified(cl, "", "_AMD_", "_" + name);
const bool optionalMapping = useOptionalMapping(p);
vector<string> paramsAMD = getParamsAsyncCB(p, classPkg, true, optionalMapping);
@@ -6547,7 +6547,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
writeDocCommentOp(out, p);
out << sp << nl << "public interface " << classNameAMD << '_' << name;
- out << " extends " << getAbsolute("Ice.AMDCallback", package);
+ out << " extends " << getUnqualified("Ice.AMDCallback", package);
out << sb;
out << sp;
writeDocCommentAsync(out, p, OutParam);
@@ -6592,7 +6592,7 @@ Slice::GenCompat::AsyncVisitor::visitOperation(const OperationPtr& p)
iter = 0;
if(ret || !outParams.empty())
{
- out << nl << getAbsolute("Ice.OutputStream", package) << " ostr_ = this.startWriteParams();";
+ out << nl << getUnqualified("Ice.OutputStream", package) << " ostr_ = this.startWriteParams();";
writeMarshalUnmarshalParams(out, classPkg, outParams, p, iter, true, optionalMapping, false, "ret", false);
if(p->returnsClasses(false))
{