TBasicDataExchanger Class Reference
[Base Classes for plugins]

Inheritance diagram for TBasicDataExchanger:
TBasicUnknown IExDataExchanger TMCObject IMCUnknown IMCUnknown TBasic3DExportFilter TBasic3DImportFilter TBasicAmbient TBasicAnimationMethod TBasicAtmosphere TBasicAttributesSetControler TBasicBackdrop TBasicBackground TBasicCamera TBasicClip TBasicColorPicker TBasicColorSet TBasicConstraint TBasicDataComponent TBasicFinalRenderer TBasicGel TBasicGenericData TBasicLight TBasicModifier TBasicModule TBasicMovie TBasicNewConstraint TBasicPostRenderer TBasicPrefsComponent TBasicPrimitive TBasicRendererBox TBasicRenderFeature TBasicRigidBodySolver TBasicSceneCommand TBasicShader TBasicTerrainFilter TBasicTweener TBasicVolumetricCloudsShape TBasicVolumetricEffect

List of all members.

Public Member Functions

virtual MCCOMErr MCCOMAPI QueryInterface (const MCIID &riid, void **ppvObj)
virtual uint32 MCCOMAPI AddRef ()
virtual void MCCOMAPI Clone (IExDataExchanger **clonedObject, IMCUnknown *pUnkOuter)
virtual boolean MCCOMAPI IsEqual (IExDataExchanger *otherDataExchanger)
virtual MCCOMErr MCCOMAPI GetParameter (IDType keyword, void *parameter)
virtual MCCOMErr MCCOMAPI SetParameter (IDType keyword, void *parameter)
virtual void *MCCOMAPI GetExtensionDataBuffer ()
 You MUST implement this method if you have a pmap (the default returns NULL).
virtual MCCOMErr MCCOMAPI ExtensionDataChanged ()
virtual MCCOMErr MCCOMAPI HandleEvent (MessageID message, IMFResponder *source, void *data)
virtual MCCOMErr MCCOMAPI SimpleHandleEvent (MessageID message, IMFResponder *source, void *data)
virtual void MCCOMAPI GetUIHandler (TUIHandlerFunctionPtr &outHandler)
virtual int16 MCCOMAPI GetResID ()
virtual int16 MCCOMAPI GetMiniPartID ()
virtual MCCOMErr MCCOMAPI OverridesMiniPartID ()
virtual MCCOMErr MCCOMAPI InitComponent ()
virtual MCCOMErr MCCOMAPI CopyComponentExtraData (IExDataExchanger *dest)
IShParameterComponentGetMyPrefsComponent ()

Protected Member Functions

void CloneData (TBasicDataExchanger *destExchanger, IMCUnknown *pUnkOuter)

Detailed Description

Basic implementation of a Data Exchanger. Provides a default implementation of functions of an IExDataExchanger.

See also:
IExDataExchanger

Member Function Documentation

virtual uint32 MCCOMAPI TBasicDataExchanger::AddRef (  )  [inline, virtual]
virtual void MCCOMAPI TBasicDataExchanger::Clone ( IExDataExchanger **  clonedObject,
IMCUnknown pUnkOuter 
) [virtual]

Creates a copy of an external component. You only need to implement this method if your object has data that are not stored in its Parameter Map (Pmap).

Parameters:
clonedObject : the resulting copy of the current object
pUnkOuter : the internal component that needs to be linked to your object (call SetControllingUnknown(pUnkOuter) on the clone)

Implements IExDataExchanger.

Reimplemented in TBasicModule, and TBasicRendererBox.

void TBasicDataExchanger::CloneData ( TBasicDataExchanger destExchanger,
IMCUnknown pUnkOuter 
) [protected]

This copy method should be used by deriving classes. Never made it virtual. It must remain protected. If you're adding some fields, remember to reflect the change in the copy.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::CopyComponentExtraData ( IExDataExchanger dest  )  [inline, virtual]

Some components can contain data that aren't part of its pMap but need to copy during the Undo/Redo action for example. Implement this method to copy these "outside the pmap" data. Typicaly, it should copy the extra data that are cloned in the Clone method implementation.

Parameters:
dest The component where the date should be copied.

Implements IExDataExchanger.

Reimplemented in TBasicRendererBox.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::ExtensionDataChanged (  )  [virtual]

Called each time a parameter of the parameter map (Pmap) is modified. This should only be used to invalidate caches and should be quick since it can be called many times.

Implements IExDataExchanger.

Reimplemented in TBasicDistantLight, TBasicModule, and TBasicRendererBox.

virtual void* MCCOMAPI TBasicDataExchanger::GetExtensionDataBuffer (  )  [virtual]

You MUST implement this method if you have a pmap (the default returns NULL).

Implements IExDataExchanger.

