X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fcodec%2FEngineImpl.hpp;h=22fb82f4c8b39b2440a79b576e0bd205706b90f7;hp=a73b42a81cefadfb0597a1b4eeae9be491eededd;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/diameter/codec/EngineImpl.hpp b/include/anna/diameter/codec/EngineImpl.hpp index a73b42a..22fb82f 100644 --- a/include/anna/diameter/codec/EngineImpl.hpp +++ b/include/anna/diameter/codec/EngineImpl.hpp @@ -110,18 +110,18 @@ class Avp; * anna::Recycler a_avps; * anna::Recycler a_messages; * - * anna::diameter::codec::Avp* allocateAvp () throw () { return a_avps.create (); } + * anna::diameter::codec::Avp* allocateAvp () { return a_avps.create (); } * - * void releaseAvp (anna::diameter::codec::Avp* avp) throw () { + * void releaseAvp (anna::diameter::codec::Avp* avp) { * if (avp == NULL) return; * MyAvp* aux = static_cast (avp); * aux->clear(); // free internal data-part storage specially for grouped avps which will release its childrens * a_avps.release (aux); * } * - * anna::diameter::codec::Message* allocateMessage () throw () { return a_messages.create (); } + * anna::diameter::codec::Message* allocateMessage () { return a_messages.create (); } * - * void releaseMessage (anna::diameter::codec::Message* message) throw () { + * void releaseMessage (anna::diameter::codec::Message* message) { * if (message == NULL) return; * MyMessage* aux = static_cast (message); * aux->clear(); // free internal data-part storage specially for childrens releasing @@ -159,8 +159,8 @@ public: // Creators - Avp* createAvp(const AvpId *id) throw(anna::RuntimeException); - Message* createMessage(const CommandId *id) throw(anna::RuntimeException); + Avp* createAvp(const AvpId *id) noexcept(false); + Message* createMessage(const CommandId *id) noexcept(false); private: @@ -175,9 +175,9 @@ private: const stack::Dictionary * a_dictionary; // helpers - static const char* asText(const ValidationDepth::_v) throw(); - static const char* asText(const ValidationMode::_v) throw(); - static const char* asText(const FixMode::_v) throw(); + static const char* asText(const ValidationDepth::_v) ; + static const char* asText(const ValidationMode::_v) ; + static const char* asText(const FixMode::_v) ; public: @@ -203,14 +203,14 @@ public: @return Returns currently configured engine dictionary */ - const stack::Dictionary *getDictionary() const throw() { return a_dictionary; } + const stack::Dictionary *getDictionary() const { return a_dictionary; } /** * Sets behaviour on validation procedure. * \param validationDepth Behaviour on validation procedure: complete analysis or stop at first validation error over the message. */ - void setValidationDepth(const ValidationDepth::_v validationDepth) throw() { a_validationDepth = validationDepth; } + void setValidationDepth(const ValidationDepth::_v validationDepth) { a_validationDepth = validationDepth; } /** * Returns behaviour on on validation procedure. @@ -220,7 +220,7 @@ public: * * \return Behaviour on validation procedure: complete analysis or stop at first validation error over the message (by default). */ - ValidationDepth::_v getValidationDepth() const throw() { return a_validationDepth; } + ValidationDepth::_v getValidationDepth() const { return a_validationDepth; } /** * Sets behaviour on validation procedure regarding stack flags. Actually, only AVP flags M & P are affected. The vendor bit is @@ -229,7 +229,7 @@ public: * \param ignoreFlags Validation will ignore flags. */ - void ignoreFlagsOnValidation(bool ignoreFlags) throw() { a_ignoreFlags = ignoreFlags; } + void ignoreFlagsOnValidation(bool ignoreFlags) { a_ignoreFlags = ignoreFlags; } /** * Gets behaviour on validation procedure regarding stack flags. Actually, only AVP flags M & P are affected. The vendor bit is @@ -237,13 +237,13 @@ public: * By default (at engine start), flags are verified. * \return Validation ignore flags indicator. */ - bool ignoreFlagsOnValidation() const throw() { return a_ignoreFlags; } + bool ignoreFlagsOnValidation() const { return a_ignoreFlags; } /** * Sets validation mode. * \param validationMode Validation mode: before encoding, after decoding, always or never. */ - void setValidationMode(const ValidationMode::_v validationMode) throw() { a_validationMode = validationMode; } + void setValidationMode(const ValidationMode::_v validationMode) { a_validationMode = validationMode; } /** * Returns validation mode. @@ -251,7 +251,7 @@ public: * during development phase. * \return Validation mode: before encoding, after decoding (by default), always or never. */ - ValidationMode::_v getValidationMode() const throw() { return a_validationMode; } + ValidationMode::_v getValidationMode() const { return a_validationMode; } @@ -259,13 +259,13 @@ public: * Sets fix mode. * \param fixMode Fix mode: before encoding, after decoding, always or never. */ - void setFixMode(const FixMode::_v fixMode) throw() { a_fixMode = fixMode; } + void setFixMode(const FixMode::_v fixMode) { a_fixMode = fixMode; } /** * Returns fix mode. * \return Fix mode: before encoding (by default), after decoding, always or never. */ - FixMode::_v getFixMode() const throw() { return a_fixMode; } + FixMode::_v getFixMode() const { return a_fixMode; } /** * Sets single FailedAVP. True by default. If false, and more than one wrong avp are found during message @@ -274,13 +274,13 @@ public: * * \param single Single Failed-AVP boolean. */ - void setSingleFailedAVP(bool single = true) throw() { a_singleFailedAVP = single; } + void setSingleFailedAVP(bool single = true) { a_singleFailedAVP = single; } /** * Returns single Failed-AVP boolean. * \return Failed-AVP could be one (true) or more (false) in answer message. */ - bool getSingleFailedAVP() const throw() { return a_singleFailedAVP; } + bool getSingleFailedAVP() const { return a_singleFailedAVP; } /** * Creates a new diameter avp assigning its identifier, using engine resources to allocate memory (recommended @@ -292,7 +292,7 @@ public: * * @return Created avp ready to be used */ - Avp* createAvp(AvpId id) throw(anna::RuntimeException) { return createAvp(&id); } + Avp* createAvp(AvpId id) noexcept(false) { return createAvp(&id); } /** * Creates a new diameter avp, using engine resources to allocate memory (recommended recycler allocation at @@ -300,7 +300,7 @@ public: * * @return Created avp ready to be used */ - Avp* createAvp() throw(anna::RuntimeException) { return createAvp(NULL); } + Avp* createAvp() noexcept(false) { return createAvp(NULL); } /** * Creates a new diameter Message assigning its identifier, using engine resources to allocate memory (recommended @@ -312,7 +312,7 @@ public: * * @return Created message ready to be used */ - Message* createMessage(CommandId id) throw(anna::RuntimeException) { return createMessage(&id); } + Message* createMessage(CommandId id) noexcept(false) { return createMessage(&id); } /** * Creates a new diameter message, using engine resources to allocate memory (recommended recycler allocation @@ -320,7 +320,7 @@ public: * * @return Created message ready to be used */ - Message* createMessage() throw(anna::RuntimeException) { return createMessage(NULL); } + Message* createMessage() noexcept(false) { return createMessage(NULL); } /** @@ -329,20 +329,20 @@ public: @param xmlPathFile_or_string Complete path file or string representation for the xml document which represents the diameter message @param pathfile_or_string boolean about the interpretation of the previous argument */ - Message *createMessage(const std::string & xmlPathFile_or_string, bool pathfile_or_string = true) throw(anna::RuntimeException); + Message *createMessage(const std::string & xmlPathFile_or_string, bool pathfile_or_string = true) noexcept(false); /** Invoked to free Avps. \see anna::Recycler */ - virtual void releaseAvp(Avp*) throw() = 0; + virtual void releaseAvp(Avp*) = 0; /** Invoked to free Messages. \see anna::Recycler */ - virtual void releaseMessage(Message*) throw() = 0; + virtual void releaseMessage(Message*) = 0; /** @@ -350,14 +350,14 @@ public: * * @return String with class content */ - virtual std::string asString(void) const throw(); + virtual std::string asString(void) const ; /** Class XML representation. \param parent XML node over which we will put instance information. \return XML documentcon with class content. */ - virtual anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); + virtual anna::xml::Node* asXML(anna::xml::Node* parent) const ; /** @@ -367,7 +367,7 @@ public: @return Avp identifier as pair (code,vendor-id) */ - AvpId avpIdForName(const char * name) throw(anna::RuntimeException); + AvpId avpIdForName(const char * name) noexcept(false); /** @@ -377,7 +377,7 @@ public: @return Command identifier as pair (code,request-indicator) */ - CommandId commandIdForName(const char * name) throw(anna::RuntimeException); + CommandId commandIdForName(const char * name) noexcept(false); protected: @@ -389,7 +389,7 @@ protected: \see anna::Recycler */ - virtual Avp* allocateAvp() throw() = 0; + virtual Avp* allocateAvp() = 0; /** @@ -399,7 +399,7 @@ protected: \see anna::Recycler */ - virtual Message* allocateMessage() throw() = 0; + virtual Message* allocateMessage() = 0; /** @@ -411,7 +411,7 @@ protected: @see setValidationDepth @see getValidationDepth */ - void validationAnomaly(const std::string & description) const throw(anna::RuntimeException); + void validationAnomaly(const std::string & description) const noexcept(false); }; }