* may occur. If you add elements (vendors, avps, messages) is not a problem.
*
* IMPORTANT NOTES:
- * 1) if you want to reuse the message, as a recommendation, you should set engine to
- * NULL or use #clear. In that way, next operation will adjust automatically the needed
- * engine because it would not be configured in such stage.
- * 2) if you want to pre-configure the engine you will need to set the engine to NULL
- * previously and then you could change to the new one without warning/ignoring.
- * 3) if you have dedicated message objects for each interface (application id), then
+ * 1) if you want to reuse the message, as a recommendation, you should #clear the
+ * message. In that way, next operation will adjust automatically the needed engine.
+ * 2) if you have dedicated message objects for each interface (application id), then
* you could set the corresponding engine on constructor (or setEngine), and forget
* about #clear. The needed cleanup will be done automatically from decoding and xml
* loading procedures, and initialized engine will be kept along message operations.
/**
* Destructor
*/
- ~Message();
+ virtual ~Message();
+
// Virtual destructors are useful when you can delete an instance of a derived class through a pointer to base class:
// This destructor is not virtual, then a pointer to base class (even pointing to a children one) will invoke this destructor, not the derived one.
// My current solution: virtualizing method 'clear'
*/
void loadXML(const std::string &xmlPathFile) throw(anna::RuntimeException);
+ /**
+ * Interpret a xml string in order to create a diameter message
+ * You could apply this multiple times over the same object. A basic cleanup is done respecting the codec engine.
+ *
+ * @see functions::messageXmlDocumentFromXmlString
+ * @see fromXML
+ *
+ * @param xmlString xml representation of the diameter message
+ */
+ void loadXMLString(const std::string &xmlString) throw(anna::RuntimeException);
+
// getters
during hexadecimal read. Normally only printable 'data' fields are used for matching issues.
For example, imagine a 'pattern.xml' file like:
- <message version="1" name="Credit-Control-Request" application-id="16777236" hop-by-hop-id="0" end-by-end-id="0">
+ <message version="1" name="Credit-Control-Request" application-id="16777236" hop-by-hop-id="0" end-to-end-id="0">
<avp name="Subscription-Id">
<avp name="Subscription-Id-Type" data="0" alias="END_USER_E164"/>
<avp name="Subscription-Id-Data" data="616[0-9]{6,6}"/>
#endif
+