Reimplemented in TBasicModifier, TBasicModule, and TBasicPrimitive.

virtual int16 MCCOMAPI TBasicDataExchanger::GetMiniPartID (  )  [virtual]

Returns the resource ID of the NodePart used for the MiniPart of the component.
If you want this value to be used, implement OverridesMiniPartID.

Implements IExDataExchanger.

Reimplemented in TBasicRendererBox.

IShParameterComponent* TBasicDataExchanger::GetMyPrefsComponent (  ) 
virtual MCCOMErr MCCOMAPI TBasicDataExchanger::GetParameter ( IDType  keyword,
void *  parameter 
) [virtual]

Returns the value of a given parameter of this dataExchanger. This function is called when the shell cannot find the given parameter in the Parameter Map (Pmap) of the component You need to implement this method only if your object has parameters that are not inside the parameter map.

Parameters:
keyword The ID of the parameter.
parameter A pointer to buffer where the value of the parameter can be copied.

Implements IExDataExchanger.

Reimplemented in TBasicModule, and TBasicRendererBox.

virtual int16 MCCOMAPI TBasicDataExchanger::GetResID (  )  [virtual]

Returns the resource ID of the NodePart used for the properties of the component.
Return 0 to use the default node id (the same number than the one used for the 'COMP' resource). This is the default.
Return -1 if you want an auto pmap (very rarely needed)

Each implementation MUST always return the same value !

Implements IExDataExchanger.

Reimplemented in TBasicModule, and TBasicRendererBox.

virtual void MCCOMAPI TBasicDataExchanger::GetUIHandler ( TUIHandlerFunctionPtr outHandler  )  [virtual]

Returns a static function that handles complex ui events. That function is allowed to change the UI, but it must take into account all the components and use the multivalue mode for parts.

See also:
LoadMultiValue (in MFPartUtilities.h) Each implementation MUST always return the same handler ! If needed, you can implement both GetUIHandler and SimpleHandleEvent.

Implements IExDataExchanger.

Reimplemented in TBasicRendererBox.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::HandleEvent ( MessageID  message,
IMFResponder source,
void *  data 
) [virtual]
Deprecated:
(doesn't work with multiple selections)

Implements IExDataExchanger.

Reimplemented in TBasicModule, and TBasicRendererBox.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::InitComponent (  )  [inline, virtual]

Set the data of a component to their default value Returns kNotImplementedError if not implemented, MC_S_OK otherwise.

Implements IExDataExchanger.

Reimplemented in TBasicRendererBox.

virtual boolean MCCOMAPI TBasicDataExchanger::IsEqual ( IExDataExchanger otherDataExchanger  )  [virtual]

Returns true if the two pointers are referring to the same data exchanger. When IsEqual is called you can assume that otherDataExchanger is of the same type as "this"

Parameters:
otherDataExchanger the extension to which it will be compared

Implements IExDataExchanger.

Reimplemented in TBasicModule, and TBasicRendererBox.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::OverridesMiniPartID (  )  [virtual]

Returns the resource ID of the NodePart used for the properties of the component.
Return MC_E_NOTIMPL to use the default node id (the same number than the one used for the 'COMP' resource). This is the default.
Return MC_S_OK if you want to use the ID from GetMiniPartID.

Implements IExDataExchanger.

Reimplemented in TBasicRendererBox.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::QueryInterface ( const MCIID riid,
void **  ppvObj 
) [virtual]
virtual MCCOMErr MCCOMAPI TBasicDataExchanger::SetParameter ( IDType  keyword,
void *  parameter 
) [virtual]

Sets the value of a parameter. You need to implement this method only if your object has parameters that are not inside the parameter map.

Parameters:
keyword The ID of the parameter.
parameter A pointer to buffer where the value of the parameter can be copied.

Implements IExDataExchanger.

Reimplemented in TBasicModule, and TBasicRendererBox.

virtual MCCOMErr MCCOMAPI TBasicDataExchanger::SimpleHandleEvent ( MessageID  message,
IMFResponder source,
void *  data 
) [virtual]

Replaces the deprecated HandleEvent ONLY IN SIMPLE CASES. This function MUST NOT change the user interface (its called for every selected component). Example of allowed use : if (source && (source->GetInstanceID() == 'shfl')) { fPMap.fSeed = gShellUtilities->TickCount(); ExtensionDataChanged(); }

Parameters:
message,: the ID of the message being sent (All MessageIDs are preceeded with "kMsg")
source,: the part that sent the message (can be NULL !)
data,: a pointer to private data corresponding to the message

Implements IExDataExchanger.

Reimplemented in TBasicDistantLight, and TBasicRendererBox.


The documentation for this class was generated from the following file:
Generated on Mon Apr 26 22:47:56 2010 for Carrara SDK Doc by  doxygen 1.6.3