MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes
MFM::Parameters< PARM > Class Template Reference

Public Member Functions

u32 GetParameterCount () const
 
s32 GetParameterNumber (const PARM *ap) const
 
s32 GetParameterNumberFromTag (const char *tag) const
 
const PARM * GetFirstParameter () const
 
const PARM * GetParameter (u32 index) const
 
PARM * GetParameter (u32 index)
 
void AddParameter (PARM *np)
 

Protected Attributes

PARM * m_firstParameter
 

Member Function Documentation

template<class PARM>
void MFM::Parameters< PARM >::AddParameter ( PARM *  np)
inline

Places a Parameter inside this Parameters collection, making it available for any method which gets a Parameter.

Parameters
npA Pointer to the Parameter wished to add to this Parameters collection. This method FAILs with NULL_POINTER if this argument is null, and FAILs with ILLEGAL_ARGUMENT if this Parameter has its m_next field set already. It also FAILs with DUPLICATE_ENTRY if this Parameter is already held in this Parameters collection.
template<class PARM>
const PARM* MFM::Parameters< PARM >::GetFirstParameter ( ) const
inline

Gets the first Parameter in this Parameters collection, if there is one.

Returns
A Pointer to the first Parameter in this Parameters collection, or NULL if there are none
template<class PARM>
const PARM* MFM::Parameters< PARM >::GetParameter ( u32  index) const
inline

Gets the Parameter at a specified index in this Parameters collection.

Parameters
indexThe index of the Parameter to get from this Parameters collection. If this number is not less than the number of Parameters held by this Parameters collection, this method FAILs with ARRAY_INDEX_OUT_OF_BOUNDS .
Returns
A Pointer to the Parameter held at the specified index in this Parameters collection.
template<class PARM>
PARM* MFM::Parameters< PARM >::GetParameter ( u32  index)
inline

Gets a mutable version of the Parameter at a specified index in this Parameters collection.

Parameters
indexThe index of the Parameter to get from this Parameters collection. If this number is greater than the number of Parameters held by this Parameters collection, this method FAILs with ARRAY_INDEX_OUT_OF_BOUNDS .
Returns
A Pointer to the Parameter held at the specified index in this Parameters collection.
template<class PARM>
u32 MFM::Parameters< PARM >::GetParameterCount ( ) const
inline

Gets the number of Parameters held by this Parameters collection. Since this collection is a linked list, this runs in O(n) time where n is the number of Parameters held.

Returns
The number of Parameters held by this Parameters collection.
template<class PARM>
s32 MFM::Parameters< PARM >::GetParameterNumber ( const PARM *  ap) const
inline

Gets the index of a specified Parameter inside this Parameters collection.

Parameters
apThe Parameter to search this Parameters collection for. This method FAILs with NULL_POINTER if this argument is NULL .
Returns
The 0-based index of ap inside this Parameters collection, or -1 if it is not found.
template<class PARM>
s32 MFM::Parameters< PARM >::GetParameterNumberFromTag ( const char *  tag) const
inline

Gets the index of a Parameter held by this Parameters collection by specifying its Parameter Tag.

Parameters
tagThe Tag of the Parameter to look up. This method FAILs with NULL_POINTER if this argument is NULL .
Returns
The 0-based index of the Parameter whose tag is tag , or -1 if there is no such Parameter .

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