CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Utilities


Compounds

struct  iCommandLineParser
 A utility class that makes it easier to parse the command line. More...

struct  iConfig
 Interface to a configurator object. More...

struct  iConfigFile
 Configuration file interface. More...

struct  iConfigIterator
 Iterator which allows sequential access to configuration information contained in an iConfigFile object. More...

struct  iConfigManager
 The config manager is used to make a number of config file objects look like a single object. More...

struct  iDataBuffer
 The iDataBuffer interface can be used to exchange buffers with abstract data between plugins. More...

struct  iDataObject
 This is an iObject that contains a type-less data buffer. More...

struct  iDebugHelper
 Some object that wants to implement unit testing, debugging and/or benchmarking can implement this interface. More...

struct  iDocument
 Representation of a document containing a hierarchical structure of nodes. More...

struct  iDocumentAttribute
 An attribute for an iDocumentNode. More...

struct  iDocumentAttributeIterator
 An iterator over iDocumentNode attributes. More...

struct  iDocumentNode
 Representation of a node in a document. More...

struct  iDocumentNodeIterator
 An iterator over iDocumentNode. More...

struct  iDocumentSystem
 An iDocument factory. More...

struct  iObject
 This interface is an SCF interface for encapsulating csObject. More...

struct  iObjectIterator
 This is an iterator for child objects of a csObject. More...

struct  csOptionDescription
 Configuration option description. More...

struct  iReference
 This is a reference to some other object. More...

struct  iReferencedObject
 This is an object which is referenced by other objects. More...

struct  iString
 This is a SCF-compatible interface for csString. More...

struct  iStrVector
 This is a SCF-compatible interface for csStrVector. More...

struct  csVariant
 Variant, means that type of contained data is set at runtime. More...


iDebugHelper implementation support flags

#define CS_DBGHELP_UNITTEST   1
 supports UnitTest(). More...

#define CS_DBGHELP_BENCHMARK   2
 supports Benchmark(). More...

#define CS_DBGHELP_TXTDUMP   4
 supports non graphical Dump(). More...

#define CS_DBGHELP_GFXDUMP   8
 supports graphical Dump(). More...

#define CS_DBGHELP_STATETEST   16
 supports StateTest(). More...


Document changeabilty

#define CS_CHANGEABLE_NEVER   0
 The document can not be changed, CreateRoot() is not supported. More...

#define CS_CHANGEABLE_NEWROOT   1
 The document only allows changes with a newly created root. More...

#define CS_CHANGEABLE_YES   2
 The document can be changed. More...


Specific sized types.

The following types should be used whenever you need a variable of a specific size (in bits).

If these types are already defined by system headers for a particular platform, then define CS_BUILTIN_SIZED_TYPES to avoid duplicate type definition here.

typedef unsigned char uint8
 unsigned 8-bit integer (0..255). More...

typedef char int8
 signed 8-bit integer (-128..127). More...

typedef unsigned short uint16
 unsigned 16-bit integer (0..65 535). More...

typedef short int16
 signed 16-bit integer (-32 768..32 767). More...

typedef unsigned int uint32
 unsigned 32-bit integer (0..4 294 967 295). More...

typedef int int32
 signed 32-bit integer (-2 147 483 648..2 147 483 647). More...


Shortcuts for normal C types

typedef unsigned int uint
 Default unsigned int. More...


Helpers for dealing with endianness

uint64 big_endian_longlong (uint64 l)
 Convert a longlong from big-endian to machine format. More...

uint32 big_endian_long (uint32 l)
 Convert a long from big-endian to machine format. More...

uint16 big_endian_short (uint16 s)
 Convert a short from big-endian to machine format. More...

float big_endian_float (float f)
 Convert a big-endian floating-point number to machine format. More...

uint64 little_endian_longlong (uint64 l)
 Convert a longlong from little-endian to machine format. More...

uint32 little_endian_long (uint32 l)
 Convert a long from little-endian to machine format. More...

uint16 little_endian_short (uint16 s)
 Convert a short from little-endian to machine format. More...

float little_endian_float (float f)
 Convert a little-endian floating-point number to machine format. More...

int32 float2long (float f)
 Convert a float to a cross-platform 32-bit format (no endianess adjustments!). More...

float long2float (int32 l)
 Convert a 32-bit cross-platform float to native format (no endianess adjustments!). More...

int64 double2longlong (double d)
 Convert a double to a cross-platform 64-bit format (no endianess adjustments!). More...

double longlong2double (int64 i)
 Convert a 64-bit cross-platform double to native format (no endianess adjustments!). More...

short float2short (float f)
 Convert a float to a cross-platform 16-bit format (no endianess adjustments!). More...

float short2float (short s)
 Convert a 16-bit cross-platform float to native format (no endianess adjustments!). More...

uint64 convert_endian (uint64 l)
 Swap the bytes in a uint64 value. More...

int64 convert_endian (int64 l)
 Swap the bytes in a int64 value. More...

uint32 convert_endian (uint32 l)
 Swap the bytes in a uint32 value. More...

int32 convert_endian (int32 l)
 Swap the bytes in a int32 value. More...

int16 convert_endian (int16 s)
 Swap the bytes in a int16 value. More...

uint16 convert_endian (uint16 s)
 Swap the bytes in a uint16 value. More...

float convert_endian (float f)
 Swap the bytes in a float value. More...

uint16 get_le_short (void *buff)
 Read a little-endian short from address. More...

uint32 get_le_long (void *buff)
 Read a little-endian long from address. More...

float get_le_float32 (void *buff)
 Read a little-endian 32-bit float from address. More...

float get_le_float16 (void *buff)
 Read a little-endian 16-bit float from address. More...

void set_le_short (void *buff, uint16 s)
 Set a little-endian short on a address. More...

void set_le_long (void *buff, uint32 l)
 Set a little-endian long on a address. More...

void set_le_float32 (void *buff, float f)
 Set a little-endian 32-bit float on a address. More...

void set_le_float16 (void *buff, float f)
 Set a little-endian 16-bit float on a address. More...


Defines

#define CS_GET_CHILD_OBJECT(object, Interface)
 You can use this macro to get a child object from a csObject. More...

#define CS_GET_NAMED_CHILD_OBJECT(object, Interface, name)
 You can use this macro to get a child object with the given name and interface from a csObject. More...

#define CS_GET_FIRST_NAMED_CHILD_OBJECT(object, Interface, name)
 This is the same as CS_GET_CHILD_OBJECT, but stops at the first object with the given name, even if it does not implement the requested interface. More...


Typedefs

typedef uint32 CS_ID
 Used for uniquely generated id numbers XXX: remove this sometime. More...

typedef unsigned int csTicks
 Time in milli (1/1000) seconds XXX: should be moved to sysfunc.h. More...


Enumerations

enum  csVariantType {
  CSVAR_LONG, CSVAR_BOOL, CSVAR_CMD, CSVAR_FLOAT,
  CSVAR_STRING
}
 Types that can be contained within a variant. More...

enum  csDocumentNodeType {
  CS_NODE_DOCUMENT = 1, CS_NODE_ELEMENT, CS_NODE_COMMENT, CS_NODE_UNKNOWN,
  CS_NODE_TEXT, CS_NODE_DECLARATION
}
 Possible node types for iDocumentNode. More...


Define Documentation

#define CS_CHANGEABLE_NEVER   0
 

The document can not be changed, CreateRoot() is not supported.

Definition at line 61 of file document.h.

#define CS_CHANGEABLE_NEWROOT   1
 

The document only allows changes with a newly created root.

Definition at line 63 of file document.h.

#define CS_CHANGEABLE_YES   2
 

The document can be changed.

Definition at line 65 of file document.h.

#define CS_DBGHELP_BENCHMARK   2
 

supports Benchmark().

Definition at line 43 of file dbghelp.h.

#define CS_DBGHELP_GFXDUMP   8
 

supports graphical Dump().

Definition at line 51 of file dbghelp.h.

#define CS_DBGHELP_STATETEST   16
 

supports StateTest().

Definition at line 55 of file dbghelp.h.

#define CS_DBGHELP_TXTDUMP   4
 

supports non graphical Dump().

Definition at line 47 of file dbghelp.h.

#define CS_DBGHELP_UNITTEST   1
 

supports UnitTest().

Definition at line 39 of file dbghelp.h.

Referenced by csUtilDebugHelper::GetSupportedTests, and csGeomDebugHelper::GetSupportedTests.

#define CS_GET_CHILD_OBJECT object,
Interface   
 

Value:

csPtr<Interface> ((Interface*)(object)->GetChild(               \
  Interface##_scfGetID (), Interface##_VERSION))
You can use this macro to get a child object from a csObject.

The returned object will be IncRef'ed. This version requires a correctly set-up interface ID variable.

Definition at line 36 of file iutil/object.h.

Referenced by csDataObject::GetData.

#define CS_GET_FIRST_NAMED_CHILD_OBJECT object,
Interface,
name   
 

Value:

csPtr<Interface> ((Interface*)(object)->GetChild                        \
  (Interface##_scfGetID (), Interface##_VERSION, name, true))
This is the same as CS_GET_CHILD_OBJECT, but stops at the first object with the given name, even if it does not implement the requested interface.

Definition at line 52 of file iutil/object.h.

#define CS_GET_NAMED_CHILD_OBJECT object,
Interface,
name   
 

Value:

csPtr<Interface> ((Interface*)(object)->GetChild                        \
  (Interface##_scfGetID (), Interface##_VERSION, name))
You can use this macro to get a child object with the given name and interface from a csObject.

The returned object will be IncRef'ed.

Definition at line 44 of file iutil/object.h.


Typedef Documentation

typedef uint32 CS_ID
 

Used for uniquely generated id numbers XXX: remove this sometime.

Definition at line 115 of file cstypes.h.

typedef unsigned int csTicks
 

Time in milli (1/1000) seconds XXX: should be moved to sysfunc.h.

Definition at line 118 of file cstypes.h.

Referenced by csAnimationTemplate::AddFrame, csSimplePixmap::Advance, csUtilDebugHelper::Benchmark, csGeomDebugHelper::Benchmark, csVirtualClock::GetCurrentTicks, csVirtualClock::GetElapsedTicks, csEngine::GetLastAnimationTime, csAnimationTemplate::GetLength, and csVirtualClock::Resume.

typedef short int16
 

signed 16-bit integer (-32 768..32 767).

Definition at line 65 of file cstypes.h.

Referenced by convert_endian.

typedef int int32
 

signed 32-bit integer (-2 147 483 648..2 147 483 647).

Definition at line 69 of file cstypes.h.

Referenced by convert_endian, float2long, and long2float.

typedef char int8
 

signed 8-bit integer (-128..127).

Definition at line 61 of file cstypes.h.

Referenced by iDataBuffer::GetInt8.

typedef unsigned int uint
 

Default unsigned int.

Definition at line 123 of file cstypes.h.

Referenced by csFlareHalo::FlareHalo::AddComponent.

typedef unsigned short uint16
 

unsigned 16-bit integer (0..65 535).

Definition at line 63 of file cstypes.h.

Referenced by big_endian_short, convert_endian, get_le_float16, get_le_short, little_endian_short, and set_le_short.

typedef unsigned int uint32
 

unsigned 32-bit integer (0..4 294 967 295).

Definition at line 67 of file cstypes.h.

Referenced by big_endian_long, convert_endian, csRGBpixel::csRGBpixel, csRGBpixel::eq, get_le_float32, get_le_long, csLight::Light::GetLightNumber, csShadowBlock::GetShadowRegion, csMeshWrapper::GetVisibilityNumber, csObjectWatcher::GetWatchNumber, little_endian_long, csShadowBlockList::MarkNewRegion, csBitSet::operator &=, csRGBpixel::operator==, csBitSet::operator|=, csShadowBlockList::RestoreRegion, csRGBpixel::Set, set_le_long, csMeshWrapper::SetVisibilityNumber, and csRGBpixel::UnsafeAdd.

typedef unsigned char uint8
 

unsigned 8-bit integer (0..255).

Definition at line 59 of file cstypes.h.

Referenced by csCopyUnpackRGBAtoRGBpixel, csDiscardPackedRGB, csDiscardPackedRGBA, csPackRGBcolorToRGB, csPackRGBpixelToRGB, csPackRGBpixelToRGBA, csUnpackRGBAtoRGBcolor, csUnpackRGBAtoRGBpixel, csUnpackRGBtoRGBcolor, csPixmap::Draw, csPixmap::DrawAlign, csPixmap::DrawScaledAlign, csPixmap::DrawTiled, csWindow::GetAlpha, csListBox::GetAlpha, csDialog::GetAlpha, csButton::GetAlpha, csDialog::GetOverlayAlpha, iDataBuffer::GetUint8, csClipper::LastClipResult, csComponent::Pixmap, csApp::pplTexture, and csApp::pplTiledPixmap.


Enumeration Type Documentation

enum csDocumentNodeType
 

Possible node types for iDocumentNode.

Enumeration values:
CS_NODE_DOCUMENT  Document.
CS_NODE_ELEMENT  Element.
CS_NODE_COMMENT  Comment.
CS_NODE_UNKNOWN  Unknown type.
CS_NODE_TEXT  Text.
CS_NODE_DECLARATION  Declaration.

Definition at line 41 of file document.h.

enum csVariantType
 

Types that can be contained within a variant.

Enumeration values:
CSVAR_LONG  long.
CSVAR_BOOL  bool.
CSVAR_CMD  a command.
CSVAR_FLOAT  float.
CSVAR_STRING  string.

Definition at line 30 of file config.h.


Function Documentation

float big_endian_float float    f [inline, static]
 

Convert a big-endian floating-point number to machine format.

Definition at line 81 of file csendian.h.

uint32 big_endian_long uint32    l [inline, static]
 

Convert a long from big-endian to machine format.

Definition at line 72 of file csendian.h.

References uint32.

uint64 big_endian_longlong uint64    l [inline, static]
 

Convert a longlong from big-endian to machine format.

Definition at line 54 of file csendian.h.

uint16 big_endian_short uint16    s [inline, static]
 

Convert a short from big-endian to machine format.

Definition at line 76 of file csendian.h.

References uint16.

float convert_endian float    f [inline, static]
 

Swap the bytes in a float value.

Definition at line 248 of file csendian.h.

References little_endian_float.

uint16 convert_endian uint16    s [inline, static]
 

Swap the bytes in a uint16 value.

Definition at line 244 of file csendian.h.

References little_endian_short, and uint16.

int16 convert_endian int16    s [inline, static]
 

Swap the bytes in a int16 value.

Definition at line 240 of file csendian.h.

References int16, and little_endian_short.

int32 convert_endian int32    l [inline, static]
 

Swap the bytes in a int32 value.

Definition at line 236 of file csendian.h.

References int32, and little_endian_long.

uint32 convert_endian uint32    l [inline, static]
 

Swap the bytes in a uint32 value.

Definition at line 232 of file csendian.h.

References little_endian_long, and uint32.

int64 convert_endian int64    l [inline, static]
 

Swap the bytes in a int64 value.

Definition at line 228 of file csendian.h.

References little_endian_long.

uint64 convert_endian uint64    l [inline, static]
 

Swap the bytes in a uint64 value.

Definition at line 224 of file csendian.h.

References little_endian_long.

int64 double2longlong double    d [inline, static]
 

Convert a double to a cross-platform 64-bit format (no endianess adjustments!).

Definition at line 174 of file csendian.h.

int32 float2long float    f [inline, static]
 

Convert a float to a cross-platform 32-bit format (no endianess adjustments!).

Definition at line 153 of file csendian.h.

References int32, and QRound.

Referenced by set_le_float32.

short float2short float    f [inline, static]
 

Convert a float to a cross-platform 16-bit format (no endianess adjustments!).

This is useful for low-precision data. They use the 1.4.12 format. The range of numbers that can be represented in this format is from 2^-8 to 2^7. The precision for numbers near to 2^-8 (0.00390625) is near 0.000001, for numbers near 2^7 (128) is near 0.03.

Definition at line 203 of file csendian.h.

References QRound.

Referenced by set_le_float16.

float get_le_float16 void *    buff [inline]
 

Read a little-endian 16-bit float from address.

Definition at line 278 of file csendian.h.

References get_le_short, short2float, and uint16.

float get_le_float32 void *    buff [inline]
 

Read a little-endian 32-bit float from address.

Definition at line 274 of file csendian.h.

References get_le_long, long2float, and uint32.

uint32 get_le_long void *    buff [inline]
 

Read a little-endian long from address.

Definition at line 263 of file csendian.h.

References little_endian_long, and uint32.

Referenced by get_le_float32.

uint16 get_le_short void *    buff [inline]
 

Read a little-endian short from address.

Definition at line 252 of file csendian.h.

References little_endian_short, and uint16.

Referenced by get_le_float16.

float little_endian_float float    f [inline, static]
 

Convert a little-endian floating-point number to machine format.

Definition at line 125 of file csendian.h.

Referenced by convert_endian.

uint32 little_endian_long uint32    l [inline, static]
 

Convert a long from little-endian to machine format.

Definition at line 117 of file csendian.h.

References uint32.

Referenced by convert_endian, get_le_long, and set_le_long.

uint64 little_endian_longlong uint64    l [inline, static]
 

Convert a longlong from little-endian to machine format.

Definition at line 100 of file csendian.h.

uint16 little_endian_short uint16    s [inline, static]
 

Convert a short from little-endian to machine format.

Definition at line 121 of file csendian.h.

References uint16.

Referenced by convert_endian, get_le_short, and set_le_short.

float long2float int32    l [inline, static]
 

Convert a 32-bit cross-platform float to native format (no endianess adjustments!).

Definition at line 164 of file csendian.h.

References int32.

Referenced by get_le_float32.

double longlong2double int64    i [inline, static]
 

Convert a 64-bit cross-platform double to native format (no endianess adjustments!).

Definition at line 185 of file csendian.h.

void set_le_float16 void *    buff,
float    f
[inline]
 

Set a little-endian 16-bit float on a address.

Definition at line 308 of file csendian.h.

References float2short, and set_le_short.

void set_le_float32 void *    buff,
float    f
[inline]
 

Set a little-endian 32-bit float on a address.

Definition at line 304 of file csendian.h.

References float2long, and set_le_long.

void set_le_long void *    buff,
uint32    l
[inline]
 

Set a little-endian long on a address.

Definition at line 293 of file csendian.h.

References little_endian_long, and uint32.

Referenced by set_le_float32.

void set_le_short void *    buff,
uint16    s
[inline]
 

Set a little-endian short on a address.

Definition at line 282 of file csendian.h.

References little_endian_short, and uint16.

Referenced by set_le_float16.

float short2float short    s [inline, static]
 

Convert a 16-bit cross-platform float to native format (no endianess adjustments!).

Definition at line 214 of file csendian.h.

Referenced by get_le_float16.


Generated for Crystal Space by doxygen 1.2.14