#include <userinfo.h>


Static Public Member Functions | |
| template<class T> | |
| static T * | Assembly (DOMElement &element, const string tagName) |
| template<class T> | |
| static bool | Disassembly (T &instance, DOMElement &element, const string tagName, const string help) |
| template<class T> | |
| static bool | Disassembly (T &instance, DOMElement &element, const string tagName) |
Protected Member Functions | |
| ValuedUserInfo (string userFriendlyTypeName) | |
| string | XMLCh2str (const XMLCh *const XMLCh_str) |
| function which transcodes Xerces' XMLCh-based strings into C++ strings | |
| string | removeSpaces (const string &str) |
| virtual void | ReleaseMemory () |
| A method for releasing memory allocated within the 'AssemblyComponentsFromXML()' method. | |
Protected Attributes | |
| string | value |
| string variable which is automatically binded to a proper DOMElement attribute | |
Static Protected Attributes | |
| static const TypedUserInfo< T > & | instance |
The only thing left is to translate its public string attribute 'value' into a value of type T and also implement conversion in the other way round. For that, an overloading of methods T* AssemblyInstance() / bool DisassemblyInstance(T &instance) is fruitful. See some valued userinfo below as an example.
| static T* UserInfo::Assembly | ( | DOMElement & | element, | |
| const string | tagName | |||
| ) | [inline, static, inherited] |
This methods tries to assembly a new instance of type T (or some of its descendant types) according to a data stored in a DOMNode named tagName within a child nodes of the passed element. If an error occurs, it returns a NULL pointer.
References Attribute::Get(), and Attribute::type.
| static bool UserInfo::Disassembly | ( | T & | instance, | |
| DOMElement & | element, | |||
| const string | tagName, | |||
| const string | help | |||
| ) | [inline, static, inherited] |
This methods tries to disassembly an instance of type T (or some of its descendant types) and build DOM tree accordingly. Then, it creates a new DOMNode named according tagName and connecti it to the passed DOMElement as a new child node (with a help attribute filled).
References Attribute::help, Attribute::Set(), and Attribute::type.
Referenced by UserInfo::Disassembly(), and CompoundUserInfo< T >::BindedElement< U >::DisassemblyComponentsToXML().
| static bool UserInfo::Disassembly | ( | T & | instance, | |
| DOMElement & | element, | |||
| const string | tagName | |||
| ) | [inline, static, inherited] |
This methods tries to disassembly an instance of type T (or some of its descendant types) and build DOM tree accordingly. Then, it creates a new DOMNode named according tagName and connecti it to the passed DOMElement as a new child node.
References UserInfo::Disassembly().
const TypedUserInfo<T>& TypedUserInfo< T >::instance [static, protected, inherited] |
the only instance of this class (each type T has its own instance) which is used as a factory for processing related userinfos
1.5.6