X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fstack%2FFormat.hpp;fp=include%2Fanna%2Fdiameter%2Fstack%2FFormat.hpp;h=ebbd5e530098f4877b3aa31cc61f78fae559b711;hp=7ff1ce5a1f546e3216f545683d9f12639e1d8e75;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/diameter/stack/Format.hpp b/include/anna/diameter/stack/Format.hpp index 7ff1ce5..ebbd5e5 100644 --- a/include/anna/diameter/stack/Format.hpp +++ b/include/anna/diameter/stack/Format.hpp @@ -47,7 +47,7 @@ class Format { std::string a_name; std::string a_parentName; - void _initialize(const Dictionary *d) throw() { + void _initialize(const Dictionary *d) { a_dictionary = d; a_name = ""; a_parentName = ""; @@ -66,14 +66,14 @@ public: * * @return Format type name */ - const std::string & getName(void) const throw() { return a_name; } + const std::string & getName(void) const { return a_name; } /** * Gets the format parent type name * * @return Format parent type name, empty string for diameter basic format types (and reserved like 'Any, Unknown') */ - const std::string & getParentName(void) const throw() { return a_parentName; } + const std::string & getParentName(void) const { return a_parentName; } // helpers @@ -82,14 +82,14 @@ public: * * @return Diameter parent type reference, NULL for diameter basic format types (and reserved like 'Any, Unknown') */ - const Format * getParent(void) const throw(); + const Format * getParent(void) const ; /** * The diameter format is a derived type * * @return The format is derived */ - bool isDerived(void) const throw() { return (a_parentName != ""); } + bool isDerived(void) const { return (a_parentName != ""); } /** * The diameter format is a basic type: @@ -97,14 +97,14 @@ public: * * @return The format is basic */ - bool isBasic(void) const throw() { return (!isDerived() && !isReserved()); } + bool isBasic(void) const { return (!isDerived() && !isReserved()); } /** * Gets the diameter basic format type from which a derived type inherit, or basic type itself for non-derived * * @return Diameter basic format type */ - codec::Format::_v getBasicType(void) const throw(anna::RuntimeException); + codec::Format::_v getBasicType(void) const noexcept(false); /** * The diameter format belongs to RFC3588 diameter format family: @@ -112,75 +112,75 @@ public: * * @return The format belongs to RFC3588 */ - bool isRFC3588(void) const throw() { return (codec::Format::isRFC3588(a_name)); } + bool isRFC3588(void) const { return (codec::Format::isRFC3588(a_name)); } // Reserved /** @return The format is 'Any' (generic AVP) */ - bool isAny() const throw() { return (a_name == codec::Format::asText(codec::Format::Any)); } + bool isAny() const { return (a_name == codec::Format::asText(codec::Format::Any)); } // /** @return The format is 'Unknown' */ -// bool isUnknown() const throw() { return (a_name == codec::Format::asText(codec::Format::Unknown)); } +// bool isUnknown() const { return (a_name == codec::Format::asText(codec::Format::Unknown)); } // RFC 3588 /** @return The format is 'OctetString' */ - bool isOctetString() const throw() { return (a_name == codec::Format::asText(codec::Format::OctetString)); } + bool isOctetString() const { return (a_name == codec::Format::asText(codec::Format::OctetString)); } /** @return The format is 'Integer32' */ - bool isInteger32() const throw() { return (a_name == codec::Format::asText(codec::Format::Integer32)); } + bool isInteger32() const { return (a_name == codec::Format::asText(codec::Format::Integer32)); } /** @return The format is 'Integer64' */ - bool isInteger64() const throw() { return (a_name == codec::Format::asText(codec::Format::Integer64)); } + bool isInteger64() const { return (a_name == codec::Format::asText(codec::Format::Integer64)); } /** @return The format is 'Unsigned32' */ - bool isUnsigned32() const throw() { return (a_name == codec::Format::asText(codec::Format::Unsigned32)); } + bool isUnsigned32() const { return (a_name == codec::Format::asText(codec::Format::Unsigned32)); } /** @return The format is 'Unsigned64' */ - bool isUnsigned64() const throw() { return (a_name == codec::Format::asText(codec::Format::Unsigned64)); } + bool isUnsigned64() const { return (a_name == codec::Format::asText(codec::Format::Unsigned64)); } /** @return The format is 'Float32' */ - bool isFloat32() const throw() { return (a_name == codec::Format::asText(codec::Format::Float32)); } + bool isFloat32() const { return (a_name == codec::Format::asText(codec::Format::Float32)); } /** @return The format is 'Float64' */ - bool isFloat64() const throw() { return (a_name == codec::Format::asText(codec::Format::Float64)); } + bool isFloat64() const { return (a_name == codec::Format::asText(codec::Format::Float64)); } /** @return The format is 'Grouped' */ - bool isGrouped() const throw() { return (a_name == codec::Format::asText(codec::Format::Grouped)); } + bool isGrouped() const { return (a_name == codec::Format::asText(codec::Format::Grouped)); } /** @return The format is 'Address' */ - bool isAddress() const throw() { return (a_name == codec::Format::asText(codec::Format::Address)); } + bool isAddress() const { return (a_name == codec::Format::asText(codec::Format::Address)); } /** @return The format is 'Time' */ - bool isTime() const throw() { return (a_name == codec::Format::asText(codec::Format::Time)); } + bool isTime() const { return (a_name == codec::Format::asText(codec::Format::Time)); } /** @return The format is 'UTF8String' */ - bool isUTF8String() const throw() { return (a_name == codec::Format::asText(codec::Format::UTF8String)); } + bool isUTF8String() const { return (a_name == codec::Format::asText(codec::Format::UTF8String)); } /** @return The format is 'DiameterIdentity' */ - bool isDiameterIdentity() const throw() { return (a_name == codec::Format::asText(codec::Format::DiameterIdentity)); } + bool isDiameterIdentity() const { return (a_name == codec::Format::asText(codec::Format::DiameterIdentity)); } /** @return The format is 'DiameterURI' */ - bool isDiameterURI() const throw() { return (a_name == codec::Format::asText(codec::Format::DiameterURI)); } + bool isDiameterURI() const { return (a_name == codec::Format::asText(codec::Format::DiameterURI)); } /** @return The format is 'Enumerated' */ - bool isEnumerated() const throw() { return (a_name == codec::Format::asText(codec::Format::Enumerated)); } + bool isEnumerated() const { return (a_name == codec::Format::asText(codec::Format::Enumerated)); } /** @return The format is 'IPFilterRule' */ - bool isIPFilterRule() const throw() { return (a_name == codec::Format::asText(codec::Format::IPFilterRule)); } + bool isIPFilterRule() const { return (a_name == codec::Format::asText(codec::Format::IPFilterRule)); } /** @return The format is 'QoSFilterRule' */ - bool isQoSFilterRule() const throw() { return (a_name == codec::Format::asText(codec::Format::QoSFilterRule)); } + bool isQoSFilterRule() const { return (a_name == codec::Format::asText(codec::Format::QoSFilterRule)); } /** * The diameter format is application-specific or a format type name not registered on dictionary * * @return The format is application-specific */ - bool isApplicationSpecific(void) const throw() { return (!isRFC3588() && !isReserved()); } + bool isApplicationSpecific(void) const { return (!isRFC3588() && !isReserved()); } /** * The diameter format is reserved ('Any' for generic AVP, 'Unknown' for not registered avps) * * @return The format is reserved */ - bool isReserved(void) const throw() { return (codec::Format::isReserved(a_name)); } + bool isReserved(void) const { return (codec::Format::isReserved(a_name)); } /** * Class string representation * * @return String with class content */ - std::string asString(void) const throw(); + std::string asString(void) const ; /** * Class xml representation * * @return XML document with relevant information for this instance. */ - anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); + anna::xml::Node* asXML(anna::xml::Node* parent) const ; // operators @@ -199,14 +199,14 @@ public: /** * Initializes the class content */ - void initialize(const Dictionary *d = NULL) throw() { _initialize(d); } + void initialize(const Dictionary *d = NULL) { _initialize(d); } /** * Sets Avp format type name * * @param type Avp format type name */ - void setName(const char * name) throw(anna::RuntimeException) { + void setName(const char * name) noexcept(false) { if(name == NULL) throw anna::RuntimeException("Null Format-name not allowed", ANNA_FILE_LOCATION); a_name = name; @@ -219,7 +219,7 @@ public: * * @param rfc3588Format RFC3588 format type */ - void setRFC3588(codec::Format::_v rfc3588Format) throw() { + void setRFC3588(codec::Format::_v rfc3588Format) { setName(codec::Format::asText(rfc3588Format)); } @@ -228,7 +228,7 @@ public: * * @param parent Diameter-basic avp format parent */ - void setParentName(const std::string & parentName) throw(anna::RuntimeException); + void setParentName(const std::string & parentName) noexcept(false); };