Game Development Reference
In-Depth Information
virtual int64 GetInt64(
const char* pParamName) const = 0;
virtual float GetFloat(
const char* pParamName) const = 0;
virtual double GetDouble(
const char* pParamName) const = 0;
virtual const char* GetText(
const char* pParamName) const = 0;
virtual Handle GetHandle(
const char* pParamName) const = 0;
virtual Int8Array GetInt8Array(
const char* pParamName) const = 0;
virtual Int16Array GetInt16Array(
const char* pParamName) const = 0;
virtual Int32Array GetInt32Array(
const char* pParamName) const = 0;
virtual Int64Array GetInt64Array(
const char* pParamName) const = 0;
virtual FloatArray GetFloatArray(
const char* pParamName) const = 0;
virtual DoubleArray GetDoubleArray(
const char* pParamName) const = 0;
virtual TextArray GetTextArray(
const char* pParamName) const = 0;
virtual HandleArray GetHandleArray(
const char* pParamName) const = 0;
// delete all parameter values
virtual void Clear() = 0;
// get the number of parameters this list holds
virtual size_t GetCount() const = 0;
// get the data type of parameter at given index
virtual IParameter::EDataType GetDataType(
size_t aIndex) const = 0;
// get the direction of parameter at given index
virtual IParameter::EDirection GetDirection(
size_t aIndex) const = 0;
// get the data type of parameter at given index
virtual const char* GetName(size_t aIndex) const = 0;
// is this parameter an array at given index?
virtual bool IsArray(size_t aIndex) const = 0;
};
To avoid memory fragmentation due to frequent command calls, you would ideally manage the parameter values
through a memory pool. The actual command is a callback function receiving a parameter values set, and is declared
as shown in Listing 11-12.
 
Search WWH ::




Custom Search