rwsf::MessageServiceVariablerwsf::ServiceVariable
clone() doMarshal() doUnmarshal() |
equals() getPart() getPartCount() |
getPartNames() getSimpleVariableFromXpath() MessageServiceVariable() |
setPart() ~MessageServiceVariable() |
#include rwsf/service_variable/MessageServiceVariable.h
Class MessageServiceVariable holds a map of string part names to ServiceVariable parts. The parts can be of any type. This class also keeps a list of part names so order can be preserved.
MessageServiceVariable();
Default constructor. Creates a variable with no type.
MessageServiceVariable(const rwsf::XmlName & type);
Constructor that creates a variable with a type.
~MessageServiceVariable();
Destructor.
rwsf::ServiceVariablePtr clone() const;
Implements method in rwsf::ServiceVariable
Base class documentation:
Clones the object so it can be manipulated independently of the original
Implementation documentation:
Returns a new instance where each part is cloned from this.
bool equals(rwsf::ServiceVariablePtr b) const;
Implements method in rwsf::ServiceVariable
Base class documentation:
Pure virtual function that will return true when two ServiceVariables compare equal
Implementation documentation:
Returns true if each part compares equal
ServiceVariablePtr getPart(const std::string & partName) const;
Get the given part as a service variable. If the part is not found, This will return a null ServiceVariable (isValid == false).
unsigned long getPartCount() const;
Return the number of parts.
const rwsf::MessagePartList & getPartNames() const;
Returns the list of part strings in defined order
rwsf::ServiceVariablePtr getSimpleVariableFromXpath(const std::string & partName, const std::string & xpath) const;
Returns a simple service variable given a part name and an xpath This will throw an exception if the part name doesn't exist, the xpath is trying to access a complex type in a simple variable, or the xpath does not eventually lead to a simple variable.
void setPart(const std::string & partName, rwsf::ServiceVariablePtr part);
Sets the given part to the given service variable
std::string doMarshal(const rwsf::XmlName & rootElement) const;
Implements method in rwsf::ServiceVariable
Base class documentation:
Override this to perform the implementation specific marshalling
Implementation documentation:
Wraps each part in a "<partName></partName>" tag and marshals each part in between.
void doUnmarshal(const std::string & data);
Implements method in rwsf::ServiceVariable
Base class documentation:
Override this to perform the implementation specific unmarshalling
Implementation documentation:
This will unmarshal the string into this message object. The only caveat is that this message object must already be set up with the correct parts and part formats (i.e. simple or complex). This is the only way to know how to unmarshal the given string. As usual, the passed in string must be a valid XML fragment.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.