LockedArray< T > Class Template Reference

#include <lockedarray.h>

List of all members.


Detailed Description

template<class T>
class LockedArray< T >

A _very_ basic array class that allows simple iteration and jumps, keeping its currently selected entry and providing a mechanism to lock this position.

Anyone can unlock it though, so its your job to use it the right way ;)

Definition at line 35 of file lockedarray.h.


Public Member Functions

 LockedArray (unsigned int size)
 ~LockedArray ()
void lock ()
void unlock ()
bool isLocked () const
getEntry () const
void setEntry (T entry)
void next ()
void prev ()
void select (unsigned int pos)
unsigned int getPos () const
unsigned int getSize () const
void clear ()
 Clears the array without changing size or data type.

Protected Attributes

unsigned int mSize
T * mData
unsigned int mCurEntry
bool mLocked
bool mFilled

Constructor & Destructor Documentation

template<class T>
LockedArray< T >::LockedArray ( unsigned int  size  )  [inline]

Definition at line 73 of file lockedarray.h.

template<class T>
LockedArray< T >::~LockedArray (  )  [inline]

Definition at line 81 of file lockedarray.h.


Member Function Documentation

template<class T>
void LockedArray< T >::lock (  )  [inline]

Definition at line 41 of file lockedarray.h.

template<class T>
void LockedArray< T >::unlock (  )  [inline]

Definition at line 42 of file lockedarray.h.

template<class T>
bool LockedArray< T >::isLocked (  )  const [inline]

Definition at line 44 of file lockedarray.h.

template<class T>
T LockedArray< T >::getEntry (  )  const [inline]

Definition at line 46 of file lockedarray.h.

template<class T>
void LockedArray< T >::setEntry ( entry  )  [inline]

Definition at line 47 of file lockedarray.h.

template<class T>
void LockedArray< T >::next (  )  [inline]

Definition at line 87 of file lockedarray.h.

template<class T>
void LockedArray< T >::prev (  )  [inline]

Definition at line 97 of file lockedarray.h.

template<class T>
void LockedArray< T >::select ( unsigned int  pos  )  [inline]

Definition at line 106 of file lockedarray.h.

template<class T>
unsigned int LockedArray< T >::getPos (  )  const [inline]

Definition at line 52 of file lockedarray.h.

template<class T>
unsigned int LockedArray< T >::getSize (  )  const [inline]

Definition at line 54 of file lockedarray.h.

template<class T>
void LockedArray< T >::clear (  )  [inline]

Clears the array without changing size or data type.

Definition at line 117 of file lockedarray.h.


Member Data Documentation

template<class T>
unsigned int LockedArray< T >::mSize [protected]

Definition at line 62 of file lockedarray.h.

template<class T>
T* LockedArray< T >::mData [protected]

Definition at line 64 of file lockedarray.h.

template<class T>
unsigned int LockedArray< T >::mCurEntry [protected]

Definition at line 66 of file lockedarray.h.

template<class T>
bool LockedArray< T >::mLocked [protected]

Definition at line 67 of file lockedarray.h.

template<class T>
bool LockedArray< T >::mFilled [protected]

Definition at line 69 of file lockedarray.h.


The documentation for this class was generated from the following file:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5