summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2002-01-23 18:35:56 +0000
committerMatthew Newhook <matthew@zeroc.com>2002-01-23 18:35:56 +0000
commita80f007ab5a322761ddfc2a727dec33b8867c2d9 (patch)
treea5cc5df3aad32fbe1482e50437972d7570582306 /cpp/src/slice2cpp/Gen.cpp
parentWIN32 updates. (diff)
downloadice-a80f007ab5a322761ddfc2a727dec33b8867c2d9.tar.bz2
ice-a80f007ab5a322761ddfc2a727dec33b8867c2d9.tar.xz
ice-a80f007ab5a322761ddfc2a727dec33b8867c2d9.zip
Added support for ice_ids.
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 76d5929520b..a0b247af227 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1855,6 +1855,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << exp2 << "static const ::std::string __classIds[" << classIds.size() << "];";
H << nl << exp2 << "virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current());";
H << nl << exp2 << "virtual const ::std::string* __getClassIds() const;";
+ H << nl << exp2 << "virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current());";
if (!p->isAbstract())
{
H << sp << nl << exp2 << "static ::Ice::ObjectFactoryPtr _factory;";
@@ -1896,6 +1897,12 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sb;
C << nl << "return __classIds;";
C << eb;
+
+ C << sp;
+ C << nl << "::std::vector< ::std::string>" << nl << scoped.substr(2) << "::ice_ids(const ::Ice::Current&)";
+ C << sb;
+ C << nl << "return ::std::vector< ::std::string>(&__ids[0], &__ids[" << ids.size() << "]);";
+ C << eb;
}
return true;
@@ -1930,6 +1937,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
StringList allOpNames;
transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), ::IceUtil::memFun(&Operation::name));
+ allOpNames.push_back("ice_ids");
allOpNames.push_back("ice_isA");
allOpNames.push_back("ice_ping");
allOpNames.sort();