Class FPValue
See Also: List of ParamType2 Choices, Template Class Tab.
class FPValue
Description:
This class is available in release 4.0 and later only.
This class contains a single value used as part of the Function Publishing system. It's capable of holding any of the FnPub supported types. This value is used as a parameter and as a return value.
Data Members:
public:
ParamType2 type;
This data member identifies which type of value is stored in the union below.
The following union contains a single value, pointer to a single value, or a pointer to a single table (Tab<>) of values.
union
{
int i;
float f;
int* iptr;
float* fptr;
Point3* p;
TimeValue t;
TCHAR* s;
TSTR* tstr;
PBBitmap* bm;
Mtl* mtl;
Texmap* tex;
INode* n;
ReferenceTarget* r;
Matrix3* m;
AngAxis* aa;
Quat* q;
Ray* ray;
Point2* p2;
BitArray* bits;
ClassDesc* cd;
Mesh* msh;
Object* obj;
Control* ctrl;
Interval* intvl;
POINT* pt;
HWND hwnd;
IObject* iobj;
FPInterface* fpi;
void* ptr;
Color* clr;
FPValue* fpv;
Value* v;
// Tab<>s of above
Tab<int>* i_tab;
Tab<float>* f_tab;
Tab<Point3*>* p_tab;
Tab<TimeValue>* t_tab;
Tab<TCHAR*>* s_tab;
Tab<TSTR*>* tstr_tab;
Tab<PBBitmap*>* bm_tab;
Tab<Mtl*>* mtl_tab;
Tab<Texmap*>* tex_tab;
Tab<INode*>* n_tab;
Tab<ReferenceTarget*>* r_tab;
Tab<Matrix3*>* m3_tab;
Tab<AngAxis*>* aa_tab;
Tab<Quat*>* q_tab;
Tab<Ray*>* ray_tab;
Tab<Point2*>* p2_tab;
Tab<BitArray*>* bits_tab;
Tab<ClassDesc*>* cd_tab;
Tab<Mesh*>* msh_tab;
Tab<Object*>* obj_tab;
Tab<Control*>* ctrl_tab;
Tab<Interval*>* intvl_tab;
Tab<POINT*>* pt_tab;
Tab<HWND>* hwnd_tab;
Tab<IObject*>* iobj_tab;
Tab<FPInterface*>* fpi_tab;
Tab<void*>* ptr_tab;
Tab<Color*>* clr_tab;
Tab<FPValue*>* fpv_tab;
Tab<Value*>* v_tab;
};
Methods:
public:
Prototype:
FPValue();
Remarks:
Constructor
Default Implementation:
{ Init(); }
Prototype:
FPValue(FPValue& from);
Remarks:
Constructor.
Parameters:
FPValue& from
A reference to a FPValue to copy from.
Default Implementation:
{ Init(); *this = from; }
Prototype:
FPValue(int type, ...);
Remarks:
Constructor
Default Implementation:
{va_list ap; va_start(ap, type); ap = Loadva(type, ap); va_end(ap);}
Prototype:
~FPValue();
Remarks:
Destructor.
Default Implementation:
{ Free(); }
Prototype:
void Free();
Remarks:
This method will free up all memory used by the class.
Prototype:
void Init();
Remarks:
This method will Initialize FPValue class.
Default Implementation:
{ type = (ParamType2)TYPE_INT; s = NULL; }
Prototype:
FPValue& operator=(FPValue& sv);
Remarks:
Assignment operator.
Prototype:
inline void Load(int type, ...);
Remarks:
This method will load the FPValue class with the provided data.
Parameters:
int type
The FPValue parameter type to load.
...
This method takes a variable number of arguments.
Default Implementation:
{va_list ap; va_start(ap, type); ap = Loadva(type, ap); va_end(ap);}
Prototype:
inline void LoadPtr(int type, ...);
Remarks:
This method will load the FPValue class with the provided data.
Parameters:
int type
The FPValue parameter type to load.
...
This method takes a variable number of arguments.
Return Value:
{ va_list ap; va_start(ap, type);
ap = Loadva(type, ap, true); va_end(ap); }