class GmOptions

The GmOptions class controls all GLAM options available to the user.

Public Methods

[more]virtual const GlmColor4* getColorOption (char* key)
Gets a color value from the keys database.
[more]static GmOptions* getInstance (char* configFile)
Gets the instance of the GLAM options object and loads the given configuration file.
[more]static GmOptions* getInstance ()
Gets the instance of the GLAM options object
[more]virtual const float getScalarOption (char* key)
Gets a scalar point value from the options database.
[more]virtual const char* getStringOption (char* key)
Gets a string option value from the options database.
[more]virtual void loadConfigurationFile (char* configFile)
Loads a set of configurations from a configuration file.

Protected Fields

[more]map<string, GlmColor4*> mColorOptions
The database of color configuration keys and values
[more]map<string, float> mScalarOptions
The database of scalar configuration keys and values
[more]map<string, string> mStringOptions
The database of string configuration keys and values

Protected Methods

[more] GmOptions ()
Protected constructor for singleton class
[more]virtual void processOptionLine (char* optionLine)
This method processes a complete option line by performing strict syntax checking on it as well as identifying what sort of configuration option it is
[more]virtual void setColorOption (char* colorOption)
Sets a color option in the options database.
[more]virtual void setScalarOption (char* scalarOption)
Sets a single scalar option in the options database.
[more]virtual void setStringOption (char* stringOption)
Sets a string option in the options database.
[more]virtual ~GmOptions ()
Virtual protected destructor for singleton class


Documentation

The GmOptions class controls all GLAM options available to the user. Some configurable options include: display resolution, default size, etc
omap<string, float> mScalarOptions
The database of scalar configuration keys and values

omap<string, GlmColor4*> mColorOptions
The database of color configuration keys and values

omap<string, string> mStringOptions
The database of string configuration keys and values

o GmOptions()
Protected constructor for singleton class

ovirtual ~GmOptions()
Virtual protected destructor for singleton class

ostatic GmOptions* getInstance()
Gets the instance of the GLAM options object

ostatic GmOptions* getInstance(char* configFile)
Gets the instance of the GLAM options object and loads the given configuration file.

Parameters:
configFile - the configuration file to load

ovirtual void loadConfigurationFile(char* configFile)
Loads a set of configurations from a configuration file. The configuration file format can be in the form of:

TOKEN VALUE

VALUE can be either a floating point scalar or RGBA quadlet. For example:

Text.Resolution 200.0
Text.Color 0.35 0.37 0.31 1.0

Parameters:
configFile - the configuration file to load the setup information from.

ovirtual const char* getStringOption(char* key)
Gets a string option value from the options database.

Parameters:
- key the string key value to retrieve
Returns:
the text string that is associated with the given key

ovirtual const float getScalarOption(char* key)
Gets a scalar point value from the options database.

Parameters:
- key the scalar key value to retrieve
Returns:
the scalar value associated with the given key

ovirtual const GlmColor4* getColorOption(char* key)
Gets a color value from the keys database.

Parameters:
- key the color value to get from the options database
Returns:
the color associated with the given key

ovirtual void processOptionLine(char* optionLine)
This method processes a complete option line by performing strict syntax checking on it as well as identifying what sort of configuration option it is

ovirtual void setStringOption(char* stringOption)
Sets a string option in the options database. The string option can look something like:

Text.Font "/usr/share/font/truetype/Arial.ttf"

@para stringOption the string option, which should include a key, value pair.

ovirtual void setScalarOption(char* scalarOption)
Sets a single scalar option in the options database. The string should look something like the following:

Text.Size 14.0

or

Parameters:
scalarOption - the option string, which should include a key value(s) pair.

ovirtual void setColorOption(char* colorOption)
Sets a color option in the options database. The string should look something like the following:

Text.Color 0.24 0.74 0.70 1.0

Parameters:
colorOption - the option string, which should include a key value(s) pair.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.