X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fcodec%2Fbasetypes%2FAvpData.hpp;fp=include%2Fanna%2Fdiameter%2Fcodec%2Fbasetypes%2FAvpData.hpp;h=39171bc6a04cccac39c936980f00938d7459b0b5;hp=95d3a13bf605b54b1cd852a4c26d29fd7d8143b3;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/diameter/codec/basetypes/AvpData.hpp b/include/anna/diameter/codec/basetypes/AvpData.hpp index 95d3a13..39171bc 100644 --- a/include/anna/diameter/codec/basetypes/AvpData.hpp +++ b/include/anna/diameter/codec/basetypes/AvpData.hpp @@ -62,7 +62,7 @@ class AvpData { * @param buffer Raw data to be encoded * @param size Size of raw data to be encoded */ - virtual void codeBasic(char* buffer, int &size) throw(anna::RuntimeException) = 0; + virtual void codeBasic(char* buffer, int &size) noexcept(false) = 0; /** * Updates parent members from child ones to keep coherence between levels. @@ -71,7 +71,7 @@ class AvpData { * and will be called after child members modification (setters). * Basic types implementation will be empty. */ - virtual void updateBasic() throw(anna::RuntimeException) {;} + virtual void updateBasic() noexcept(false) {;} /** * Sets own members from natural/smart string representation @@ -79,7 +79,7 @@ class AvpData { * * @param printableString avp data in natural/smart string representation (human-readable) */ - virtual void setPrintableString(const char * printableString) throw(anna::RuntimeException) = 0; + virtual void setPrintableString(const char * printableString) noexcept(false) = 0; protected: @@ -93,7 +93,7 @@ protected: * * @return Printable string or if not printable */ - std::string assertPrintable(const char* buffer, const int size) const throw(anna::RuntimeException) { + std::string assertPrintable(const char* buffer, const int size) const noexcept(false) { std::string result; if(size == 0) return result; @@ -125,7 +125,7 @@ public: * * @return avp data format name */ - virtual std::string getFormatName() const throw() = 0; + virtual std::string getFormatName() const = 0; /** * Gets the avp data size based on basic container. @@ -133,7 +133,7 @@ public: * * @return avp data size */ - virtual int getSize() const throw() = 0; + virtual int getSize() const = 0; // helpers @@ -144,7 +144,7 @@ public: * @param buffer Raw data to be encoded * @param size Size of raw data to be encoded */ - void code(char* buffer, int &size) throw(anna::RuntimeException) { + void code(char* buffer, int &size) noexcept(false) { codeBasic(buffer, size); } @@ -156,7 +156,7 @@ public: * * @return Natural/smart string representation for avp data */ - virtual std::string asPrintableString() throw(anna::RuntimeException) { + virtual std::string asPrintableString() noexcept(false) { int size = getSize(); char buffer[size]; code(buffer, size); @@ -168,7 +168,7 @@ public: * * @return String with DataBlock representation */ - std::string asDataBlockString() throw(anna::RuntimeException) { + std::string asDataBlockString() noexcept(false) { int size = getSize(); char buffer[size]; code(buffer, size); @@ -183,7 +183,7 @@ public: * * @return String with class content */ - virtual std::string asString() throw(anna::RuntimeException) { + virtual std::string asString() noexcept(false) { return(asDataBlockString()); } @@ -193,7 +193,7 @@ public: * * @return Hexadecimal string representation for avp data */ - std::string asHexString() throw(anna::RuntimeException) { + std::string asHexString() noexcept(false) { int size = getSize(); char buffer[size]; code(buffer, size); @@ -214,14 +214,14 @@ public: * @param buffer Raw avp data * @param size Raw avp data length */ - virtual void decode(const char* buffer, const int size) throw(anna::RuntimeException) = 0; + virtual void decode(const char* buffer, const int size) noexcept(false) = 0; /** * Initializes members from natural/smart string representation * * @param printableString avp data in natural/smart string representation (human-readable) */ - void fromPrintableString(const char * printableString) throw(anna::RuntimeException) { + void fromPrintableString(const char * printableString) noexcept(false) { if(!printableString) { std::string ex = getFormatName(); ex += "::fromPrintableString | Null printableString provided"; @@ -237,7 +237,7 @@ public: * * @param hexString Raw avp data in hexadecimal string representation */ - void fromHexString(const std::string& hexString) throw(anna::RuntimeException) { + void fromHexString(const std::string& hexString) noexcept(false) { anna::DataBlock db(true); anna::functions::fromHexString(hexString, db); decode(db.getData(), db.getSize());