# TypedUserInfo< T > Class Template Reference

TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is already templated. It serves as a bridge to non-abstract classes CompoundUserInfo<T> or ValuedUserInfo<T>. More...

`#include <userinfo.h>`

Inheritance diagram for TypedUserInfo< T >:

[legend]
Collaboration diagram for TypedUserInfo< T >:

[legend]

List of all members.

## 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
| TypedUserInfo (const string &userFriendlyTypeName)
| default constructor, which is intentionally declared as protected
| ~TypedUserInfo ()
| destructor
string | XMLCh2str (const XMLCh *const XMLCh_str)
| function which transcodes Xerces' XMLCh-based strings into C++ strings
string | removeSpaces (const string &str)
virtual void | AssemblyComponentsFromXML (DOMElement &element)=0
| This method parse DOMElement, finds proper DOMNode and fills binded data accordingly.
virtual void | ReleaseMemory ()
| A method for releasing memory allocated within the 'AssemblyComponentsFromXML()' method.
virtual bool | DisassemblyComponentsToXML (DOMElement &element)=0
## Static Protected Attributes
static const TypedUserInfo< T > & | instance

## Detailed Description

### template<typename T>
class TypedUserInfo< T >

TypeUserInfo is still an abstract class, but contrary to the UserInfo class it is already templated. It serves as a bridge to non-abstract classes CompoundUserInfo<T> or ValuedUserInfo<T>.

There are two important features of this class. The first is a primitive mechanism bounding typeless methods DisassemblyTypelessInstance, resp. AssemblyTypelessInstance, to their typed virtual versions DisassemblyInstance, resp. AssemblyInstance. And the other is the only public attribute of this class, called 'instance', which is to be filled by the only instance of this class. Indeed, it is not possible to create any other instance outside this class (or its descendant classes), as the constructor is intentionally protected.

## Member Function Documentation

template<class T>

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.

template<class T>

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().

template<class T>

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().

virtual bool BindingFrame::DisassemblyComponentsToXML | ( | DOMElement & | element | ) | `[pure virtual, inherited]`

This method reads binded data, fill them into a new DOMNode, which then appends to the passed DOMElement

Implemented in CompoundUserInfo< T >::BindedElement< U >.

## Member Data Documentation

template<typename T>

const TypedUserInfo<T>& TypedUserInfo< T >::instance`[static, protected]`

the only instance of this class (each type T has its own instance) which is used as a factory for processing related userinfos

The documentation for this class was generated from the following file:

- userinfo.h