# class UIFactory | A static user interface creator. More...
Contains pure virtuals
Full name | `TelEngine::UIFactory`
Definition | `#include <yatecbase.h>`
Inherits | TelEngine::String [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- explicit UIFactory (const char* name)
- virtual ~UIFactory ()
- inline bool canBuild (const String& type)
- virtual void* create (const String& type, const char* name, NamedList* params = 0)

#### Public Static Methods

- static void* build (const String& type, const char* name, NamedList* params = 0, const char* factory = 0)

#### Protected Members

- ObjList m_types

## Detailed Description

Each instance of UIFactory creates special user interface elements by type. Keeps a global list with all factories. The list doesn't own the facotries

explicit UIFactory (const char* name) | ### UIFactory

Constructor. Append itself to the factories list

~UIFactory () | ### ~UIFactory

[virtual]

Destructor. Remove itself from list

inline bool canBuild (const String& type) | ### canBuild

Check if this factory can build an object of a given type

Parameters:

type | Object type to check

Returns: True if this factory can build the object

void* create (const String& type, const char* name, NamedList* params = 0) | ### create

[pure virtual]

Ask this factory to create an object of a given type

Parameters:

type | Object's type
name | Object' name
params | Optional object parameters

Returns: Valid pointer or 0 if failed to build it

void* build (const String& type, const char* name, NamedList* params = 0, const char* factory = 0) | ### build

[static]

Ask all factories to create an object of a given type

Parameters:

type | Object's type
name | Object' name
params | Optional object parameters
factory | Optional factory name used to create the requested object. If non 0, this will be the only factory asked to create the object

Returns: Valid pointer or 0 if failed to build it

ObjList m_types | ### m_types

[protected]

Generated by: paulc on bussard on Fri May 8 12:37:22 2015, using kdoc 2.0a54.