summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cppe/Gen.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-04-26 13:39:11 +0000
committerBernard Normier <bernard@zeroc.com>2007-04-26 13:39:11 +0000
commit706fa816a3f666a7993e187fd5a1baca1957b3a4 (patch)
tree9151844ffd8ee7bdbd9bf92200231d0a4cce2c5b /cpp/src/slice2cppe/Gen.cpp
parentAdded manifest embedding Removed support for VC60 and VC71 (diff)
downloadice-706fa816a3f666a7993e187fd5a1baca1957b3a4.tar.bz2
ice-706fa816a3f666a7993e187fd5a1baca1957b3a4.tar.xz
ice-706fa816a3f666a7993e187fd5a1baca1957b3a4.zip
_API reduction
Diffstat (limited to 'cpp/src/slice2cppe/Gen.cpp')
-rw-r--r--cpp/src/slice2cppe/Gen.cpp31
1 files changed, 7 insertions, 24 deletions
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp
index fbb3dd78242..eb376597047 100644
--- a/cpp/src/slice2cppe/Gen.cpp
+++ b/cpp/src/slice2cppe/Gen.cpp
@@ -767,19 +767,19 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
H << sp;
H << nl << _dllExport << "bool operator==(const " << name << "&) const;";
H << nl << _dllExport << "bool operator<(const " << name << "&) const;";
- H << nl << _dllExport << "bool operator!=(const " << name << "& __rhs) const";
+ H << nl << "bool operator!=(const " << name << "& __rhs) const";
H << sb;
H << nl << "return !operator==(__rhs);";
H << eb;
- H << nl << _dllExport << "bool operator<=(const " << name << "& __rhs) const";
+ H << nl << "bool operator<=(const " << name << "& __rhs) const";
H << sb;
H << nl << "return operator<(__rhs) || operator==(__rhs);";
H << eb;
- H << nl << _dllExport << "bool operator>(const " << name << "& __rhs) const";
+ H << nl << "bool operator>(const " << name << "& __rhs) const";
H << sb;
H << nl << "return !operator<(__rhs) && !operator==(__rhs);";
H << eb;
- H << nl << _dllExport << "bool operator>=(const " << name << "& __rhs) const";
+ H << nl << "bool operator>=(const " << name << "& __rhs) const";
H << sb;
H << nl << "return !operator<(__rhs);";
H << eb;
@@ -1264,8 +1264,6 @@ Slice::Gen::ProxyDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
string name = fixKwd(p->name());
H << sp << nl << "class " << name << ';';
- H << nl << _dllExport << "bool operator==(const " << name << "&, const " << name << "&);";
- H << nl << _dllExport << "bool operator<(const " << name << "&, const " << name << "&);";
}
Slice::Gen::ProxyVisitor::ProxyVisitor(Output& h, Output& c, const string& dllExport) :
@@ -1326,7 +1324,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
string scoped = fixKwd(p->scoped());
ClassList bases = p->bases();
- H << sp << nl << "class " << _dllExport << name << " : ";
+ H << sp << nl << "class " << name << " : ";
if(bases.empty())
{
H << "virtual public ::IceProxy::Ice::Object";
@@ -1360,7 +1358,7 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
string scoped = fixKwd(p->scoped());
string scope = fixKwd(p->scope());
- H << nl << nl << "static const ::std::string& ice_staticId();";
+ H << nl << nl << _dllExport << "static const ::std::string& ice_staticId();";
H << eb << ';';
string flatName = p->flattenedScope() + p->name() + "_ids";
@@ -1379,21 +1377,6 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "return " << flatName << '[' << scopedPos << "];";
C << eb;
- C << sp;
- C << nl << "bool" << nl << "IceProxy" << scope << "operator==(const ::IceProxy" << scoped
- << "& l, const ::IceProxy" << scoped << "& r)";
- C << sb;
- C << nl << "return static_cast<const ::IceProxy::Ice::Object&>(l) == "
- << "static_cast<const ::IceProxy::Ice::Object&>(r);";
- C << eb;
- C << sp;
- C << nl << "bool" << nl << "IceProxy" << scope << "operator<(const ::IceProxy" << scoped
- << "& l, const ::IceProxy" << scoped << "& r)";
- C << sb;
- C << nl << "return static_cast<const ::IceProxy::Ice::Object&>(l) < "
- << "static_cast<const ::IceProxy::Ice::Object&>(r);";
- C << eb;
-
_useWstring = resetUseWstring(_useWstringHist);
}
@@ -1454,7 +1437,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
}
H << fixKwd(name) << spar << args << "__defaultContext()" << epar << ';';
H << eb;
- H << nl << retS << ' ' << fixKwd(name) << spar << params << "const ::Ice::Context&" << epar
+ H << nl << _dllExport << retS << ' ' << fixKwd(name) << spar << params << "const ::Ice::Context&" << epar
<< ';';
C << sp << nl << retS << nl << "IceProxy" << scoped << spar << paramsDecl << "const ::Ice::Context& __ctx" << epar;