X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fstack%2FAvpRule.hpp;h=aeef91c15d59d9c650ac1250b08ee9170830e821;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=e31817fbf274a3379b03f524ebcae04b53260094;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/include/anna/diameter/stack/AvpRule.hpp b/include/anna/diameter/stack/AvpRule.hpp index e31817f..aeef91c 100644 --- a/include/anna/diameter/stack/AvpRule.hpp +++ b/include/anna/diameter/stack/AvpRule.hpp @@ -67,7 +67,7 @@ public: * @param v Presence type * @return Presence description */ - static const char* asText(const Presence::_v v) throw(anna::RuntimeException) { + static const char* asText(const Presence::_v v) noexcept(false) { return asCString(v); } }; @@ -75,13 +75,12 @@ public: private: const Dictionary *a_dictionary; - std::string a_avpName; // reference + AvpId a_avpId; // reference Presence::_v a_presence; std::string a_qual; - void _initialize(const Dictionary *d) throw() { + void _initialize(const Dictionary *d) { a_dictionary = d; - a_avpName = ""; a_presence = Presence::None; a_qual = ""; } @@ -94,29 +93,29 @@ public: // get - const std::string & getAvpName(void) const throw() { return a_avpName; } - const Presence::_v & getPresence(void) const throw() { return a_presence; } - const std::string & getQual(void) const throw() { return a_qual; } + std::string getAvpName(void) const ; + const Presence::_v & getPresence(void) const { return a_presence; } + const std::string & getQual(void) const { return a_qual; } // helpers - AvpId getId(void) const throw(); - bool isAny(void) const throw(); // generic Avp - bool isFixed(void) const throw() { return (a_presence == Presence::Fixed); } - bool isMandatory(void) const throw() { return (a_presence == Presence::Mandatory); } - bool isOptional(void) const throw() { return (a_presence == Presence::Optional); } - int getQualMin(void) const throw(); - int getQualMax(void) const throw(); // -1 is infinite + AvpId getId(void) const { return a_avpId; } + bool isAny(void) const ; // generic Avp + bool isFixed(void) const { return (a_presence == Presence::Fixed); } + bool isMandatory(void) const { return (a_presence == Presence::Mandatory); } + bool isOptional(void) const { return (a_presence == Presence::Optional); } + int getQualMin(void) const ; + int getQualMax(void) const ; // -1 is infinite - std::string asString(bool showPair = true) const throw(); - anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); + std::string asString(bool showPair = true) const ; + anna::xml::Node* asXML(anna::xml::Node* parent) const ; // operators // set - void initialize(const Dictionary *d = NULL) throw() { _initialize(d); } - void setAvpName(const std::string & an) throw() { a_avpName = an; } - void setPresence(const Presence::_v & p) throw() { a_presence = p; } - void setQual(const std::string & q) throw(anna::RuntimeException); + void initialize(const Dictionary *d = NULL) { _initialize(d); } + void setAvpId(const AvpId & ai) { a_avpId = ai; } + void setPresence(const Presence::_v & p) { a_presence = p; } + void setQual(const std::string & q) noexcept(false); };