CStringParameters Class Reference

#include <CStringParameters.h>

Inheritance diagram for CStringParameters:

IStringParameters IrrUnknown

Public Member Functions

Protected Member Functions

Protected Attributes

Data Structures


Member Function Documentation

bool drop (  )  [inline, inherited]

Drops the object. Decrements the reference counter by one. Returns true, if the object was deleted. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

const c8* getDebugName (  )  const [inline, inherited]

Returns the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Returns:
Returns a string, previously set by setDebugName();

const c8 * getParameter ( const c8 parameterName  )  [virtual]

Gets a string parameter.

Parameters:
parameterName,: Name of the parameter to get.
Returns:
Returns value of the parameter previously set by setStringParameter() or 0 if parameter is not set.

Implements IStringParameters.

bool getParameterAsBool ( const c8 parameterName  )  [virtual]

Gets a parameter as boolean value

Parameters:
parameterName,: Name of the parameter to get.
Returns:
Returns value of the parameter previously set by setParameter() as bool or 0 if parameter is not set.

Implements IStringParameters.

f32 getParameterAsFloat ( const c8 parameterName  )  [virtual]

Gets a parameter as integer value

Parameters:
parameterName,: Name of the parameter to get.
Returns:
Returns value of the parameter previously set by setParameter() as float value or 0 if parameter is not set.

Implements IStringParameters.

s32 getParameterAsInt ( const c8 parameterName  )  [virtual]

Gets a parameter as integer value

Parameters:
parameterName,: Name of the parameter to get.
Returns:
Returns value of the parameter previously set by setParameter() as integer or 0 if parameter is not set.

Implements IStringParameters.

s32 getParameterCount (  )  [virtual]

Implements IStringParameters.

const c8 * getParameterName ( s32  index  )  [virtual]

Returns string parameter name by index.

Parameters:
index,: Index value, must be between 0 and getStringParameterCount()-1.

Implements IStringParameters.

CStringParameters::SStringPair * getParameterP ( const c8 parameterName  )  [protected]

const c8 * getParameterValue ( s32  index  )  [virtual]

Returns string parameter value by index.

Parameters:
index,: Index value, must be between 0 and getStringParameterCount()-1.

Implements IStringParameters.

void grab (  )  [inline, inherited]

Grabs the object. Increments the reference counter by one. Someone who calls grab() to an object, should later also call drop() to it. If an object never gets as much drop() as grab() calls, it will never be destroyed. The IrrUnknown class provides a basic reference counting mechanism with its methods grab() and drop(). Most objects of the Irrlicht Engine are derived from IrrUnknown, and so they are reference counted.

When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call drop(). This will destroy the object, if grab() was not called in another part of you program, because this part still needs the object. Note, that you only need to call drop() to the object, if you created it, and the method had a 'create' in it.

A simple example:

If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver->createTexture(dimension2d<s32>(128, 128)); If you no longer need the texture, call texture->drop(). If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver->loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver.

void setDebugName ( const c8 newName  )  [inline, protected, inherited]

Sets the debug name of the object. The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode.

Parameters:
newName,: New debug name to set.

void setParameter ( const c8 parameterName,
f32  value 
) [virtual]

Implements IStringParameters.

void setParameter ( const c8 parameterName,
s32  value 
) [virtual]

Implements IStringParameters.

void setParameter ( const c8 parameterName,
bool  value 
) [virtual]

Implements IStringParameters.

void setParameter ( const c8 parameterName,
const c8 value 
) [virtual]

Sets a string parameter.

Parameters:
parameterName,: Name for the parameter
value,: Value for the parameter. Set this to 0 to delete the parameter

Implements IStringParameters.


Field Documentation

core::array<SStringPair> Parameters [protected]


Generated on Fri Apr 27 14:47:02 2007 for IrrSpintz by  doxygen 1.5.1-p1