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

bool canBuild ( const String type  )  [inline]

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

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:
type Object's type
name Object' name
params Optional object parameters
Returns:
Valid pointer or 0 if failed to build it

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:
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


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

Generated on Sat May 28 18:28:23 2011 for Yate by  doxygen 1.5.6