Fix enum bug (was on dictionary even when no data). PcapDecoder can load multiple...
[anna.git] / include / anna / diameter / stack / Engine.hpp
index ca3f758..5dcb440 100644 (file)
@@ -71,7 +71,7 @@ class Engine : public anna::Singleton <Engine> {
 
 public:
 
-  typedef std::map<int, Dictionary*> stack_container;
+  typedef std::map<unsigned int, Dictionary*> stack_container;
   typedef stack_container::const_iterator const_stack_iterator;
   typedef stack_container::iterator stack_iterator;
 
@@ -84,7 +84,7 @@ public:
   * @param stackId Stack identifier.
   * @return Dictionary reference, NULL if no stack found
   */
-  const Dictionary * getDictionary(int stackId) const throw();
+  const Dictionary * getDictionary(unsigned int stackId) const throw();
 
   /** Beginning stack iterator */
   const_stack_iterator stack_begin() const throw() { return a_stacks.begin(); }
@@ -104,9 +104,11 @@ public:
   /**
   * Class string representation
   *
+  * @param all Complete engine information versus only stacks list with its ids and dictionary names
+  *
   * @return String with class content
   */
-  std::string asString(void) const throw();
+  std::string asString(bool all = true) const throw();
 
   // set
 
@@ -143,7 +145,7 @@ public:
   *
   * @return Dictionary registered. When exception happen, dictionary can be accessed by #getDictionary
   */
-  Dictionary * createDictionary(int stackId, const std::string & xmlPathFile = "") throw(anna::RuntimeException);
+  Dictionary * createDictionary(unsigned int stackId, const std::string & xmlPathFile = "") throw(anna::RuntimeException);
 
   /**
   * Register a externally created Dictionary or a derived class from Dictionary
@@ -154,7 +156,7 @@ public:
   *
   * @return Dictionary registered. When exception happen, dictionary can be accessed by #getDictionary
   */
-  Dictionary * registerDictionary(int stackId, Dictionary *dictionary) throw(anna::RuntimeException);
+  Dictionary * registerDictionary(unsigned int stackId, Dictionary *dictionary) throw(anna::RuntimeException);
 
   /**
   * Loads an XML dictionary document over the diameter stack identifiers (one or more stack id's).
@@ -164,7 +166,7 @@ public:
   * @param stacks Stacks identifiers over which the dictionary will be load.
   * @param xmlPathFile Path file to the xml document which represents the diameter dictionary.
   */
-  void loadDictionary(const std::vector<int> & stacks, const std::string & xmlPathFile) throw(anna::RuntimeException);
+  void loadDictionary(const std::vector<unsigned int> & stacks, const std::string & xmlPathFile) throw(anna::RuntimeException);
 
   /**
   * Loads an XML dictionary document over all the diameter engine registered stacks. When more than one stack id is
@@ -185,7 +187,7 @@ public:
   *
   * @param stackId Stack identifier for created dictionary
   */
-  void removeStack(int stackId) throw();
+  void removeStack(unsigned int stackId) throw();
 
 private: