DSOL Namespace Reference

the master namespace of the library. every class, function and variable will be in this namespace. More...


Namespaces

namespace  Input
 contains all the classes and functions about user input.
namespace  Sprites
 contains all the classes and functions dealing with Sprites.

Classes

class  BooleanArray
 a class for creating a static(with a fixed length) boolean array. More...
class  LiteVector
 a 'lite' version of the std::Vector class. More...

Functions

template<typename T >
T * allocMem (const T value=T(), const uint length=1)
 a template function to allocate memory.
template<typename T >
T * allocMemNoError (const T value=T(), const uint length=1)
 a template function to allocate memory.
template<typename T >
T * allocRawMem (const uint length=1)
 a template function to allocate raw memory.
template<typename T >
T * allocRawMemNoError (const uint length=1)
 a template function to allocate raw memory.
template<typename T >
void deallocMem (T *&oldMemPointer, const uint oldLength=1)
 a template function to deallocate memory.
template<typename T >
void deallocMemNoError (T *&oldMemPointer, const uint oldLength)
 a template function to deallocate memory.
template<typename T >
void deallocRawMem (T *&oldMemPointer)
 a template function to deallocate raw memory.
template<typename T >
void deallocRawMemNoError (T *&oldMemPointer)
 a template function to deallocate raw memory.
static u8 * getHeapEnd ()
 returns a pointer to the end of the heap.
static u8 * getHeapLimit ()
 returns a pointer to the limit of the heap.
static u8 * getHeapStart ()
 returns a pointer to the start of the heap.
static int getMemFree ()
 returns the amount of memory free.
static int getMemUsed ()
 returns the amount of memory used.
void init2d ()
 an init function for 2d mode.
static const bool randBool ()
 returns a random boolean value.
static const int randInt (const int min, const int max)
 returns a random number between min and max.
template<typename T >
T * reallocMem (T *oldMemPointer, const uint oldLength, const uint length=1, const T value=T())
 a template function to reallocate memory.
template<typename T >
T * reallocMemNoError (T *oldMemPointer, const uint oldLength, const T value=T(), const uint length=1)
 a template function to reallocate memory.
template<typename T >
T * reallocRawMem (T *oldMemPointer, const uint length=1)
 a template function to reallocate raw memory.
template<typename T >
T * reallocRawMemNoError (T *oldMemPointer, const uint length=1)
 a template function to reallocate raw memory.
static void seedRandDefault ()
 sets the rand seed using the current time.
void sleep (uint vblanks)
 a function to wait a certain amount of time.
void sleepForever ()
 puts the DS into a powersaving endless loop.
void waitForVBlank ()
 a vblank function that updates everything.

Variables

static const int DMA_PRIORITY = 3
 a constant value for specifying the dma priority
static const uint RECONSTRUCT = 0
 a constant for specifying to call the 'reconstruct' constructor, instead of the copy constructor. look at one of the 'reconstruct' constructors for more information, like SimpleVectors 'reconstruct' constructor (they are useally private, and thus not in the document).


Detailed Description

the master namespace of the library. every class, function and variable will be in this namespace.


Function Documentation

template<typename T >
T* DSOL::allocMem ( const T  value = T(),
const uint  length = 1 
) [inline]

a template function to allocate memory.

this function will allocate memory for the type and number specified and calls the copy constructor using the specified value. it will check whether NULL was returned and display an error with sassert() if it does.

Parameters:
value the object that should be used when calling the copy constructor, default is the default constructor.
length how many memory it should allocate (how long the buffer should be), default is 1.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory.

template<typename T >
T* DSOL::allocMemNoError ( const T  value = T(),
const uint  length = 1 
) [inline]

a template function to allocate memory.

this function will allocate memory for the type and number specified and calls the copy constructor using the specified value. however it won't check whether NULL was returned or not.

Parameters:
value the object that should be used when calling the copy constructor, default is the default constructor.
length how many memory it should allocate (how long the buffer should be), default is 1.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory.

template<typename T >
T* DSOL::allocRawMem ( const uint  length = 1  )  [inline]

a template function to allocate raw memory.

this function will allocate memory for the type and number specified, but it wont call constructors. it will check whether NULL was returned and display an error with sassert() if it does.

Parameters:
length how many memory it should allocate (how long the buffer should be), default is 1.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory (will sassert() in debug mode).

template<typename T >
T* DSOL::allocRawMemNoError ( const uint  length = 1  )  [inline]

a template function to allocate raw memory.

this function will allocate memory for the type and number specified, but it wont call constructors of check whether NULL was returned.

Parameters:
length how many memory it should allocate (how long the buffer should be), default is 1.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory.

template<typename T >
void DSOL::deallocMem ( T *&  oldMemPointer,
const uint  oldLength = 1 
) [inline]

a template function to deallocate memory.

this function will deallocate memory, set the pointer to NULL and call the destructors. it will check whether oldMemPointer is NULL and and display an error with sassert() if it is.

Parameters:
oldMemPointer a referrence to a pointer to the previously allocated memory.
oldLength the length of the previously allocated memory, needed to correctly call destructors.

template<typename T >
void DSOL::deallocMemNoError ( T *&  oldMemPointer,
const uint  oldLength 
) [inline]

a template function to deallocate memory.

this function will deallocate memory, set the pointer to NULL and call the destructors.

Parameters:
oldMemPointer a referrence to a pointer to the previously allocated memory.
oldLength the length of the previously allocated memory, needed to correctly call destructors.

template<typename T >
void DSOL::deallocRawMem ( T *&  oldMemPointer  )  [inline]

a template function to deallocate raw memory.

this function will deallocate memory and set the pointer to NULL, but it wont call destructors. it will check whether oldMemPointer is NULL and and display an error with sassert() if it is.

Parameters:
oldMemPointer a referrence to a pointer to the previously allocated memory.

template<typename T >
void DSOL::deallocRawMemNoError ( T *&  oldMemPointer  )  [inline]

a template function to deallocate raw memory.

this function will deallocate memory and set the pointer to NULL, but it wont call destructors.

Parameters:
oldMemPointer a referrence to a pointer to the previously allocated memory.

static u8* DSOL::getHeapEnd (  )  [inline, static]

returns a pointer to the end of the heap.

static u8* DSOL::getHeapLimit (  )  [inline, static]

returns a pointer to the limit of the heap.

static u8* DSOL::getHeapStart (  )  [inline, static]

returns a pointer to the start of the heap.

static int DSOL::getMemFree (  )  [inline, static]

returns the amount of memory free.

static int DSOL::getMemUsed (  )  [inline, static]

returns the amount of memory used.

void DSOL::init2d (  ) 

an init function for 2d mode.

static const bool DSOL::randBool (  )  [inline, static]

returns a random boolean value.

Returns:
randomly true or false.

static const int DSOL::randInt ( const int  min,
const int  max 
) [inline, static]

returns a random number between min and max.

Parameters:
min the lower bound of the random number, inclusive.
max the upper bound of the random number, inclusive.
Returns:
a random number between min and max.

template<typename T >
T* DSOL::reallocMem ( T *  oldMemPointer,
const uint  oldLength,
const uint  length = 1,
const T  value = T() 
) [inline]

a template function to reallocate memory.

this function will reallocate memory for the type and number specified and it will call constructors/destructors. it will check if oldMemPointer is NULL and whether NULL was returned and display an error with sassert() if it does.

Parameters:
oldMemPointer a pointer to the previously allocated memory.
oldLength the length of the previously allocated memory, needed to correctly call constructors/destructors.
length how many memory it should reallocate (how long the buffer should be), default is 1.
value the object that should be used when calling the copy constructor, default is the default constructor.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory.

template<typename T >
T* DSOL::reallocMemNoError ( T *  oldMemPointer,
const uint  oldLength,
const T  value = T(),
const uint  length = 1 
) [inline]

a template function to reallocate memory.

this function will reallocate memory for the type and number specified and it will call constructors/destructors. however it won't check whether NULL was returned or not.

Parameters:
oldMemPointer a pointer to the previously allocated memory.
oldLength the length of the previously allocated memory, needed to correctly call constructors/destructors.
length how many memory it should reallocate (how long the buffer should be), default is 1.
value the object that should be used when calling the copy constructor, default is the default constructor.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory.

template<typename T >
T* DSOL::reallocRawMem ( T *  oldMemPointer,
const uint  length = 1 
) [inline]

a template function to reallocate raw memory.

this function will reallocate memory for the type and number specified, but it wont call constructors/destructors. it will check if oldMemPointer is NULL and whether NULL was returned and display an error with sassert() if it does.

Parameters:
oldMemPointer a pointer to the previously allocated memory.
length how many memory it should reallocate (how long the buffer should be), default is 1.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory (will sassert() in debug mode).

template<typename T >
T* DSOL::reallocRawMemNoError ( T *  oldMemPointer,
const uint  length = 1 
) [inline]

a template function to reallocate raw memory.

this function will reallocate memory for the type and number specified, but it wont call constructors/destructors of check whether NULL was returned.

Parameters:
oldMemPointer a pointer to the previously allocated memory.
length how many memory it should reallocate (how long the buffer should be), default is 1.
Returns:
a pointer to the allocated memory, or NULL if it failed to allocate the memory.

static void DSOL::seedRandDefault (  )  [inline, static]

sets the rand seed using the current time.

void DSOL::sleep ( uint  vblanks  ) 

a function to wait a certain amount of time.

this function will wait at least 2 vblanks before continuing.

Parameters:
vblanks the number of vblanks to wait. note that there are about 60 vblanks in a second.

void DSOL::sleepForever (  ) 

puts the DS into a powersaving endless loop.

void DSOL::waitForVBlank (  ) 

a vblank function that updates everything.


Variable Documentation

const int DSOL::DMA_PRIORITY = 3 [static]

a constant value for specifying the dma priority

const uint DSOL::RECONSTRUCT = 0 [static]

a constant for specifying to call the 'reconstruct' constructor, instead of the copy constructor. look at one of the 'reconstruct' constructors for more information, like SimpleVectors 'reconstruct' constructor (they are useally private, and thus not in the document).


Generated on Thu Sep 10 19:09:47 2009 for DSOL by  doxygen 1.5.8