diff options
author | Marc Laukien <marc@zeroc.com> | 2001-07-27 15:55:43 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-07-27 15:55:43 +0000 |
commit | 31440554bccfeadfd30e0963fbfe9fba94834fc1 (patch) | |
tree | a70ac06ceb5721aea9f240b1b54e93e0ea5cefbc /cpp/src/slice2cpp/Gen.cpp | |
parent | added spacing (diff) | |
download | ice-31440554bccfeadfd30e0963fbfe9fba94834fc1.tar.bz2 ice-31440554bccfeadfd30e0963fbfe9fba94834fc1.tar.xz ice-31440554bccfeadfd30e0963fbfe9fba94834fc1.zip |
removed spacing
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 402 |
1 files changed, 201 insertions, 201 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index dbe6030ac2f..e4de966a3c8 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -51,7 +51,7 @@ Slice::Gen::Gen(const string& name, p != _includePaths.end(); ++p) { - if (p -> length() && (*p)[p -> length() - 1] != '/') + if (p->length() && (*p)[p->length() - 1] != '/') *p += '/'; } @@ -113,7 +113,7 @@ Slice::Gen::generate(const UnitPtr& unit) H << "\n#include <Ice/ObjectF.h>"; H << "\n#include <Ice/LocalObjectF.h>"; H << "\n#include <Ice/Native.h>"; - if (unit -> hasProxies()) + if (unit->hasProxies()) { H << "\n#include <Ice/Proxy.h>"; H << "\n#include <Ice/Object.h>"; @@ -127,7 +127,7 @@ Slice::Gen::generate(const UnitPtr& unit) C << "\n#include <Ice/Stream.h>"; } - StringList includes = unit -> includeFiles(); + StringList includes = unit->includeFiles(); for (StringList::iterator q = includes.begin(); q != includes.end(); ++q) @@ -154,31 +154,31 @@ Slice::Gen::generate(const UnitPtr& unit) C.restoreIndent(); ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport); - unit -> visit(&proxyDeclVisitor); + unit->visit(&proxyDeclVisitor); ObjectDeclVisitor objectDeclVisitor(H, C, _dllExport); - unit -> visit(&objectDeclVisitor); + unit->visit(&objectDeclVisitor); IceVisitor iceVisitor(H, C, _dllExport); - unit -> visit(&iceVisitor); + unit->visit(&iceVisitor); HandleVisitor handleVisitor(H, C, _dllExport); - unit -> visit(&handleVisitor); + unit->visit(&handleVisitor); TypesVisitor typesVisitor(H, C, _dllExport); - unit -> visit(&typesVisitor); + unit->visit(&typesVisitor); ProxyVisitor proxyVisitor(H, C, _dllExport); - unit -> visit(&proxyVisitor); + unit->visit(&proxyVisitor); DelegateVisitor delegateVisitor(H, C, _dllExport); - unit -> visit(&delegateVisitor); + unit->visit(&delegateVisitor); DelegateMVisitor delegateMVisitor(H, C, _dllExport); - unit -> visit(&delegateMVisitor); + unit->visit(&delegateMVisitor); ObjectVisitor objectVisitor(H, C, _dllExport); - unit -> visit(&objectVisitor); + unit->visit(&objectVisitor); } string @@ -189,9 +189,9 @@ Slice::Gen::changeInclude(const string& orig) p != _includePaths.end(); ++p) { - if (orig.compare(0, p -> length(), *p) == 0) + if (orig.compare(0, p->length(), *p) == 0) { - string s = orig.substr(p -> length()); + string s = orig.substr(p->length()); if (s.length() < file.length()) file = s; } @@ -233,10 +233,10 @@ Slice::Gen::TypesVisitor::TypesVisitor(Output& h, Output& c, const string& dllEx void Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasOtherConstructedTypes()) + if (!p->hasOtherConstructedTypes()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -245,7 +245,7 @@ Slice::Gen::TypesVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasOtherConstructedTypes()) + if (!p->hasOtherConstructedTypes()) return; H << sp; @@ -255,8 +255,8 @@ Slice::Gen::TypesVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::TypesVisitor::visitVector(const VectorPtr& p) { - string name = p -> name(); - TypePtr subtype = p -> type(); + string name = p->name(); + TypePtr subtype = p->type(); string s = typeToString(subtype); if (s[0] == ':') s.insert(0, " "); @@ -266,8 +266,8 @@ Slice::Gen::TypesVisitor::visitVector(const VectorPtr& p) BuiltinPtr builtin = BuiltinPtr::dynamicCast(subtype); if (!builtin) { - string scoped = p -> scoped(); - string scope = p -> scope(); + string scoped = p->scoped(); + string scope = p->scope(); if (scope.length()) scope.erase(0, 2); @@ -280,7 +280,7 @@ Slice::Gen::TypesVisitor::visitVector(const VectorPtr& p) C << nl << "void" << nl << scope << "::__write(::IceInternal::Stream* __os, const " << scoped << "& v, ::" << scope << "::__U__" << name << ')'; C << sb; - C << nl << "__os -> write(::Ice::Int(v.size()));"; + C << nl << "__os->write(::Ice::Int(v.size()));"; C << nl << scoped << "::const_iterator p;"; C << nl << "for (p = v.begin(); p != v.end(); ++p)"; C.inc(); @@ -292,7 +292,7 @@ Slice::Gen::TypesVisitor::visitVector(const VectorPtr& p) << "::__U__" << name << ')'; C << sb; C << nl << "::Ice::Int sz;"; - C << nl << "__is -> read(sz);"; + C << nl << "__is->read(sz);"; // Don't use v.resize(sz) or v.reserve(sz) here, as it // cannot be checked whether sz is a reasonable value C << nl << "while (sz--)"; @@ -317,8 +317,8 @@ Slice::Gen::TypesVisitor::visitVector(const VectorPtr& p) void Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) { - string name = p -> name(); - StringList enumerators = p -> enumerators(); + string name = p->name(); + StringList enumerators = p->enumerators(); H << sp; H << nl << "enum " << name; H << sb; @@ -331,8 +331,8 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) } H << eb << ';'; - string scoped = p -> scoped(); - string scope = p -> scope(); + string scoped = p->scoped(); + string scope = p->scope(); if (scope.length()) scope.erase(0, 2); @@ -345,13 +345,13 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) C << nl << "void" << nl << scope << "::__write(::IceInternal::Stream* __os, " << scoped << " v)"; C << sb; if (sz <= numeric_limits<Ice::Byte>::max()) - C << nl << "__os -> write(static_cast< ::Ice::Byte>(v));"; + C << nl << "__os->write(static_cast< ::Ice::Byte>(v));"; else if (sz <= numeric_limits<Ice::Short>::max()) - C << nl << "__os -> write(static_cast< ::Ice::Short>(v));"; + C << nl << "__os->write(static_cast< ::Ice::Short>(v));"; else if (sz <= numeric_limits<Ice::Int>::max()) - C << nl << "__os -> write(static_cast< ::Ice::Int>(v));"; + C << nl << "__os->write(static_cast< ::Ice::Int>(v));"; else - C << nl << "__os -> write(static_cast< ::Ice::Long>(v));"; + C << nl << "__os->write(static_cast< ::Ice::Long>(v));"; C << eb; C << sp; C << nl << "void" << nl << scope << "::__read(::IceInternal::Stream* __is, " << scoped << "& v)"; @@ -359,25 +359,25 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) if (sz <= numeric_limits<Ice::Byte>::max()) { C << nl << "::Ice::Byte val;"; - C << nl << "__is -> read(val);"; + C << nl << "__is->read(val);"; C << nl << "v = static_cast< " << scoped << ">(val);"; } else if (sz <= numeric_limits<Ice::Short>::max()) { C << nl << "::Ice::Short val;"; - C << nl << "__is -> read(val);"; + C << nl << "__is->read(val);"; C << nl << "v = static_cast< " << scoped << ">(val);"; } else if (sz <= numeric_limits<Ice::Int>::max()) { C << nl << "::Ice::Int val;"; - C << nl << "__is -> read(val);"; + C << nl << "__is->read(val);"; C << nl << "v = static_cast< " << scoped << ">(val);"; } else { C << nl << "::Ice::Long val;"; - C << nl << "__is -> read(val);"; + C << nl << "__is->read(val);"; C << nl << "v = static_cast< " << scoped << ">(val);"; } C << eb; @@ -386,7 +386,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) void Slice::Gen::TypesVisitor::visitNative(const NativePtr& p) { - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "typedef ::IceNative::" << name << ' ' << name << ';'; @@ -400,7 +400,7 @@ Slice::Gen::ProxyDeclVisitor::ProxyDeclVisitor(Output& h, Output& c, const strin void Slice::Gen::ProxyDeclVisitor::visitUnitStart(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -410,7 +410,7 @@ Slice::Gen::ProxyDeclVisitor::visitUnitStart(const UnitPtr& p) void Slice::Gen::ProxyDeclVisitor::visitUnitEnd(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -420,10 +420,10 @@ Slice::Gen::ProxyDeclVisitor::visitUnitEnd(const UnitPtr& p) void Slice::Gen::ProxyDeclVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -432,7 +432,7 @@ Slice::Gen::ProxyDeclVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::ProxyDeclVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -442,10 +442,10 @@ Slice::Gen::ProxyDeclVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::ProxyDeclVisitor::visitClassDecl(const ClassDeclPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "class " << name << ';'; @@ -459,7 +459,7 @@ Slice::Gen::ProxyVisitor::ProxyVisitor(Output& h, Output& c, const string& dllEx void Slice::Gen::ProxyVisitor::visitUnitStart(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -469,7 +469,7 @@ Slice::Gen::ProxyVisitor::visitUnitStart(const UnitPtr& p) void Slice::Gen::ProxyVisitor::visitUnitEnd(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -479,10 +479,10 @@ Slice::Gen::ProxyVisitor::visitUnitEnd(const UnitPtr& p) void Slice::Gen::ProxyVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -491,7 +491,7 @@ Slice::Gen::ProxyVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::ProxyVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -501,12 +501,12 @@ Slice::Gen::ProxyVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; - string name = p -> name(); - string scoped = p -> scoped(); - ClassList bases = p -> bases(); + string name = p->name(); + string scoped = p->scoped(); + ClassList bases = p->bases(); H << sp; H << nl << "class" << _dllExport << ' ' << name << " : "; @@ -518,7 +518,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p) ClassList::iterator q = bases.begin(); while (q != bases.end()) { - H << "virtual public ::IceProxy" << (*q) -> scoped(); + H << "virtual public ::IceProxy" << (*q)->scoped(); if (++q != bases.end()) H << ',' << nl; } @@ -541,10 +541,10 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p) void Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; - string scoped = p -> scoped(); + string scoped = p->scoped(); H.dec(); H << sp; @@ -564,20 +564,20 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p) void Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) { - ContainerPtr container = p -> container(); + ContainerPtr container = p->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); - if (cl -> isLocal()) + if (cl->isLocal()) return; - string name = p -> name(); - string scoped = p -> scoped(); - string scope = p -> scope(); + string name = p->name(); + string scoped = p->scoped(); + string scope = p->scope(); - TypePtr ret = p -> returnType(); + TypePtr ret = p->returnType(); string retS = returnTypeToString(ret); - TypeStringList inParams = p -> inputParameters(); - TypeStringList outParams = p -> outputParameters(); + TypeStringList inParams = p->inputParameters(); + TypeStringList outParams = p->outputParameters(); TypeStringList::iterator q; string params = "("; @@ -593,12 +593,12 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = inputTypeToString(q -> first); + string typeString = inputTypeToString(q->first); params += typeString; paramsDecl += typeString; paramsDecl += ' '; - paramsDecl += q -> second; - args += q -> second; + paramsDecl += q->second; + args += q->second; } for (q = outParams.begin(); q != outParams.end(); ++q) @@ -610,19 +610,19 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = outputTypeToString(q -> first); + string typeString = outputTypeToString(q->first); params += typeString; paramsDecl += typeString; paramsDecl += ' '; - paramsDecl += q -> second; - args += q -> second; + paramsDecl += q->second; + args += q->second; } params += ')'; paramsDecl += ')'; args += ')'; - TypeList throws = p -> throws(); + TypeList throws = p->throws(); H << sp; H << nl << retS << ' ' << name << params << ';'; @@ -634,7 +634,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) C << nl; if (ret) C << "return "; - C << "__del -> " << name << args << ";"; + C << "__del->" << name << args << ";"; C << eb; } @@ -646,7 +646,7 @@ Slice::Gen::DelegateVisitor::DelegateVisitor(Output& h, Output& c, const string& void Slice::Gen::DelegateVisitor::visitUnitStart(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -656,7 +656,7 @@ Slice::Gen::DelegateVisitor::visitUnitStart(const UnitPtr& p) void Slice::Gen::DelegateVisitor::visitUnitEnd(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -666,10 +666,10 @@ Slice::Gen::DelegateVisitor::visitUnitEnd(const UnitPtr& p) void Slice::Gen::DelegateVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -678,7 +678,7 @@ Slice::Gen::DelegateVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::DelegateVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -688,11 +688,11 @@ Slice::Gen::DelegateVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; - string name = p -> name(); - ClassList bases = p -> bases(); + string name = p->name(); + ClassList bases = p->bases(); H << sp; H << nl << "class" << _dllExport << ' ' << name << " : "; @@ -704,7 +704,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) ClassList::iterator q = bases.begin(); while (q != bases.end()) { - H << "virtual public ::IceDelegate" << (*q) -> scoped(); + H << "virtual public ::IceDelegate" << (*q)->scoped(); if (++q != bases.end()) H << ',' << nl; } @@ -719,7 +719,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) void Slice::Gen::DelegateVisitor::visitClassDefEnd(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; H << eb << ';'; @@ -728,18 +728,18 @@ Slice::Gen::DelegateVisitor::visitClassDefEnd(const ClassDefPtr& p) void Slice::Gen::DelegateVisitor::visitOperation(const OperationPtr& p) { - ContainerPtr container = p -> container(); + ContainerPtr container = p->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); - if (cl -> isLocal()) + if (cl->isLocal()) return; - string name = p -> name(); + string name = p->name(); - TypePtr ret = p -> returnType(); + TypePtr ret = p->returnType(); string retS = returnTypeToString(ret); - TypeStringList inParams = p -> inputParameters(); - TypeStringList outParams = p -> outputParameters(); + TypeStringList inParams = p->inputParameters(); + TypeStringList outParams = p->outputParameters(); TypeStringList::iterator q; string params = "("; @@ -753,9 +753,9 @@ Slice::Gen::DelegateVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = inputTypeToString(q -> first); + string typeString = inputTypeToString(q->first); params += typeString; - args += q -> second; + args += q->second; } for (q = outParams.begin(); q != outParams.end(); ++q) @@ -766,15 +766,15 @@ Slice::Gen::DelegateVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = outputTypeToString(q -> first); + string typeString = outputTypeToString(q->first); params += typeString; - args += q -> second; + args += q->second; } params += ')'; args += ')'; - TypeList throws = p -> throws(); + TypeList throws = p->throws(); H << sp; H << nl << "virtual " << retS << ' ' << name << params << " = 0;"; @@ -788,7 +788,7 @@ Slice::Gen::DelegateMVisitor::DelegateMVisitor(Output& h, Output& c, const strin void Slice::Gen::DelegateMVisitor::visitUnitStart(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -798,7 +798,7 @@ Slice::Gen::DelegateMVisitor::visitUnitStart(const UnitPtr& p) void Slice::Gen::DelegateMVisitor::visitUnitEnd(const UnitPtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -808,10 +808,10 @@ Slice::Gen::DelegateMVisitor::visitUnitEnd(const UnitPtr& p) void Slice::Gen::DelegateMVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -820,7 +820,7 @@ Slice::Gen::DelegateMVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::DelegateMVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasProxies()) + if (!p->hasProxies()) return; H << sp; @@ -830,12 +830,12 @@ Slice::Gen::DelegateMVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; - string name = p -> name(); - string scoped = p -> scoped(); - ClassList bases = p -> bases(); + string name = p->name(); + string scoped = p->scoped(); + ClassList bases = p->bases(); H << sp; H << nl << "class" << _dllExport << ' ' << name << " : "; @@ -848,7 +848,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) ClassList::iterator q = bases.begin(); while (q != bases.end()) { - H << nl << "virtual public ::IceDelegateM" << (*q) -> scoped(); + H << nl << "virtual public ::IceDelegateM" << (*q)->scoped(); if (++q != bases.end()) H << ','; } @@ -863,7 +863,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) void Slice::Gen::DelegateMVisitor::visitClassDefEnd(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; H << eb << ';'; @@ -872,20 +872,20 @@ Slice::Gen::DelegateMVisitor::visitClassDefEnd(const ClassDefPtr& p) void Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) { - ContainerPtr container = p -> container(); + ContainerPtr container = p->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); - if (cl -> isLocal()) + if (cl->isLocal()) return; - string name = p -> name(); - string scoped = p -> scoped(); - string scope = p -> scope(); + string name = p->name(); + string scoped = p->scoped(); + string scope = p->scope(); - TypePtr ret = p -> returnType(); + TypePtr ret = p->returnType(); string retS = returnTypeToString(ret); - TypeStringList inParams = p -> inputParameters(); - TypeStringList outParams = p -> outputParameters(); + TypeStringList inParams = p->inputParameters(); + TypeStringList outParams = p->outputParameters(); TypeStringList::iterator q; string params = "("; @@ -901,12 +901,12 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = inputTypeToString(q -> first); + string typeString = inputTypeToString(q->first); params += typeString; paramsDecl += typeString; paramsDecl += ' '; - paramsDecl += q -> second; - args += q -> second; + paramsDecl += q->second; + args += q->second; } for (q = outParams.begin(); q != outParams.end(); ++q) @@ -918,19 +918,19 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = outputTypeToString(q -> first); + string typeString = outputTypeToString(q->first); params += typeString; paramsDecl += typeString; paramsDecl += ' '; - paramsDecl += q -> second; - args += q -> second; + paramsDecl += q->second; + args += q->second; } params += ')'; paramsDecl += ')'; args += ')'; - TypeList throws = p -> throws(); + TypeList throws = p->throws(); H << sp; H << nl << "virtual " << retS << ' ' << name << params << ';'; @@ -941,14 +941,14 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) if (ret || !outParams.empty() || !throws.empty()) C << nl << "::IceInternal::Stream* __is = __out.is();"; C << nl << "::IceInternal::Stream* __os = __out.os();"; - C << nl << "__os -> write(\"" << name << "\");"; + C << nl << "__os->write(\"" << name << "\");"; writeMarshalCode(C, inParams, 0); C << nl << "if (!__out.invoke())"; if (!throws.empty()) { C << sb; C << nl << "::Ice::Int __exnum;"; - C << nl << "__is -> read(__exnum);"; + C << nl << "__is->read(__exnum);"; C << nl << "switch (__exnum)"; C << sb; TypeList::iterator r; @@ -962,7 +962,7 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) writeAllocateCode(C, li, 0); writeUnmarshalCode(C, li, 0); if (ClassDeclPtr::dynamicCast(*r) || ProxyPtr::dynamicCast(*r)) - C << nl << "__ex -> _throw();"; + C << nl << "__ex->_throw();"; else C << nl << "throw __ex;"; C << eb; @@ -992,10 +992,10 @@ Slice::Gen::ObjectDeclVisitor::ObjectDeclVisitor(Output& h, Output& c, const str void Slice::Gen::ObjectDeclVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasClassDecls()) + if (!p->hasClassDecls()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -1004,7 +1004,7 @@ Slice::Gen::ObjectDeclVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::ObjectDeclVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasClassDecls()) + if (!p->hasClassDecls()) return; H << sp; @@ -1014,7 +1014,7 @@ Slice::Gen::ObjectDeclVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p) { - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "class " << name << ';'; @@ -1028,10 +1028,10 @@ Slice::Gen::ObjectVisitor::ObjectVisitor(Output& h, Output& c, const string& dll void Slice::Gen::ObjectVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasClassDefs()) + if (!p->hasClassDefs()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -1040,7 +1040,7 @@ Slice::Gen::ObjectVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::ObjectVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasClassDefs()) + if (!p->hasClassDefs()) return; H << sp; @@ -1050,16 +1050,16 @@ Slice::Gen::ObjectVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) { - string name = p -> name(); - string scoped = p -> scoped(); - ClassList bases = p -> bases(); + string name = p->name(); + string scoped = p->scoped(); + ClassList bases = p->bases(); H << sp; H << nl << "class" << _dllExport << ' ' << name << "PtrE : "; H.useCurrentPosAsIndent(); if (bases.empty()) { - if (p -> isLocal()) + if (p->isLocal()) H << "virtual public ::Ice::LocalObjectPtrE"; else H << "virtual public ::Ice::ObjectPtrE"; @@ -1069,7 +1069,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) ClassList::iterator q = bases.begin(); while (q != bases.end()) { - H << "virtual public " << (*q) -> scoped() << "PtrE"; + H << "virtual public " << (*q)->scoped() << "PtrE"; if (++q != bases.end()) H << ',' << nl; } @@ -1103,7 +1103,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) C << nl << "return dynamic_cast< " << scoped << "*>(_ptr.get());"; C << eb; - if (!p -> isLocal()) + if (!p->isLocal()) { H << sp; H << nl << "class" << _dllExport << ' ' << name << "PrxE : "; @@ -1115,7 +1115,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) ClassList::iterator q = bases.begin(); while (q != bases.end()) { - H << "virtual public " << (*q) -> scoped() << "PrxE"; + H << "virtual public " << (*q)->scoped() << "PrxE"; if (++q != bases.end()) H << ',' << nl; } @@ -1156,7 +1156,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) H.useCurrentPosAsIndent(); if (bases.empty()) { - if (p -> isLocal()) + if (p->isLocal()) H << "virtual public ::Ice::LocalObject"; else H << "virtual public ::Ice::Object"; @@ -1166,12 +1166,12 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) ClassList::iterator q = bases.begin(); while (q != bases.end()) { - H << "virtual public " << (*q) -> scoped(); + H << "virtual public " << (*q)->scoped(); if (++q != bases.end()) H << ',' << nl; } } - if (!p -> isLocal()) + if (!p->isLocal()) H << ',' << nl << "virtual public ::IceDelegate" << scoped; H.restoreIndent(); H << sb; @@ -1186,9 +1186,9 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) C << nl << "throw " << scoped << "PtrE(this);"; C << eb; - if (!p -> isLocal()) + if (!p->isLocal()) { - ClassList allBases = p -> allBases(); + ClassList allBases = p->allBases(); StringList ids; transform(allBases.begin(), allBases.end(), back_inserter(ids), @@ -1206,10 +1206,10 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) cl = bases.front(); else cl = 0; - while (cl && !cl -> isInterface()) + while (cl && !cl->isInterface()) { allBaseClasses.push_back(cl); - ClassList baseBases = cl -> bases(); + ClassList baseBases = cl->bases(); if (!baseBases.empty()) cl = baseBases.front(); else @@ -1219,7 +1219,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) transform(allBaseClasses.begin(), allBaseClasses.end(), back_inserter(classIds), ::Ice::memFun(&ClassDef::scoped)); - if (!p -> isInterface()) + if (!p->isInterface()) classIds.push_front(scoped); classIds.push_back("::Ice::Object"); @@ -1274,18 +1274,18 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) void Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) { - string name = p -> name(); - string scoped = p -> scoped(); + string name = p->name(); + string scoped = p->scoped(); - ClassList bases = p -> bases(); + ClassList bases = p->bases(); ClassDefPtr base; - if (!bases.empty() && !bases.front() -> isInterface()) + if (!bases.empty() && !bases.front()->isInterface()) base = bases.front(); - if (!p -> isLocal()) + if (!p->isLocal()) { - OperationList allOperations = p -> allOperations(); - if (!p -> allOperations().empty()) + OperationList allOperations = p->allOperations(); + if (!p->allOperations().empty()) { StringList allOpNames; transform(allOperations.begin(), allOperations.end(), back_inserter(allOpNames), @@ -1347,26 +1347,26 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) H << nl << "virtual void __read(::IceInternal::Stream*);"; H << eb << ';'; TypeStringList memberList; - DataMemberList dataMembers = p -> dataMembers(); + DataMemberList dataMembers = p->dataMembers(); DataMemberList::const_iterator q; for (q = dataMembers.begin(); q != dataMembers.end(); ++q) - memberList.push_back(make_pair((*q) -> type(), (*q) -> name())); + memberList.push_back(make_pair((*q)->type(), (*q)->name())); C << sp; C << nl << "void" << nl << scoped.substr(2) << "::__write(::IceInternal::Stream* __os)"; C << sb; - C << nl << "__os -> startWriteEncaps();"; + C << nl << "__os->startWriteEncaps();"; writeMarshalCode(C, memberList, 0); - C << nl << "__os -> endWriteEncaps();"; + C << nl << "__os->endWriteEncaps();"; if (base) { C.zeroIndent(); C << nl << "#ifdef WIN32"; // COMPILERBUG C.restoreIndent(); - C << nl << base -> name() << "::__write(__os);"; + C << nl << base->name() << "::__write(__os);"; C.zeroIndent(); C << nl << "#else"; C.restoreIndent(); - C << nl << base -> scoped() << "::__write(__os);"; + C << nl << base->scoped() << "::__write(__os);"; C.zeroIndent(); C << nl << "#endif"; C.restoreIndent(); @@ -1375,19 +1375,19 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << sp; C << nl << "void" << nl << scoped.substr(2) << "::__read(::IceInternal::Stream* __is)"; C << sb; - C << nl << "__is -> startReadEncaps();"; + C << nl << "__is->startReadEncaps();"; writeUnmarshalCode(C, memberList, 0); - C << nl << "__is -> endReadEncaps();"; + C << nl << "__is->endReadEncaps();"; if (base) { C.zeroIndent(); C << nl << "#ifdef WIN32"; // COMPILERBUG C.restoreIndent(); - C << nl << base -> name() << "::__read(__is);"; + C << nl << base->name() << "::__read(__is);"; C.zeroIndent(); C << nl << "#else"; C.restoreIndent(); - C << nl << base -> scoped() << "::__read(__is);"; + C << nl << base->scoped() << "::__read(__is);"; C.zeroIndent(); C << nl << "#endif"; C.restoreIndent(); @@ -1398,17 +1398,17 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) void Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) { - ContainerPtr container = p -> container(); + ContainerPtr container = p->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); - string name = p -> name(); - string scoped = p -> scoped(); - string scope = p -> scope(); + string name = p->name(); + string scoped = p->scoped(); + string scope = p->scope(); - TypePtr ret = p -> returnType(); + TypePtr ret = p->returnType(); string retS = returnTypeToString(ret); - TypeStringList inParams = p -> inputParameters(); - TypeStringList outParams = p -> outputParameters(); + TypeStringList inParams = p->inputParameters(); + TypeStringList outParams = p->outputParameters(); TypeStringList::iterator q; string params = "("; @@ -1424,12 +1424,12 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = inputTypeToString(q -> first); + string typeString = inputTypeToString(q->first); params += typeString; paramsDecl += typeString; paramsDecl += ' '; - paramsDecl += q -> second; - args += q -> second; + paramsDecl += q->second; + args += q->second; } for (q = outParams.begin(); q != outParams.end(); ++q) @@ -1441,24 +1441,24 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) args += ", "; } - string typeString = outputTypeToString(q -> first); + string typeString = outputTypeToString(q->first); params += typeString; paramsDecl += typeString; paramsDecl += ' '; - paramsDecl += q -> second; - args += q -> second; + paramsDecl += q->second; + args += q->second; } params += ')'; paramsDecl += ')'; args += ')'; - TypeList throws = p -> throws(); + TypeList throws = p->throws(); H << sp; H << nl << "virtual " << retS << ' ' << name << params << " = 0;"; - if (!cl -> isLocal()) + if (!cl->isLocal()) { H << nl << "::IceInternal::DispatchStatus ___" << name << "(::IceInternal::Incoming&);"; C << sp; @@ -1490,7 +1490,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) { C << nl << "catch(" << exceptionTypeToString(*r) << " __ex)"; C << sb; - C << nl << "__os -> write(" << cnt++ << ");"; + C << nl << "__os->write(" << cnt++ << ");"; if (ClassDeclPtr::dynamicCast(*r) || ProxyPtr::dynamicCast(*r)) { string s = "static_cast< "; @@ -1513,8 +1513,8 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) void Slice::Gen::ObjectVisitor::visitDataMember(const DataMemberPtr& p) { - string name = p -> name(); - string s = typeToString(p -> type()); + string name = p->name(); + string s = typeToString(p->type()); H << sp; H << nl << s << ' ' << name << ';'; } @@ -1527,7 +1527,7 @@ Slice::Gen::IceVisitor::IceVisitor(Output& h, Output& c, const string& dllExport void Slice::Gen::IceVisitor::visitUnitStart(const UnitPtr& p) { - if (!p -> hasClassDecls()) + if (!p->hasClassDecls()) return; H << sp; @@ -1537,7 +1537,7 @@ Slice::Gen::IceVisitor::visitUnitStart(const UnitPtr& p) void Slice::Gen::IceVisitor::visitUnitEnd(const UnitPtr& p) { - if (!p -> hasClassDecls()) + if (!p->hasClassDecls()) return; H << sp; @@ -1547,12 +1547,12 @@ Slice::Gen::IceVisitor::visitUnitEnd(const UnitPtr& p) void Slice::Gen::IceVisitor::visitClassDecl(const ClassDeclPtr& p) { - string scoped = p -> scoped(); + string scoped = p->scoped(); H << sp; H << nl << "void" << _dllExport << " incRef(" << scoped << "*);"; H << nl << "void" << _dllExport << " decRef(" << scoped << "*);"; - if (!p -> isLocal()) + if (!p->isLocal()) { H << sp; H << nl << "void" << _dllExport << " incRef(::IceProxy" << scoped << "*);"; @@ -1566,25 +1566,25 @@ Slice::Gen::IceVisitor::visitClassDecl(const ClassDeclPtr& p) void Slice::Gen::IceVisitor::visitClassDefStart(const ClassDefPtr& p) { - string scoped = p -> scoped(); + string scoped = p->scoped(); C << sp; - C << nl << "void IceInternal::incRef(" << scoped << "* p) { p -> __incRef(); }"; - C << nl << "void IceInternal::decRef(" << scoped << "* p) { p -> __decRef(); }"; + C << nl << "void IceInternal::incRef(" << scoped << "* p) { p->__incRef(); }"; + C << nl << "void IceInternal::decRef(" << scoped << "* p) { p->__decRef(); }"; - if (!p -> isLocal()) + if (!p->isLocal()) { C << sp; - C << nl << "void IceInternal::incRef(::IceProxy" << scoped << "* p) { p -> __incRef(); }"; - C << nl << "void IceInternal::decRef(::IceProxy" << scoped << "* p) { p -> __decRef(); }"; + C << nl << "void IceInternal::incRef(::IceProxy" << scoped << "* p) { p->__incRef(); }"; + C << nl << "void IceInternal::decRef(::IceProxy" << scoped << "* p) { p->__decRef(); }"; C << sp; C << nl << "void IceInternal::checkedCast(::IceProxy::Ice::Object* b, ::IceProxy" << scoped << "*& d)"; C << sb; C << nl << "d = dynamic_cast< ::IceProxy" << scoped << "*>(b);"; - C << nl << "if (!d && b -> _isA(\"" << scoped << "\"))"; + C << nl << "if (!d && b->_isA(\"" << scoped << "\"))"; C << sb; C << nl << "d = new ::IceProxy" << scoped << ';'; - C << nl << "b -> __copyTo(d);"; + C << nl << "b->__copyTo(d);"; C << eb; C << eb; C << sp; @@ -1594,7 +1594,7 @@ Slice::Gen::IceVisitor::visitClassDefStart(const ClassDefPtr& p) C << nl << "if (!d)"; C << sb; C << nl << "d = new ::IceProxy" << scoped << ';'; - C << nl << "b -> __copyTo(d);"; + C << nl << "b->__copyTo(d);"; C << eb; C << eb; } @@ -1608,10 +1608,10 @@ Slice::Gen::HandleVisitor::HandleVisitor(Output& h, Output& c, const string& dll void Slice::Gen::HandleVisitor::visitModuleStart(const ModulePtr& p) { - if (!p -> hasClassDecls()) + if (!p->hasClassDecls()) return; - string name = p -> name(); + string name = p->name(); H << sp; H << nl << "namespace " << name << nl << '{'; @@ -1620,7 +1620,7 @@ Slice::Gen::HandleVisitor::visitModuleStart(const ModulePtr& p) void Slice::Gen::HandleVisitor::visitModuleEnd(const ModulePtr& p) { - if (!p -> hasClassDecls()) + if (!p->hasClassDecls()) return; H << sp; @@ -1630,12 +1630,12 @@ Slice::Gen::HandleVisitor::visitModuleEnd(const ModulePtr& p) void Slice::Gen::HandleVisitor::visitClassDecl(const ClassDeclPtr& p) { - string name = p -> name(); - string scoped = p -> scoped(); + string name = p->name(); + string scoped = p->scoped(); H << sp; H << nl << "typedef ::IceInternal::Handle< " << scoped << "> " << name << "Ptr;"; - if (!p -> isLocal()) + if (!p->isLocal()) { H << nl << "typedef ::IceInternal::ProxyHandle< ::IceProxy" << scoped << "> " << name << "Prx;"; H << sp; @@ -1647,11 +1647,11 @@ Slice::Gen::HandleVisitor::visitClassDecl(const ClassDeclPtr& p) void Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) { - if (p -> isLocal()) + if (p->isLocal()) return; - string scoped = p -> scoped(); - string scope = p -> scope(); + string scoped = p->scoped(); + string scope = p->scope(); if (scope.length()) scope.erase(0, 2); @@ -1668,6 +1668,6 @@ Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) // TODO: Should be ::Ice::__read C << nl << "::IceInternal::read(__is, proxy);"; C << nl << "v = new ::IceProxy" << scoped << ';'; - C << nl << "proxy -> __copyTo(v.get());"; + C << nl << "proxy->__copyTo(v.get());"; C << eb; } |