X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;ds=inline;f=source%2Fdiameter%2Fstack%2FEngine.cpp;h=e8c77a309936c686f97dbc5e1bcdd07674806886;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=d338fef1b3513eb4dc3a7e0b9ccb65ae79746e1f;hpb=93366a0bda79e6fd6e7dad6316bfcf8cc82f5731;p=anna.git diff --git a/source/diameter/stack/Engine.cpp b/source/diameter/stack/Engine.cpp index d338fef..e8c77a3 100644 --- a/source/diameter/stack/Engine.cpp +++ b/source/diameter/stack/Engine.cpp @@ -19,11 +19,6 @@ #include - -// libxml2 Parser doesn't support default attribute value retrieving: -// \n\ -// This dtd sintax will be replaced by #IMPLIED attributes. - namespace anna { namespace diameter { namespace stack { @@ -135,7 +130,7 @@ anna::diameter::stack::Engine::Engine(void) { //------------------------------------------------------------------------------ //------------------------------------------------------ Engine::getDictionary() //------------------------------------------------------------------------------ -const anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::getDictionary(unsigned int stackId) const throw() { +const anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::getDictionary(unsigned int stackId) const { const Dictionary * result = NULL; const_stack_iterator it = a_stacks.find(stackId); @@ -148,9 +143,8 @@ const anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::getDict //------------------------------------------------------------------------------ //----------------------------------------------------------- Engine::asString() //------------------------------------------------------------------------------ -std::string anna::diameter::stack::Engine::asString(bool all) const throw() { +std::string anna::diameter::stack::Engine::asString(bool all) const { std::string trace; - unsigned int stackId; if(isEmpty()) { trace = "No diameter stacks found"; @@ -182,7 +176,7 @@ std::string anna::diameter::stack::Engine::asString(bool all) const throw() { //------------------------------------------------------------------------------ //------------------------------------------------- Engine::registerDictionary() //------------------------------------------------------------------------------ -anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::registerDictionary(unsigned int stackId, Dictionary *dictionary) throw(anna::RuntimeException) { +anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::registerDictionary(unsigned int stackId, Dictionary *dictionary) noexcept(false) { Dictionary * result = const_cast(getDictionary(stackId)); if(!dictionary) @@ -192,7 +186,7 @@ anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::registerDicti throw anna::RuntimeException("Such provided stack id has already been created. Removes it before call this method", ANNA_FILE_LOCATION); } else { // new stack a_stacks[stackId] = dictionary; // no need for singleton destructor - const_stack_iterator it = a_stacks.find(stackId); + //const_stack_iterator it = a_stacks.find(stackId); //result = (Dictionary *)(*it).second; result = dictionary; } @@ -203,11 +197,11 @@ anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::registerDicti //------------------------------------------------------------------------------ //--------------------------------------------------- Engine::createDictionary() //------------------------------------------------------------------------------ -anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::createDictionary(unsigned int stackId, const std::string & xmlPathFile) throw(anna::RuntimeException) { +anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::createDictionary(unsigned int stackId, const std::string & xmlPathFile) noexcept(false) { Dictionary * result = const_cast(getDictionary(stackId)); if(result) // if exists, launch exception - throw anna::RuntimeException("Such provided stack id has already been created. Removes it before call this method", ANNA_FILE_LOCATION); + throw anna::RuntimeException("Such provided stack id has already been created (note: API allows you to remove any registered stack)", ANNA_FILE_LOCATION); // Register a new dictionary: result = registerDictionary(stackId, new Dictionary()); @@ -225,7 +219,7 @@ anna::diameter::stack::Dictionary * anna::diameter::stack::Engine::createDictio } -void anna::diameter::stack::Engine::loadDictionary(const std::vector & stacks, const std::string & xmlPathFile) throw(anna::RuntimeException) { +void anna::diameter::stack::Engine::loadDictionary(const std::vector & stacks, const std::string & xmlPathFile) noexcept(false) { std::vector::const_iterator it; Dictionary *d; @@ -249,7 +243,7 @@ void anna::diameter::stack::Engine::loadDictionary(const std::vector