DynamicDescription Class Reference

#include <c4d_dynamicdescription.h>

Public Member Functions

DescID Alloc (const BaseContainer &datadescription)
 
Bool Set (const DescID &descid, const BaseContainer &datadescription, BaseList2D *bl)
 
const BaseContainerFind (const DescID &descid)
 
Bool Remove (const DescID &descid)
 
Bool CopyTo (DynamicDescription *dest)
 
Bool FillDefaultContainer (BaseContainer &res, Int32 type, const String &name)
 

Private Attributes

BaseContainer dynamicdescriptions
 

Browse

void * BrowseInit ()
 
Bool BrowseGetNext (void *handle, DescID *id, const BaseContainer **data)
 
void BrowseFree (void *&handle)
 

Read/Write

Bool Read (HyperFile *hf)
 
Bool Write (HyperFile *hf)
 

Detailed Description

The dynamic description class stores user data values.
The information about each description parameter is stored in a BaseContainer with the following values. See DESC_* container IDs.

Member Function Documentation

◆ Alloc()

DescID Alloc ( const BaseContainer datadescription)

Allocates a new dynamic description.

Parameters
[in]datadescriptionSettings for the new user data.
Returns
The ID of the new dynamic description.

◆ Set()

Bool Set ( const DescID descid,
const BaseContainer datadescription,
BaseList2D bl 
)

Inserts a new user data with the specified ID.

Parameters
[in]descidID of the new dynamic description.
[in]datadescriptionSettings for the new dynamic description.
[in]blprivate.
Returns
true if the user data was inserted, otherwise false.

◆ Find()

const BaseContainer* Find ( const DescID descid)

Finds a dynamic description by ID.

Parameters
[in]descidID of the dynamic description.
Returns
Pointer to the found settings, or nullptr.

◆ Remove()

Bool Remove ( const DescID descid)

Removes dynamic description by ID.

Parameters
[in]descidID of the dynamic description to remove.
Returns
true if the user data was removed, otherwise false.

◆ CopyTo()

Bool CopyTo ( DynamicDescription dest)

Copies the dynamic description to dest.

Parameters
[in]destDestination dynamic description. The caller owns the pointed dynamic description.
Returns
true if the description was copied, otherwise false.

◆ FillDefaultContainer()

Bool FillDefaultContainer ( BaseContainer res,
Int32  type,
const String name 
)

Fills the default settings container for a certain data type with the specified name.

Parameters
[in]resAssigned the default settings.
[in]typeThe datatype ID. Either a custom ID or a data type ID.
[in]nameName of the dynamic description.
Returns
true if the settings container was filled, otherwise false.

◆ BrowseInit()

void* BrowseInit ( )

Starts browsing the parameters linearly.

Warning
BrowseFree() must called afterward!
Returns
Browse handle.

◆ BrowseGetNext()

Bool BrowseGetNext ( void *  handle,
DescID id,
const BaseContainer **  data 
)

Gets the next parameter in a browse sequence initiated with BrowseInit().

Parameters
[in]handleBrowse handle returned by BrowseInit().
[in]idAssigned the settings for the retrieved parameter. (See above.) The caller owns the pointed container.
[in]dataAssigned the ID of the retrieved parameter.
Returns
true if a new parameter was retrieved, otherwise false if the browse sequence is finished.

◆ BrowseFree()

void BrowseFree ( void *&  handle)

Free handles from BrowseInit().

Warning
BrowseFree() must called always called after BrowseInit() and browsing description parameters with BrowseGetNext() is finished!
Parameters
[in,out]handleThe handle to free. Assigned nullptr.

◆ Read()

Bool Read ( HyperFile hf)

Private.

◆ Write()

Bool Write ( HyperFile hf)

Private.

Member Data Documentation

◆ dynamicdescriptions

BaseContainer dynamicdescriptions
private