diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-04-22 18:46:33 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-04-22 18:46:33 +0000 |
commit | 5a418360a853a7a38fda24e82a6e0ae66f3dd12b (patch) | |
tree | f8f1c4cff91d9db6572a0e5ab97e00ad8ff4c91b /cpp/src | |
parent | Removed a few more exceptions (diff) | |
download | ice-5a418360a853a7a38fda24e82a6e0ae66f3dd12b.tar.bz2 ice-5a418360a853a7a38fda24e82a6e0ae66f3dd12b.tar.xz ice-5a418360a853a7a38fda24e82a6e0ae66f3dd12b.zip |
Changed ice_name() to return const char*
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/FreezeScript/Exception.cpp | 4 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Exception.h | 4 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Parser.cpp | 4 | ||||
-rw-r--r-- | cpp/src/FreezeScript/Parser.h | 4 | ||||
-rw-r--r-- | cpp/src/IceUtil/CtrlCHandler.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceUtil/Exception.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceUtil/ThreadException.cpp | 16 | ||||
-rw-r--r-- | cpp/src/IceUtil/UUID.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceXML/Parser.cpp | 4 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 6 | ||||
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 6 |
11 files changed, 32 insertions, 32 deletions
diff --git a/cpp/src/FreezeScript/Exception.cpp b/cpp/src/FreezeScript/Exception.cpp index 9fb0c895b31..2b76a9aae7c 100644 --- a/cpp/src/FreezeScript/Exception.cpp +++ b/cpp/src/FreezeScript/Exception.cpp @@ -19,9 +19,9 @@ FreezeScript::FailureException::FailureException(const char* file, int line, con { } -string FreezeScript::FailureException::_name = "FreezeScript::FailureException"; +const char* FreezeScript::FailureException::_name = "FreezeScript::FailureException"; -const string& +const char* FreezeScript::FailureException::ice_name() const { return _name; diff --git a/cpp/src/FreezeScript/Exception.h b/cpp/src/FreezeScript/Exception.h index 5158be8a27c..1c79f90c950 100644 --- a/cpp/src/FreezeScript/Exception.h +++ b/cpp/src/FreezeScript/Exception.h @@ -20,7 +20,7 @@ class FailureException : public IceUtil::Exception public: FailureException(const char*, int, const std::string&); - virtual const std::string& ice_name() const; + virtual const char* ice_name() const; virtual void ice_print(std::ostream&) const; virtual IceUtil::Exception* ice_clone() const; virtual void ice_throw() const; @@ -30,7 +30,7 @@ public: private: std::string _reason; - static std::string _name; + static const char* _name; }; } // End of namespace FreezeScript diff --git a/cpp/src/FreezeScript/Parser.cpp b/cpp/src/FreezeScript/Parser.cpp index 7b94ffbca69..f567f27d66a 100644 --- a/cpp/src/FreezeScript/Parser.cpp +++ b/cpp/src/FreezeScript/Parser.cpp @@ -126,9 +126,9 @@ FreezeScript::EvaluateException::EvaluateException(const char* file, int line, c { } -string FreezeScript::EvaluateException::_name = "FreezeScript::EvaluateException"; +const char* FreezeScript::EvaluateException::_name = "FreezeScript::EvaluateException"; -const string& +const char* FreezeScript::EvaluateException::ice_name() const { return _name; diff --git a/cpp/src/FreezeScript/Parser.h b/cpp/src/FreezeScript/Parser.h index 8865f57da1e..4c4af3bf9a9 100644 --- a/cpp/src/FreezeScript/Parser.h +++ b/cpp/src/FreezeScript/Parser.h @@ -39,7 +39,7 @@ class EvaluateException : public IceUtil::Exception public: EvaluateException(const char*, int, const std::string&); - virtual const std::string& ice_name() const; + virtual const char* ice_name() const; virtual void ice_print(std::ostream&) const; virtual IceUtil::Exception* ice_clone() const; virtual void ice_throw() const; @@ -49,7 +49,7 @@ public: private: std::string _reason; - static std::string _name; + static const char* _name; }; // diff --git a/cpp/src/IceUtil/CtrlCHandler.cpp b/cpp/src/IceUtil/CtrlCHandler.cpp index 1d9b09e017e..c738f915876 100644 --- a/cpp/src/IceUtil/CtrlCHandler.cpp +++ b/cpp/src/IceUtil/CtrlCHandler.cpp @@ -29,9 +29,9 @@ CtrlCHandlerException::CtrlCHandlerException(const char* file, int line) : { } -static string ctrlCHandlerName = "IceUtil::CtrlCHandlerException"; +static const char* ctrlCHandlerName = "IceUtil::CtrlCHandlerException"; -const string& +const char* CtrlCHandlerException::ice_name() const { return ctrlCHandlerName; diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index 35597b1eeec..12bbe20059c 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -34,9 +34,9 @@ IceUtil::Exception::~Exception() { } -string IceUtil::Exception::_name = "IceUtil::Exception"; +const char* IceUtil::Exception::_name = "IceUtil::Exception"; -const string& +const char* IceUtil::Exception::ice_name() const { return _name; @@ -92,9 +92,9 @@ IceUtil::NullHandleException::NullHandleException(const char* file, int line) : } } -string IceUtil::NullHandleException::_name = "IceUtil::NullHandleException"; +const char* IceUtil::NullHandleException::_name = "IceUtil::NullHandleException"; -const string& +const char* IceUtil::NullHandleException::ice_name() const { return _name; diff --git a/cpp/src/IceUtil/ThreadException.cpp b/cpp/src/IceUtil/ThreadException.cpp index 5cbd8326354..eb6a96f19b3 100644 --- a/cpp/src/IceUtil/ThreadException.cpp +++ b/cpp/src/IceUtil/ThreadException.cpp @@ -17,9 +17,9 @@ IceUtil::ThreadSyscallException::ThreadSyscallException(const char* file, int li { } -string IceUtil::ThreadSyscallException::_name = "IceUtil::ThreadSyscallException"; +const char* IceUtil::ThreadSyscallException::_name = "IceUtil::ThreadSyscallException"; -const string& +const char* IceUtil::ThreadSyscallException::ice_name() const { return _name; @@ -85,9 +85,9 @@ IceUtil::ThreadLockedException::ThreadLockedException(const char* file, int line { } -string IceUtil::ThreadLockedException::_name = "IceUtil::ThreadLockedException"; +const char* IceUtil::ThreadLockedException::_name = "IceUtil::ThreadLockedException"; -const string& +const char* IceUtil::ThreadLockedException::ice_name() const { return _name; @@ -110,9 +110,9 @@ IceUtil::ThreadStartedException::ThreadStartedException(const char* file, int li { } -string IceUtil::ThreadStartedException::_name = "IceUtil::ThreadStartedException"; +const char* IceUtil::ThreadStartedException::_name = "IceUtil::ThreadStartedException"; -const string& +const char* IceUtil::ThreadStartedException::ice_name() const { return _name; @@ -135,9 +135,9 @@ IceUtil::ThreadNotStartedException::ThreadNotStartedException(const char* file, { } -string IceUtil::ThreadNotStartedException::_name = "IceUtil::ThreadNotStartedException"; +const char* IceUtil::ThreadNotStartedException::_name = "IceUtil::ThreadNotStartedException"; -const string& +const char* IceUtil::ThreadNotStartedException::ice_name() const { return _name; diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index c72fd3ea6ad..430a82ffc01 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -55,7 +55,7 @@ IceUtil::UUIDGenerationException::UUIDGenerationException(const char* file, int { } -string IceUtil::UUIDGenerationException::_name = "IceUtil::UUIDGenerationException"; +const char* IceUtil::UUIDGenerationException::_name = "IceUtil::UUIDGenerationException"; #ifndef _WIN32 // @@ -99,7 +99,7 @@ static UUIDCleanup uuidCleanup; #endif -const string& +const char* IceUtil::UUIDGenerationException::ice_name() const { return _name; diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index dfc9cd6cefa..b7d03341138 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -28,9 +28,9 @@ IceXML::ParserException::ParserException(const char* file, int line, const strin { } -string IceXML::ParserException::_name = "IceXML::ParserException"; +const char* IceXML::ParserException::_name = "IceXML::ParserException"; -const string& +const char* IceXML::ParserException::ice_name() const { return _name; diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index ef49c9f0eb5..b0f192d379a 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -414,12 +414,12 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) C << eb; } - H << nl << "virtual const ::std::string& ice_name() const;"; + H << nl << "virtual const char* ice_name() const;"; string flatName = p->flattenedScope() + p->name() + "_name"; - C << sp << nl << "static const ::std::string " << flatName << " = \"" << p->scoped().substr(2) << "\";"; - C << sp << nl << "const ::std::string&" << nl << scoped.substr(2) << "::ice_name() const"; + C << sp << nl << "static const char* " << flatName << " = \"" << p->scoped().substr(2) << "\";"; + C << sp << nl << "const char*" << nl << scoped.substr(2) << "::ice_name() const"; C << sb; C << nl << "return " << flatName << ';'; C << eb; diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 7ae59041205..196a98f0b62 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -349,12 +349,12 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) C << eb; } - H << nl << "virtual const ::std::string& ice_name() const;"; + H << nl << "virtual const char* ice_name() const;"; string flatName = p->flattenedScope() + p->name() + "_name"; - C << sp << nl << "static const ::std::string " << flatName << " = \"" << p->scoped().substr(2) << "\";"; - C << sp << nl << "const ::std::string&" << nl << scoped.substr(2) << "::ice_name() const"; + C << sp << nl << "static const char* " << flatName << " = \"" << p->scoped().substr(2) << "\";"; + C << sp << nl << "const char*" << nl << scoped.substr(2) << "::ice_name() const"; C << sb; C << nl << "return " << flatName << ';'; C << eb; |