CBinaryAttribute Class Reference

#include <CAttributeImpl.h>

Inheritance diagram for CBinaryAttribute:

CStringAttribute IAttribute IrrUnknown

Public Member Functions

Data Fields

Protected Member Functions

Static Protected Member Functions


Constructor & Destructor Documentation

CBinaryAttribute ( const c8 name,
void *  binaryData,
s32  lenghtInBytes 
) [inline]


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.

virtual void getBinary ( void *  outdata,
s32  maxLenght 
) [inline, virtual, inherited]

Reimplemented from IAttribute.

virtual bool getBool (  )  [inline, virtual, inherited]

Reimplemented from IAttribute.

static s32 getByteFromHex ( c8  h  )  [inline, static, protected, inherited]

virtual video::SColor getColor (  )  [inline, virtual, inherited]

Reimplemented in CColorfAttribute, and CColorAttribute.

virtual video::SColorf getColorf (  )  [inline, virtual, inherited]

Reimplemented in CColorfAttribute, and CColorAttribute.

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();

virtual const char* getEnum (  )  [inline, virtual, inherited]

Reimplemented in CEnumAttribute.

virtual f32 getFloat (  )  [inline, virtual, inherited]

Reimplemented from IAttribute.

static void getHexStrFromByte ( c8  byte,
c8 out 
) [inline, static, protected, inherited]

virtual s32 getInt (  )  [inline, virtual, inherited]

Reimplemented from IAttribute.

virtual void getString ( char *  target  )  [inline, virtual, inherited]

virtual void getString ( c8 target,
const u32 targetSize 
) [inline, virtual, inherited]

virtual video::ITexture* getTexture (  )  [inline, virtual, inherited]

Reimplemented in CTextureAttribute.

virtual E_ATTRIBUTE_TYPE getType (  )  [inline, virtual]

Reimplemented from CStringAttribute.

virtual const wchar_t* getTypeString (  )  [inline, virtual]

Reimplemented from CStringAttribute.

virtual core::vector3df getVector (  )  [inline, virtual, inherited]

Reimplemented in CVector3DAttribute.

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.

virtual void setBinary ( void *  data,
s32  maxLenght 
) [inline, virtual, inherited]

Reimplemented from IAttribute.

virtual void setBool ( bool  boolValue  )  [inline, virtual, inherited]

Reimplemented in CBoolAttribute.

virtual void setColor ( video::SColor  color  )  [inline, virtual, inherited]

Reimplemented in CColorfAttribute, and CColorAttribute.

virtual void setColor ( video::SColorf  color  )  [inline, virtual, inherited]

Reimplemented in CColorfAttribute, and CColorAttribute.

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.

virtual void setEnum ( const char *  enumValue,
const char *const *  enumerationLiterals 
) [inline, virtual, inherited]

Reimplemented in CEnumAttribute.

virtual void setFloat ( f32  floatValue  )  [inline, virtual, inherited]

Reimplemented from IAttribute.

virtual void setInt ( s32  intValue  )  [inline, virtual, inherited]

Reimplemented from IAttribute.

virtual void setString ( const c8 text  )  [inline, virtual, inherited]

Reimplemented from IAttribute.

virtual void setStringW ( const wchar_t *  text  )  [inline, virtual, inherited]

virtual void setTexture ( video::ITexture  )  [inline, virtual, inherited]

Reimplemented in CTextureAttribute.

virtual void setVector ( core::vector3df  v  )  [inline, virtual, inherited]

Reimplemented in CVector3DAttribute.


Field Documentation

core::stringc Name [inherited]

core::stringc Value [inherited]


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