// get
/**
- * Returns the dictionary registered with the provided identifier
+ * Returns the dictionary registered with the provided identifier, which commonly
+ * is the 'Application-Id'.
*
* @param stackId Stack identifier.
* @return Dictionary reference, NULL if no stack found
* Dictionary * d = engine->createDictionary(MMS_STACK_ID);
* // Loading data:
* d->load("/var/tmp/mms.xml");
- *
+ * ...
* Method 3 - Create and then, load data through Dictionary API (*):
* Dictionary * d = engine->createDictionary(MMS_STACK_ID);
* // Loading data:
*
* </pre>
*
- * @param stackId Stack identifier for created dictionary.
+ * @param stackId Stack identifier for created dictionary. We recommend to use the Diameter 'Application-Id' unless
+ * the application is going to use dictionaries covering different applications (which is not very usual).
* @param xmlPathFile Path file to the xml document which represents the diameter dictionary.
*
* @return Dictionary registered. When exception happen, dictionary can be accessed by #getDictionary
*/
Dictionary * createDictionary(int stackId, const std::string & xmlPathFile = "") throw(anna::RuntimeException);
+ /**
+ * Register a externally created Dictionary or a derived class from Dictionary
+ *
+ * @param stackId Stack identifier for provided dictionary. We recommend to use the Diameter 'Application-Id' unless
+ * the application is going to use dictionaries covering different applications (which is not very usual).
+ * @param dictionary Externally created dictionary
+ *
+ * @return Dictionary registered. When exception happen, dictionary can be accessed by #getDictionary
+ */
+ Dictionary * registerDictionary(int stackId, Dictionary *dictionary) throw(anna::RuntimeException);
+
/**
* Loads an XML dictionary document over the diameter stack identifiers (one or more stack id's).
* Passing more than one stack id, synchronized loadings are performed, which could be useful when