Yate
Public Member Functions | Static Public Member Functions | Protected Attributes
UIFactory Class Reference

A static user interface creator. More...

#include <yatecbase.h>

Inheritance diagram for UIFactory:
String GenObject

List of all members.

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

Detailed Description

A static user interface creator.

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


Constructor & Destructor Documentation

UIFactory ( const char *  name) [explicit]

Constructor. Append itself to the factories list

virtual ~UIFactory ( ) [virtual]

Destructor. Remove itself from list


Member Function Documentation

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

Parameters:
typeObject's type
nameObject' name
paramsOptional object parameters
factoryOptional 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
bool canBuild ( const String type) [inline]

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

Parameters:
typeObject type to check
Returns:
True if this factory can build the object
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

Parameters:
typeObject's type
nameObject' name
paramsOptional object parameters
Returns:
Valid pointer or 0 if failed to build it

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