#include <yatecbase.h>
Public Member Functions | |
UIFactory (const char *name) | |
virtual | ~UIFactory () |
bool | canBuild (const String &type) |
virtual void * | create (const String &type, const char *name, NamedList *params=0)=0 |
Static Public Member Functions | |
static void * | build (const String &type, const char *name, NamedList *params=0, const char *factory=0) |
Protected Attributes | |
ObjList | m_types |
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
UIFactory | ( | const char * | name | ) |
Constructor. Append itself to the factories list
virtual ~UIFactory | ( | ) | [virtual] |
Destructor. Remove itself from list
bool canBuild | ( | const String & | type | ) | [inline] |
Check if this factory can build an object of a given type
type | Object type to check |
virtual void* create | ( | const String & | type, | |
const char * | name, | |||
NamedList * | params = 0 | |||
) | [pure virtual] |
Ask this factory to create an object of a given type
type | Object's type | |
name | Object' name | |
params | Optional object parameters |
static void* build | ( | const String & | type, | |
const char * | name, | |||
NamedList * | params = 0 , |
|||
const char * | factory = 0 | |||
) | [static] |
Ask all factories to create an object of a given type
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 |