Public Member Functions
GUI::SchemeManager Class Reference

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

List of all members.

Public Member Functions

Scheme loadScheme (sring scheme_filename, string resourceGroup="")
 Loads a scheme.
void unloadScheme (string scheme_name)
 Unloads all data referenced in a scheme. If any object is using some resource which is listed in the scheme, this function will effectively pull the rug out from under those objects. This should be used with extreme caution, or not at all.
bool isSchemePresent (string scheme_name)
 Returns true if the named Scheme is present in the system (though the resources for the scheme may or may not be loaded)
Scheme getScheme (string name)
 Returns a pointer to the Scheme object with the specified name.
void unloadAllSchemes ()
 Unload all schemes currently defined within the system.

Qualified Iterators

Scheme Scheme
 Can be used to iterate over the available schemes.

Detailed Description

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


Member Function Documentation

Scheme GUI::SchemeManager::loadScheme ( sring  scheme_filename,
string  resourceGroup = "" 
)

Loads a scheme.

Parameters:
scheme_filenameString object that holds the filename of the scheme to be loaded
resourceGroupResource group identifier to be passed to the resource manager. NB: This affects loading of the scheme xml file only, scheme resources may specify their own groups.
Returns:
Pointer to an object representing the loaded Scheme.
void GUI::SchemeManager::unloadScheme ( string  scheme_name)

Unloads all data referenced in a scheme. If any object is using some resource which is listed in the scheme, this function will effectively pull the rug out from under those objects. This should be used with extreme caution, or not at all.

Parameters:
scheme_nameString object specifying the name of the Scheme to be unloaded.
bool GUI::SchemeManager::isSchemePresent ( string  scheme_name)

Returns true if the named Scheme is present in the system (though the resources for the scheme may or may not be loaded)

Parameters:
scheme_nameString object specifying the name of the Scheme to check for.
Returns:
true if the scheme is loaded, false if it is not.
Scheme GUI::SchemeManager::getScheme ( string  name)

Returns a pointer to the Scheme object with the specified name.

Parameters:
nameString object holding the name of the Scheme to be returned.
Returns:
Pointer to the Scheme named name.
Exceptions:
UnknownObjectExceptionthrown if no Scheme named name is present in the system
void GUI::SchemeManager::unloadAllSchemes ( )

Unload all schemes currently defined within the system.

Note:
Calling this method has the potential to be very dangerous; if any of the data that forms part of the scheme is still in use, you can expect fireworks shortly after!
Returns:
Nothing.

Member Data Documentation

Scheme GUI::SchemeManager::Scheme

Can be used to iterate over the available schemes.

for each Scheme s in GUI.SchemeManager {
trace(s.getName());
}