rwsf::GenericServiceVariablerwsf::ServiceVariable
clone() doMarshal() |
doUnmarshal() equals() |
GenericServiceVariable() getObject() |
getSize() ~GenericServiceVariable() |
#include rwsf/service_variable/GenericServiceVariable.h
Class GenericServiceVariable holds a generic pointer to a void type. This allows any type to be stored and then cast out later. The pointer and the size of the data being pointed to are all that are needed. The marshal for this type will print out XML with a CDATA block which cotnains the binary string for this object. Note that this string can contain embedded nulls.
GenericServiceVariable(void * object, long size);
Default constructor. Creates a variable with no type that points to the given object with the given size.
GenericServiceVariable(const rwsf::XmlName & type, void * object, long size);
Constructor that creates a variable with a type.
~GenericServiceVariable();
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 the pointer int he clone is pointing to the same object as the original, with the same size.
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 the objects' pointers are pointing to the same object and they have the same size.
void * getObject() const;
Returns the object as a void*. This should be cast to the correct type by the user of this function.
long getSize() const;
Returns the size of the object stored in this generic 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 the object as a binary string in a "<![CDATA[ ... ]]>" tag
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 read in the element value as string data and set the object to that binary string. Note: This WILL MODIFY THE ORIGINAL OBJECT, so use with caution!!
© 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.