FUtils/FUParameter.h File Reference

This file contains the FUParameter interface and its many sub-interfaces. More...

Go to the source code of this file.

Namespaces

namespace  FUParameterQualifiers

Classes

class  FUParameterT< TYPE >
 An interface to a generic FCollada parameter. More...

Defines

#define DeclareParameter(type, qual, parameterName, niceName)
 Declares a parameter for the objects of the current class.
#define DeclareParameterPtr(type, parameterName, niceName)   FUTrackedPtr<type> parameterName;
 See above.
#define DeclareParameterRef(type, parameterName, niceName)   FUObjectRef<type> parameterName;
 See above.
#define DeclareParameterList(list_type, parameterName, niceName)   FUParameter##list_type##List parameterName;
 See above.
#define DeclareParameterTrackList(type, parameterName, niceName)   FUTrackedList<type> parameterName;
 See above.
#define DeclareParameterContainer(type, parameterName, niceName)   FUObjectContainer<type> parameterName;
 See above.
#define ImplementParameterObject(objectClassName, parameterClassName, parameterName,)
 Generates the code necessary for a parameter.
#define ImplementParameterObjectNoArg(objectClassName, parameterClassName, parameterName)
 See above.
#define ImplementParameterObjectNoCtr(objectClassName, parameterClassName, parameterName)
 See above.
#define ImplementParameterObjectT(objectClassName, parameterClassName, parameterName,)
 See above.
#define ImplementParameterObjectNoArgT(objectClassName, parameterClassName, parameterName)
 See above.
#define ImplementParameterObjectNoCtrT(objectClassName, parameterClassName, parameterName)
 See above.
#define InitializeParameterNoArg(parameterName)   parameterName()
 Initializes the member variable for a parameter.
#define InitializeParameter(parameterName,)   parameterName(__VA_ARGS__)
 See above.

Typedefs

typedef FUParameterT< bool > FUParameterBoolean
 A simple Boolean value parameter.
typedef FUParameterT< float > FUParameterFloat
 A simple floating-point value parameter.
typedef FUParameterT< FMVector2FUParameterVector2
 A 2D vector parameter.
typedef FUParameterT< FMVector3FUParameterVector3
 A 3D vector parameter.
typedef FUParameterT< FMVector3FUParameterColor3
 A 3D color parameter.
typedef FUParameterT< FMVector4FUParameterVector4
 A 4D vector parameter.
typedef FUParameterT< FMVector4FUParameterColor4
 A 4D color parameter.
typedef FUParameterT< FMMatrix44FUParameterMatrix44
 A matrix parameter.
typedef FUParameterT< int32 > FUParameterInt32
 An integer value parameter.
typedef FUParameterT< uint32 > FUParameterUInt32
 An unsigned integer or enumerated-type value parameter.
typedef FUParameterT< fm::stringFUParameterString
 A UTF8 string parameter.
typedef FUParameterT< fstringFUParameterFString
 A Unicode string parameter.
typedef fm::vector< float,
true > 
FUParameterFloatList
 A simple floating-point value list parameter.
typedef fm::vector< FMVector2,
true > 
FUParameterVector2List
 A 2D vector list parameter.
typedef fm::vector< FMVector3,
true > 
FUParameterVector3List
 A 3D vector list parameter.
typedef fm::vector< FMVector3,
true > 
FUParameterColor3List
 A 3D vector list parameter.
typedef fm::vector< FMVector4,
true > 
FUParameterVector4List
 A 4D vector list parameter.
typedef fm::vector< FMVector4,
true > 
FUParameterColor4List
 A 4D vector list parameter.
typedef fm::vector< FMMatrix44,
true > 
FUParameterMatrix44List
 A matrix list parameter.
typedef fm::vector< int32,
true > 
FUParameterInt32List
 An integer type list parameter.
typedef fm::vector< uint32,
true > 
FUParameterUInt32List
 An unsigned integer or enumerated-type list parameter.
typedef fm::vector< fm::string,
false > 
FUParameterStringList
 A UTF8 string list parameter.
typedef fm::vector< fstring,
false > 
FUParameterFStringList
 A Unicode string list parameter.

Enumerations

enum  FUParameterQualifiers::Qualifiers {
  FUParameterQualifiers::SIMPLE = 0,
  FUParameterQualifiers::VECTOR = 0,
  FUParameterQualifiers::COLOR = 1
}
 Qualifiers for parameters types. More...


Detailed Description

This file contains the FUParameter interface and its many sub-interfaces.


Define Documentation

#define DeclareParameter type,
qual,
parameterName,
niceName   ) 
 

Value:

class Parameter_##parameterName : public FUParameterT<type> { \
    public: Parameter_##parameterName() : FUParameterT<type>() {} \
    Parameter_##parameterName(const type& defaultValue) : FUParameterT<type>(defaultValue) {} \
    virtual ~Parameter_##parameterName() {} \
    inline Parameter_##parameterName& operator= (const type& copy) { FUParameterT<type>::operator=(copy); return *this; } \
    } parameterName;
Declares a parameter for the objects of the current class.

Use this macro within a class declaration to add a parameter to it. The different versions of this macro are used for different parameter types:

For floats, Booleans, vectors and strings, use DeclareParameter. For arrays of floats, Booleans, vectors and strings, use DeclareParameterList. For tracked pointers, use DeclareParameterPtr. For contained pointers, use DeclareParameterRef. For tracked lists of objects, use DeclareParameterTrackList. For containers of objects, use DeclareParameterContainer.

Parameters:
type The value type of the parameter. Ex: float, bool, FMVector4 or string.
qual The qualifier for the parameter type.
See also:
FUParameterQualifiers::Qualifiers.
Parameters:
parameterName The member variable name for the parameter.
niceName The Unicode string to identify this parameter to users.

#define ImplementParameterObject objectClassName,
parameterClassName,
parameterName   ) 
 

Generates the code necessary for a parameter.

These macros should only be used for non-primitive parameter types. Multi-dimensional vectors, matrices and strings are considered primitive types. The different versions of this macro are used for different contexts:

For a parameter which requires a custom constructor, use ImplementParameterObject. For a parameter which has a default constructor, use ImplementParameterObjectNoArg. For a parameter which should never build itself, use ImplementParameterObjectNoCtr. When the parameter belongs to a template class, use ImplementParameterObjectT, ImplementParameterObjectNoArgT and ImplementParameterObjectNoCtrT.

Parameters:
objectClassName The name of the class holding the parameter.
parameterClassName The name of the non-primitive parameter type. IMPORTANT: This class must be based on top of FUObject, FUTrackable or FUParameterizable.
parameterName The member variable name of the parameter.

#define InitializeParameterNoArg parameterName   )     parameterName()
 

Initializes the member variable for a parameter.

Either one of these macros must be included for each member parameter of a class, within that class' constructors. The different versions of this macro are used for different contexts:

For a parameter where the default constructor is to be used, use InitializeParameterNoArg. For a parameter where one or more values should be used in the constructor, use InitializeParameter.

Parameters:
parameterName The member variable name of the parameter within the class.


Generated on Thu Feb 14 16:58:36 2008 for FCollada by  doxygen 1.4.6-NO