diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 32 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 | ||||
-rw-r--r-- | cpp/src/slice2docbook/Gen.cpp | 18 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 14 |
4 files changed, 36 insertions, 35 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index cfaa6e093a1..6045aec0985 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -75,7 +75,7 @@ Slice::Type::Type(const UnitPtr& unit) : // ---------------------------------------------------------------------- Builtin::Kind -Slice::Builtin::kind() +Slice::Builtin::kind() const { return _kind; } @@ -98,13 +98,13 @@ Slice::Contained::container() const } string -Slice::Contained::name() +Slice::Contained::name() const { return _name; } string -Slice::Contained::scoped() +Slice::Contained::scoped() const { return _scoped; } @@ -130,7 +130,7 @@ Slice::Contained::comment() const } int -Slice::Contained::includeLevel() +Slice::Contained::includeLevel() const { return _includeLevel; } @@ -1444,13 +1444,13 @@ Slice::ClassDecl::destroy() } ClassDefPtr -Slice::ClassDecl::definition() +Slice::ClassDecl::definition() const { return _definition; } bool -Slice::ClassDecl::isInterface() +Slice::ClassDecl::isInterface() const { return _interface; } @@ -1838,7 +1838,7 @@ Slice::ClassDef::allDataMembers() const } bool -Slice::ClassDef::isAbstract() +Slice::ClassDef::isAbstract() const { if(isInterface() || _bases.size() > 1) // Is this an interface, or does it derive from interfaces? { @@ -1862,7 +1862,7 @@ Slice::ClassDef::isAbstract() } bool -Slice::ClassDef::isInterface() +Slice::ClassDef::isInterface() const { return _interface; } @@ -1945,7 +1945,7 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, boo // ---------------------------------------------------------------------- ClassDeclPtr -Slice::Proxy::_class() +Slice::Proxy::_class() const { return __class; } @@ -2210,7 +2210,7 @@ Slice::Struct::createDataMember(const string& name, const TypePtr& type) } DataMemberList -Slice::Struct::dataMembers() +Slice::Struct::dataMembers() const { DataMemberList result; for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) @@ -2277,7 +2277,7 @@ Slice::Struct::Struct(const ContainerPtr& container, const string& name, bool lo // ---------------------------------------------------------------------- TypePtr -Slice::Sequence::type() +Slice::Sequence::type() const { return _type; } @@ -2337,13 +2337,13 @@ Slice::Sequence::Sequence(const ContainerPtr& container, const string& name, con // ---------------------------------------------------------------------- TypePtr -Slice::Dictionary::keyType() +Slice::Dictionary::keyType() const { return _keyType; } TypePtr -Slice::Dictionary::valueType() +Slice::Dictionary::valueType() const { return _valueType; } @@ -2611,7 +2611,7 @@ Slice::Operation::Operation(const ContainerPtr& container, const string& name, c // ---------------------------------------------------------------------- TypePtr -Slice::DataMember::type() +Slice::DataMember::type() const { return _type; } @@ -2832,13 +2832,13 @@ Slice::Unit::error(const string& s) } void -Slice::Unit::warning(const char* s) +Slice::Unit::warning(const char* s) const { cerr << _currentFile << ':' << _currentLine << ": warning: " << s << endl; } void -Slice::Unit::warning(const string& s) +Slice::Unit::warning(const string& s) const { warning(s.c_str()); } diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 4b3a7cea037..c78b5252965 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -376,7 +376,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) ExceptionList allBases = p->allBases(); StringList exceptionIds; transform(allBases.begin(), allBases.end(), back_inserter(exceptionIds), - ::IceUtil::memFun(&Exception::scoped)); + ::IceUtil::constMemFun(&Exception::scoped)); exceptionIds.push_front(scoped); exceptionIds.push_back("::Ice::UserException"); @@ -1874,7 +1874,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) { ClassList allBases = p->allBases(); StringList ids; - transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::memFun(&ClassDef::scoped)); + transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&ClassDef::scoped)); StringList other; other.push_back(scoped); other.push_back("::Ice::Object"); @@ -1970,7 +1970,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) if(!allOps.empty()) { StringList allOpNames; - transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), ::IceUtil::memFun(&Operation::name)); + transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), + ::IceUtil::constMemFun(&Operation::name)); allOpNames.push_back("ice_facets"); allOpNames.push_back("ice_id"); allOpNames.push_back("ice_ids"); diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp index 378d6f653c6..d2dc220bf41 100644 --- a/cpp/src/slice2docbook/Gen.cpp +++ b/cpp/src/slice2docbook/Gen.cpp @@ -117,7 +117,7 @@ void Slice::Gen::visitContainer(const ContainerPtr& p) { ModuleList modules = p->modules(); - modules.erase(remove_if(modules.begin(), modules.end(), ::IceUtil::memFun(&Contained::includeLevel)), + modules.erase(remove_if(modules.begin(), modules.end(), ::IceUtil::constMemFun(&Contained::includeLevel)), modules.end()); if(!modules.empty()) @@ -141,14 +141,14 @@ Slice::Gen::visitContainer(const ContainerPtr& p) ClassList classesAndInterfaces = p->classes(); classesAndInterfaces.erase(remove_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), - ::IceUtil::memFun(&Contained::includeLevel)), + ::IceUtil::constMemFun(&Contained::includeLevel)), classesAndInterfaces.end()); ClassList classes; ClassList interfaces; remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(classes), - ::IceUtil::memFun(&ClassDef::isInterface)); + ::IceUtil::constMemFun(&ClassDef::isInterface)); remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(interfaces), - not1(::IceUtil::memFun(&ClassDef::isInterface))); + not1(::IceUtil::constMemFun(&ClassDef::isInterface))); if(!classes.empty()) { @@ -189,7 +189,7 @@ Slice::Gen::visitContainer(const ContainerPtr& p) } ExceptionList exceptions = p->exceptions(); - exceptions.erase(remove_if(exceptions.begin(), exceptions.end(), ::IceUtil::memFun(&Contained::includeLevel)), + exceptions.erase(remove_if(exceptions.begin(), exceptions.end(), ::IceUtil::constMemFun(&Contained::includeLevel)), exceptions.end()); if(!exceptions.empty()) @@ -212,7 +212,7 @@ Slice::Gen::visitContainer(const ContainerPtr& p) } StructList structs = p->structs(); - structs.erase(remove_if(structs.begin(), structs.end(), ::IceUtil::memFun(&Contained::includeLevel)), + structs.erase(remove_if(structs.begin(), structs.end(), ::IceUtil::constMemFun(&Contained::includeLevel)), structs.end()); if(!structs.empty()) @@ -235,7 +235,7 @@ Slice::Gen::visitContainer(const ContainerPtr& p) } SequenceList sequences = p->sequences(); - sequences.erase(remove_if(sequences.begin(), sequences.end(), ::IceUtil::memFun(&Contained::includeLevel)), + sequences.erase(remove_if(sequences.begin(), sequences.end(), ::IceUtil::constMemFun(&Contained::includeLevel)), sequences.end()); if(!sequences.empty()) @@ -259,7 +259,7 @@ Slice::Gen::visitContainer(const ContainerPtr& p) DictionaryList dictionaries = p->dictionaries(); dictionaries.erase(remove_if(dictionaries.begin(), dictionaries.end(), - ::IceUtil::memFun(&Contained::includeLevel)), + ::IceUtil::constMemFun(&Contained::includeLevel)), dictionaries.end()); if(!dictionaries.empty()) @@ -282,7 +282,7 @@ Slice::Gen::visitContainer(const ContainerPtr& p) } EnumList enums = p->enums(); - enums.erase(remove_if(enums.begin(), enums.end(), ::IceUtil::memFun(&Contained::includeLevel)), + enums.erase(remove_if(enums.begin(), enums.end(), ::IceUtil::constMemFun(&Contained::includeLevel)), enums.end()); if(!enums.empty()) diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 25687404f8d..0fafd5ddb71 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -112,7 +112,7 @@ Slice::JavaVisitor::writeThrowsClause(const string& scope, // // MSVC gets confused if - // ::IceUtil::memFun(&::Slice::Exception::isLocal)); is used hence + // ::IceUtil::constMemFun(&::Slice::Exception::isLocal)); is used hence // the exceptionIsLocal function. // localCount = count_if(throws.begin(), throws.end(), exceptionIsLocal); @@ -291,7 +291,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) ClassList allBases = p->allBases(); StringList ids; - transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::memFun(&ClassDef::scoped)); + transform(allBases.begin(), allBases.end(), back_inserter(ids), ::IceUtil::constMemFun(&ClassDef::scoped)); StringList other; other.push_back(scoped); other.push_back("::Ice::Object"); @@ -386,7 +386,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) // // MSVC gets confused if - // ::IceUtil::memFun(&::Slice::Exception::isLocal)); is used + // ::IceUtil::constMemFun(&::Slice::Exception::isLocal)); is used // hence the exceptionIsLocal function. // remove_if(throws.begin(), throws.end(), exceptionIsLocal); @@ -491,7 +491,7 @@ Slice::JavaVisitor::writeDispatch(Output& out, const ClassDefPtr& p) { StringList allOpNames; transform(allOps.begin(), allOps.end(), back_inserter(allOpNames), - ::IceUtil::memFun(&Operation::name)); + ::IceUtil::constMemFun(&Operation::name)); allOpNames.push_back("ice_facets"); allOpNames.push_back("ice_id"); allOpNames.push_back("ice_ids"); @@ -1291,7 +1291,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) StringList exceptionIds; transform(allBases.begin(), allBases.end(), back_inserter(exceptionIds), - ::IceUtil::memFun(&Exception::scoped)); + ::IceUtil::constMemFun(&Exception::scoped)); exceptionIds.push_front(scoped); exceptionIds.push_back("::Ice::UserException"); @@ -2924,7 +2924,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) // // MSVC gets confused if - // ::IceUtil::memFun(&::Slice::Exception::isLocal)); is used + // ::IceUtil::constMemFun(&::Slice::Exception::isLocal)); is used // hence the exceptionIsLocal function. // throws.erase(remove_if(throws.begin(), throws.end(), exceptionIsLocal), throws.end()); @@ -3093,7 +3093,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) // // MSVC gets confused if - // ::IceUtil::memFun(&::Slice::Exception::isLocal)); is used + // ::IceUtil::constMemFun(&::Slice::Exception::isLocal)); is used // hence the exceptionIsLocal function. // throws.erase(remove_if(throws.begin(), throws.end(), exceptionIsLocal), throws.end()); |