All in one dump for launcher
authorEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Fri, 3 Apr 2015 11:42:21 +0000 (13:42 +0200)
committerEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Fri, 3 Apr 2015 11:42:21 +0000 (13:42 +0200)
example/diameter/launcher/main.cpp

index 5a8422d..48b304d 100644 (file)
@@ -1505,6 +1505,16 @@ throw(anna::RuntimeException) {
 
       codecEngine->setDictionary(d);
       LOGDEBUG(anna::Logger::debug(codecEngine->asString(), ANNA_FILE_LOCATION));
+
+      if (lst.size() > 1) {
+        std::string all_in_one = "./dictionary-all-in-one.xml";
+        std::ofstream out(all_in_one, std::ifstream::out);
+        std::string buffer = d->asXMLString();
+        out.write(buffer.c_str(), buffer.size());
+        out.close();
+        std::cout << "Written '" << all_in_one << "' (provide it next time to be more comfortable)." << std::endl;
+      }
+
    } catch (anna::RuntimeException &ex) {
       ex.trace();
    }