Public Member Functions | Public Attributes

ParamBlock2PLCB Class Reference

This reference page is linked to from the following overview topics: Loading Old Parameter Data using IParamBlock2.


Search for all occurrences

Detailed Description

See also:
Class PostLoadCallback, Class ILoad.

Description:
This is a post load call back for fixing up parameter block2s. This callback handles conversion of pre-ParamBlock2 versions of an object to a ParamBlock2 version. NOTE: this thing deletes itself when it's done.
Data Members:
All data members are public.

ParamVersionDesc* versions;

This is an array of ParamVersionDesc2s.

int count;

This is the number in the array specified above.

ParamBlockDesc2* curdesc;

This is a pointer to the current version of the description.

ReferenceTarget* targ;

This is a pointer to a reference target. This is usually the this pointer of the object.

int pbRefNum;

This is the reference index of the parameter block.

#include <iparamb2.h>

Inheritance diagram for ParamBlock2PLCB:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  ParamBlock2PLCB (ParamVersionDesc *v, int cnt, ParamBlockDesc2 *pd, ReferenceTarget *t, int refNum)
PB2Export void  proc (ILoad *iload)
int  Priority ()
PB2Export INT_PTR  Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)

Public Attributes

ParamVersionDesc versions
int  count
ParamBlockDesc2 curdesc
ReferenceTarget targ
int  pbRefNum

Constructor & Destructor Documentation

ParamBlock2PLCB ( ParamVersionDesc v,
int  cnt,
ParamBlockDesc2 pd,
ReferenceTarget t,
int  refNum 
) [inline]
Remarks:
Constructor. The data members are initialized to the values passed.
    { 
        versions = v; count = cnt; curdesc = pd; targ = t; pbRefNum = refNum;
    }

Member Function Documentation

PB2Export void proc ( ILoad iload ) [virtual]
Remarks:
This methods handles the conversion of edition 1 ParamBlocks to the new ParamBlock2s.
Parameters:
ILoad *iload

An interface for loading files.

Implements PostLoadCallback.

int Priority ( ) [inline, virtual]
Remarks:
This method determines the order that the various registered callbacks execute. This method is overridden, for example, by the ParmBlock2 PostLoadCallbacks to return 1 so it can execute before the others.
Returns:
The allowable return values are 0 to 10, with 5 being the default. 0 is reserved for ParamBlock2PLCB and ParamBlockPLCB..
Default Implementation:
{ return 5; }
Note:
Custom Attributes are added to their owner objects in a Priority 6 PostLoadCall. Object Custom Attributes and object MetaData should be expected only in PostLoadCalls with a Priority of 7 or lower. Custom Attributes added in PostLoadCalls with a higher Priority may be replaced by the Priority 6 PostLoadCall.

Reimplemented from PostLoadCallback.

{ return 0; }
PB2Export INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
) [virtual]
Remarks:
This is a general purpose function that allows the API to be extended in the future. The 3ds Max development team can assign new cmd numbers and continue to add functionality to this class without having to 'break' the API.

This is reserved for future use.
Parameters:
cmd The command to execute.
arg1 Optional argument 1 (defined uniquely for each cmd).
arg2 Optional argument 2.
arg3 Optional argument 3.
Returns:
An integer return value (defined uniquely for each cmd).
Default Implementation:
{ return 0; }

Reimplemented from PostLoadCallback.


Member Data Documentation

int count

ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB
ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB ParamBlock2PLCB