#include <ifnpub.h>
Class Description
- See also:
- Class FPInterface, Class
ClassDesc, Class Interface_ID, Class FPEnum, Class FPFunctionDef, Class FPPropDef, Class
ActionTable, Template Class Tab, Function Publishing
System.
- Description:
- This is the Function Publishing interface descriptor. This is
usually a static instance of the implementation interface. The
constructor for this class uses the same var-args technique used by
the ParamBlockDesc2 constructor,
enabling descriptive information for all the functions in the
interface to be supplied in one constructor call.
The FPInterfaceDesc class, an
FPInterface that
contains the metadata for an interface, is a distinguished
singleton instance per interface kept in a Tab<>
in
ClassDesc. This class is subclassed typically by static and
core interfaces and instantiated by mixins to provide their
metadata.
Note the following typedef: typedef FPInterfaceDesc FPStaticInterface
- Data Members:
- Interface_ID ID;
The unique ID of the interface.
MSTR internal_name;
The fixed internal name for the interface.
StringResID description;
The description string resource ID.
ClassDesc* cd;
Points to the publishing plug-in's
ClassDesc.
USHORT flags;
The flag bits. One or more of the following values:
FP_ACTIONS
Marks this as an Action Interface, holding only UI modal, zero
parameter action functions.
FP_MIXIN
Marks this as a Mixin Interface, it is implemented directly by
the plug-in class, so the methods in it are virtual on the plugin's
objects.
FP_CORE
Marks this as a 3ds Max Core Interface, available through
GetCOREInterface(Interface_ID).
FP_STATIC_METHODS
This interface is used as a static method interface in MAXScript,
properties are not directly callable
FP_SCRIPTED_CLASS
Internal use only: Belongs to a scripted plug-in class.
FP_TEMPORARY
Internal use only: Temporary descriptor built during scene
load.
Tab<FPFunctionDef*>
functions;
A table of descriptors for individual functions in this
interface.
Tab<FPPropDef*>
props;
A Table of descriptors for individual properties in this
interface.
Tab<FPEnum*>
enumerations;
A table of any symbolic enums for the interface. This is a
Tab<> of pointers to
FPEnum class
instances which themselves contain a Tab<>
of name, code pairs.
The following data members are for scripted plug-ins if this
interface belongs to a scripted plug-in class.
MSPluginClass* pc;
The scripted class if non-NULL (gc-protected by the scripted plugin
class).
Rollout* rollout;
The rollout if specified (gc-protected by the scripted plugin
class).
ActionTable* action_table;
The table published for this action interface.
For more information, see Class
ActionTable.
Public Member Functions
|
CoreExport |
FPInterfaceDesc
() |
CoreExport |
FPInterfaceDesc
(Interface_ID
id, const MCHAR *int_name, StringResID
descr, ClassDesc
*cd,
ULONG flag,...) |
CoreExport |
~FPInterfaceDesc
() |
virtual
void |
Init
() |
LifetimeType |
LifetimeControl
() |
virtual
BaseInterface
* |
GetInterface
(Interface_ID
id) |
CoreExport
void |
LoadDescriptor
(Interface_ID
id, const MCHAR *int_name, StringResID
descr, ClassDesc
*cd,
ULONG flag,...) |
CoreExport
void |
AppendFunction
(int id,...) |
|
Add a new function to this interface
descriptor.
|
CoreExport
void |
AppendProperty
(int id,...) |
|
Add a new property to this interface
descriptor.
|
CoreExport
void |
AppendEnum
(int id,...) |
|
Add a new enum to this interface descriptor.
|
CoreExport
void |
SetClassDesc
(ClassDesc
*i_cd) |
CoreExport
va_list |
check_fn
(va_list ap, int id) |
CoreExport
va_list |
scan_fn
(va_list ap, int id, int index) |
CoreExport
va_list |
check_prop
(va_list ap, int id) |
CoreExport
va_list |
scan_prop
(va_list ap, int id, int index) |
CoreExport
va_list |
check_enum
(va_list ap, EnumID
id) |
CoreExport
va_list |
scan_enum
(va_list ap, EnumID id,
int index) |
FPInterfaceDesc
* |
GetDesc
() |
Interface_ID |
GetID
() |
CoreExport
FPFunctionDef
* |
GetFnDef
(FunctionID
fid) |
ActionTable * |
GetActionTable
() |
CoreExport
void |
EnableActions
(BOOL onOff) |
virtual
CoreExport HINSTANCE |
HInstance
() |
virtual
CoreExport const MCHAR * |
GetRsrcString
(StringResID
id) |
Public Attributes
|
Interface_ID |
ID |
MSTR |
internal_name |
StringResID |
description |
ClassDesc * |
cd |
USHORT |
flags |
Tab< FPFunctionDef * > |
functions |
Tab< FPPropDef * > |
props |
Tab< FPEnum * > |
enumerations |
MSPluginClass
* |
pc |
Rollout
* |
rollout |
ActionTable * |
action_table |
Protected Member Functions
|
CoreExport
void |
load_descriptor
(Interface_ID
id, const MCHAR *int_name, StringResID
descr, ClassDesc
*cd,
USHORT flag, va_list ap) |
Constructor & Destructor Documentation
- Parameters:
- Interface_ID id
The unique ID of the interface.
MCHAR* int_name
The fixed internal name for the interface.
StringResID descr
A string resource ID containing the description for this interface
class.
ClassDesc* cd
A pointer to a
ClassDesc class descriptor of the publishing plug-in.
ULONG flag
The flag bits. One or more of the following values: FP_ACTIONS,
FP_MIXIN, FP_CORE, FP_STATIC_METHODS, FP_SCRIPTED_CLASS,
FP_TEMPORARY. For a description see the data members
descriptions.
...
This constructor takes a variable number of arguments representing
the 'properties' sections and function definitions. For more
information see the advanced topics on Function
Publishing.
Member Function Documentation
virtual void Init |
( |
|
) |
[inline, virtual] |
- Default Implementation:
- { }
- Returns:
- One of the following LifetimeTypes:
noRelease
Do not call release, use interface as long as you like.
immediateRelease
The interface is only good for one calls. The release is implied so
a call to release is not required.
wantsRelease
The clients are controlling the lifetime, so the interface needs a
Release() when the client has finished. This is the default.
serverControlled
The server controls the lifetime and will use the InterfaceNotifyCallback
to inform the code when it is gone.
- Default Implementation:
- { return noRelease; }
Reimplemented from BaseInterface.
- Parameters:
- Interface_ID id
The ID of the interface to return.
- Default Implementation:
- { return NULL; }
Reimplemented from FPInterface.
Reimplemented in Interface.
- Parameters:
- Interface_ID id
The unique ID of the interface.
MCHAR* int_name
The fixed internal name for the interface.
StringResID descr
A string resource ID containing the description for this interface
class.
ClassDesc* cd
A pointer to a
ClassDesc class descriptor of the publishing plug-in.
ULONG flag
The flag bits. One or more of the following values: FP_ACTIONS,
FP_MIXIN, FP_CORE, FP_STATIC_METHODS, FP_SCRIPTED_CLASS,
FP_TEMPORARY. For a description see the data members
descriptions.
...
This method takes a variable number of arguments representing the
'properties' sections and function definitions. For more
information see the advanced topics on Function
Publishing.
CoreExport void AppendFunction |
( |
int |
id, |
|
|
|
... |
|
) |
|
|
Add a new function to this interface descriptor.
Uses the same parameter syntax as LoadDescriptor and the
Constructor. Note that it is mandatory to mark the end of the
variable arguments list with end
. Failure to do so
will result in undefined behaviour.
CoreExport void AppendProperty |
( |
int |
id, |
|
|
|
... |
|
) |
|
|
Add a new property to this interface descriptor.
Uses the same parameter syntax as LoadDescriptor and the
Constructor. Note that it is mandatory to mark the end of the
variable arguments list with end
. Failure to do so
will result in undefined behaviour.
CoreExport void AppendEnum |
( |
int |
id, |
|
|
|
... |
|
) |
|
|
Add a new enum to this interface descriptor.
Uses the same parameter syntax as LoadDescriptor and the
Constructor. Note that it is mandatory to mark the end of the
variable arguments list with end
. Failure to do so
will result in undefined behaviour.
CoreExport void SetClassDesc |
( |
ClassDesc * |
i_cd |
) |
|
- Parameters:
- ClassDesc* i_cd
This points to the
ClassDesc class descriptor to set.
CoreExport va_list check_fn |
( |
va_list |
ap, |
|
|
int |
id |
|
) |
|
|
CoreExport va_list scan_fn |
( |
va_list |
ap, |
|
|
int |
id, |
|
|
int |
index |
|
) |
|
|
CoreExport va_list check_prop |
( |
va_list |
ap, |
|
|
int |
id |
|
) |
|
|
CoreExport va_list scan_prop |
( |
va_list |
ap, |
|
|
int |
id, |
|
|
int |
index |
|
) |
|
|
CoreExport va_list check_enum |
( |
va_list |
ap, |
|
|
EnumID |
id |
|
) |
|
|
CoreExport va_list scan_enum |
( |
va_list |
ap, |
|
|
EnumID |
id, |
|
|
int |
index |
|
) |
|
|
- Default Implementation:
- { return this; }
Implements FPInterface.
- Parameters:
- FunctionID fid
The unique function ID used to identify the function.
- Default Implementation:
- { return action_table; }
Reimplemented from FPInterface.
CoreExport void EnableActions |
( |
BOOL |
onOff |
) |
[virtual] |
- Parameters:
- BOOL onOff;
TRUE to enable actions, FALSE to disable actions.
Reimplemented from FPInterface.
virtual CoreExport HINSTANCE HInstance |
( |
|
) |
[virtual] |
virtual CoreExport const MCHAR*
GetRsrcString |
( |
StringResID |
id |
) |
[virtual] |
- Parameters:
- StringResD id
The string resource ID for which you want to obtain the
string.
Reimplemented in MSPluginDesc.
Member Data Documentation