Crazy Eddie's GUI System  0.8.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CEGUI::SchemeManager Class Reference

A class that manages the creation of, access to, and destruction of GUI Scheme objects. More...

+ Inheritance diagram for CEGUI::SchemeManager:
+ Collaboration diagram for CEGUI::SchemeManager:

Public Types

typedef ConstMapIterator
< ObjectRegistry
SchemeIterator
 Definition of SchemeIterator type.
 

Public Member Functions

 SchemeManager ()
 Constructor.
 
 ~SchemeManager ()
 Destructor.
 
SchemeIterator getIterator () const
 Return a SchemeManager::SchemeIterator object to iterate over the available schemes.
 
void setAutoLoadResources (bool enabled)
 If this is enabled, Schemas will immediately load their resources after they are created. More...
 
bool getAutoLoadResources () const
 Checks whether resources are loaded immediately after schemes are created. More...
 
- Public Member Functions inherited from CEGUI::NamedXMLResourceManager< Scheme, Scheme_xmlHandler >
 NamedXMLResourceManager (const String &resource_type)
 Constructor. More...
 
virtual ~NamedXMLResourceManager ()
 Destructor.
 
SchemecreateFromContainer (const RawDataContainer &source, XMLResourceExistsAction action=XREA_RETURN)
 Creates a new T object from a RawDataContainer and adds it to the collection. More...
 
SchemecreateFromFile (const String &xml_filename, const String &resource_group="", XMLResourceExistsAction action=XREA_RETURN)
 Creates a new T object from an XML file and adds it to the collection. More...
 
SchemecreateFromString (const String &source, XMLResourceExistsAction action=XREA_RETURN)
 Creates a new T object from a string and adds it to the collection. More...
 
void destroy (const String &object_name)
 Destroy the object named object_name, or do nothing if such an object does not exist in the collection. More...
 
void destroy (const Scheme &object)
 Destroy the object object, or do nothing if such an object does not exist in the collection. More...
 
void destroyAll ()
 Destroy all objects.
 
Schemeget (const String &object_name) const
 Return a reference to the object named object_name. More...
 
bool isDefined (const String &object_name) const
 Return whether an object named object_name exists.
 
void createAll (const String &pattern, const String &resource_group)
 Create a new T object from files with names matching pattern in resource_group.
 

Protected Member Functions

void doPostObjectAdditionAction (Scheme &object)
 Function called each time a new object is added to the collection.
 
- Protected Member Functions inherited from CEGUI::NamedXMLResourceManager< Scheme, Scheme_xmlHandler >
void destroyObject (typename ObjectRegistry::iterator ob)
 implementation of object destruction.
 
SchemedoExistingObjectAction (const String object_name, Scheme *object, const XMLResourceExistsAction action)
 function to enforce XMLResourceExistsAction policy.
 

Protected Attributes

bool d_autoLoadResources
 If true, Scheme::loadResources is called after "create" is called for it.
 
- Protected Attributes inherited from CEGUI::NamedXMLResourceManager< Scheme, Scheme_xmlHandler >
const String d_resourceType
 String holding the text for the resource type managed.
 
ObjectRegistry d_objects
 the collection of objects
 

Additional Inherited Members

- Static Public Member Functions inherited from CEGUI::Singleton< SchemeManager >
static SchemeManagergetSingleton (void)
 
static SchemeManagergetSingletonPtr (void)
 
- Static Public Attributes inherited from CEGUI::ResourceEventSet
static const String EventNamespace
 Namespace name for all resource managers.
 
static const String EventResourceCreated
 
static const String EventResourceDestroyed
 
static const String EventResourceReplaced
 
- Protected Types inherited from CEGUI::NamedXMLResourceManager< Scheme, Scheme_xmlHandler >
typedef std::map< String,
Scheme
*, StringFastLessCompare
CEGUI_MAP_ALLOC(String, Scheme *)> 
ObjectRegistry
 type of collection used to store and manage objects
 
- Static Protected Attributes inherited from CEGUI::Singleton< SchemeManager >
static SchemeManagerms_Singleton
 

Detailed Description

A class that manages the creation of, access to, and destruction of GUI Scheme objects.

Member Function Documentation

bool CEGUI::SchemeManager::getAutoLoadResources ( ) const

Checks whether resources are loaded immediately after schemes are created.

See Also
SchemeManager::setAutoLoadResources
void CEGUI::SchemeManager::setAutoLoadResources ( bool  enabled)

If this is enabled, Schemas will immediately load their resources after they are created.

It's sometimes useful to turn this off when you want to load things more selectively. This is enabled by default.

Parameters
enabledIf true, you will have to load resources from the Scheme yourself!
Note
Calling Scheme::loadResources after you create the Scheme is equivalent to this being enabled and creating the scheme.