X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fdiameter%2Fcodec%2Ffunctions.hpp;fp=include%2Fanna%2Fdiameter%2Fcodec%2Ffunctions.hpp;h=cd6b4bf10515ef3bb6cf06e4c861b0b2fcdce79b;hp=43dfa9223222993046feb874f652653b6591b5ff;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/diameter/codec/functions.hpp b/include/anna/diameter/codec/functions.hpp index 43dfa92..cd6b4bf 100644 --- a/include/anna/diameter/codec/functions.hpp +++ b/include/anna/diameter/codec/functions.hpp @@ -124,9 +124,9 @@ typedef struct parent { std::vector AvpsId; std::vector AvpsName; - void setMessage(const anna::diameter::CommandId & mid, const char *mname = NULL /* well known in validation */) throw(); - void addAvp(const anna::diameter::AvpId & aid, const char *aname = NULL /* well known in validation */) throw(); - std::string asString() const throw(); + void setMessage(const anna::diameter::CommandId & mid, const char *mname = NULL /* well known in validation */) ; + void addAvp(const anna::diameter::AvpId & aid, const char *aname = NULL /* well known in validation */) ; + std::string asString() const ; } parent_t; @@ -136,21 +136,21 @@ typedef struct parent { struct functions { // getters & helpers - static CommandId getCommandId(const anna::DataBlock &) throw(anna::RuntimeException); - static ApplicationId getApplicationId(const anna::DataBlock &) throw(anna::RuntimeException); - static HopByHop getHopByHop(const anna::DataBlock &) throw(anna::RuntimeException); - static EndToEnd getEndToEnd(const anna::DataBlock &) throw(anna::RuntimeException); + static CommandId getCommandId(const anna::DataBlock &) noexcept(false); + static ApplicationId getApplicationId(const anna::DataBlock &) noexcept(false); + static HopByHop getHopByHop(const anna::DataBlock &) noexcept(false); + static EndToEnd getEndToEnd(const anna::DataBlock &) noexcept(false); - static bool requestBit(const anna::DataBlock &) throw(anna::RuntimeException); - static bool proxiableBit(const anna::DataBlock &) throw(anna::RuntimeException); - static bool errorBit(const anna::DataBlock &) throw(anna::RuntimeException); - static bool potentiallyReTransmittedMessageBit(const anna::DataBlock &) throw(anna::RuntimeException); + static bool requestBit(const anna::DataBlock &) noexcept(false); + static bool proxiableBit(const anna::DataBlock &) noexcept(false); + static bool errorBit(const anna::DataBlock &) noexcept(false); + static bool potentiallyReTransmittedMessageBit(const anna::DataBlock &) noexcept(false); - static bool isRequest(const CommandId & cid) throw() { return (cid.second); } - static bool isRequest(const anna::DataBlock & db) throw(anna::RuntimeException) { return requestBit(db); } + static bool isRequest(const CommandId & cid) { return (cid.second); } + static bool isRequest(const anna::DataBlock & db) noexcept(false) { return requestBit(db); } - static bool isAnswer(const CommandId & cid) throw() { return (!isRequest(cid)); } - static bool isAnswer(const anna::DataBlock & db) throw(anna::RuntimeException) { return (!isRequest(db)); } + static bool isAnswer(const CommandId & cid) { return (!isRequest(cid)); } + static bool isAnswer(const anna::DataBlock & db) noexcept(false) { return (!isRequest(db)); } @@ -166,7 +166,7 @@ struct functions { * @param hbh Hop-by-Hop Identifier. * @param ete End-to-End Identifier. */ - static void decodeCommandHeader(const char *start, char & version, U24 & length, char & flags, CommandId & id, int & appId, int & hbh, int & ete) throw(anna::RuntimeException); + static void decodeCommandHeader(const char *start, char & version, U24 & length, char & flags, CommandId & id, int & appId, int & hbh, int & ete) noexcept(false); /** * Decodes an AVP. This helper cannot check boundaries. start pointer must be a valid avp context. @@ -177,7 +177,7 @@ struct functions { * @param length Avp length (includes code, flags, length itself, vendorId if exists and data length). * @param data Avp data part. */ - static void decodeAVP(const char *start, AvpId & id, char & flags, int & length, std::string & data) throw(anna::RuntimeException); + static void decodeAVP(const char *start, AvpId & id, char & flags, int & length, std::string & data) noexcept(false); /** * Gets the next AVP pointer reference starting from a first-avp data block. It could be the first avp within @@ -189,7 +189,7 @@ struct functions { * * @return Pointer to the next AVP found. NULL if no more. */ - static const char * nextAVP(const char *avpsDB, int avpsLen, const char *start) throw(anna::RuntimeException); + static const char * nextAVP(const char *avpsDB, int avpsLen, const char *start) noexcept(false); // /** // * Gets the next AVP pointer reference starting from a first-avp datablock. It could be the first avp within @@ -200,7 +200,7 @@ struct functions { // * // * @return Pointer to the next AVP found. NULL if no more. // */ - // static const char * nextAVP(const anna::DataBlock & avpsDB, const char *start) throw(anna::RuntimeException); + // static const char * nextAVP(const anna::DataBlock & avpsDB, const char *start) noexcept(false); /** * Gets the next AVP pointer reference within an AVPs set data block with a certain AVP identification. @@ -212,7 +212,7 @@ struct functions { * * @return Pointer to first AVP found with identification provided. NULL if not found. */ - static const char *findAVP(const char *avpsDB, int avpsLen, const diameter::AvpId & id, int n = 1) throw(anna::RuntimeException); + static const char *findAVP(const char *avpsDB, int avpsLen, const diameter::AvpId & id, int n = 1) noexcept(false); // /** // * Gets the next AVP pointer reference within an AVPs set datablock with a certain AVP identification. @@ -223,14 +223,14 @@ struct functions { // * // * @return Pointer to first AVP found with identification provided. NULL if not found. // */ - // static const char * findAVP(const anna::DataBlock & avpsDB, const AvpId & id, int n = 1) throw(anna::RuntimeException); + // static const char * findAVP(const anna::DataBlock & avpsDB, const AvpId & id, int n = 1) noexcept(false); // modifiers - static void setHopByHop(anna::DataBlock &, HopByHop) throw(anna::RuntimeException); - static void setEndToEnd(anna::DataBlock &, EndToEnd) throw(anna::RuntimeException); - static void setPotentiallyReTransmittedMessageBit(const anna::DataBlock & db, bool activate = true) throw(anna::RuntimeException); + static void setHopByHop(anna::DataBlock &, HopByHop) noexcept(false); + static void setEndToEnd(anna::DataBlock &, EndToEnd) noexcept(false); + static void setPotentiallyReTransmittedMessageBit(const anna::DataBlock & db, bool activate = true) noexcept(false); /** @@ -304,7 +304,7 @@ struct functions { For example, you could load the document to be decoded over a codec Message by mean #Message::fromXML (using the xml document #getRootNode) during document lifetime. After that, it could be destroyed. */ - static void messageXmlDocumentFromXmlFile(anna::xml::DocumentFile &xmlDocument, const std::string & xmlPathFile) throw(anna::RuntimeException); + static void messageXmlDocumentFromXmlFile(anna::xml::DocumentFile &xmlDocument, const std::string & xmlPathFile) noexcept(false); /** Interpret xml string representation in order to create a memory xml document. @@ -318,7 +318,7 @@ struct functions { For example, you could load the document to be decoded over a codec Message by mean #Message::fromXML (using the xml document #getRootNode) during document lifetime. After that, it could be destroyed. */ - static void messageXmlDocumentFromXmlString(anna::xml::DocumentMemory &xmlDocument, const std::string &xmlString) throw(anna::RuntimeException); + static void messageXmlDocumentFromXmlString(anna::xml::DocumentMemory &xmlDocument, const std::string &xmlString) noexcept(false); };