#include <c4d_baselist.h>
The base class of many classes within the API.
Represents an object that can be read from and written to disk, copied and that has a description for the Attribute Manager.
Private Member Functions | |
C4DAtom () | |
~C4DAtom () | |
Type | |
Int32 | GetType () const |
Int32 | GetRealType () const |
Int32 | GetDiskType () const |
Bool | IsInstanceOf (Int32 id) const |
Int32 | GetClassification () const |
Message | |
Bool | Message (Int32 type, void *data=nullptr) |
Bool | MultiMessage (MULTIMSG_ROUTE flags, Int32 type, void *data) |
Copy | |
C4DAtom * | GetClone (COPYFLAGS flags, AliasTrans *trn) |
Bool | CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn) |
Read/Write | |
Bool | Read (HyperFile *hf, Int32 id, Int32 level) |
Bool | Write (HyperFile *hf) |
Bool | ReadObject (HyperFile *hf, Bool readheader) |
Bool | WriteObject (HyperFile *hf) |
Description | |
Bool | GetDescription (Description *description, DESCFLAGS_DESC flags) |
Bool | GetParameter (const DescID &id, GeData &t_data, DESCFLAGS_GET flags) |
Bool | SetParameter (const DescID &id, const GeData &t_data, DESCFLAGS_SET flags) |
DynamicDescription * | GetDynamicDescription () |
Bool | GetEnabling (const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) |
Bool | TranslateDescID (const DescID &id, DescID &res_id, C4DAtom *&res_at) |
Dirty Flags | |
UInt32 | GetDirty (DIRTYFLAGS flags) const |
void | SetDirty (DIRTYFLAGS flags) |
UInt32 | GetHDirty (HDIRTYFLAGS mask) const |
void | SetHDirty (HDIRTYFLAGS mask) |
|
private |
|
private |
Int32 GetType | ( | ) | const |
Gets the type of the atom.
Int32 GetRealType | ( | ) | const |
Gets the real type of the atom. This is similar to GetType(), but for multinodes the ID of the last linked part is returned.
E.g. XPresso nodes have the type ID_GV_GROUPDATA or ID_GV_NODEDATA but GetRealType() returns the ID of the operator.
Int32 GetDiskType | ( | ) | const |
Gets the atoms unique disk type ID.
Checks if the atom is an instance of a base type.
[in] | id | The base type ID, for example Obase. |
Int32 GetClassification | ( | ) | const |
Returns the base type of the atom; e.g. Obase for objects , Tbase for tags etc.
Sends a message to the atom only.
[in] | type | The message type, one of the following: MSG |
[in,out] | data | The message data. The sender owns the pointed data. |
Bool MultiMessage | ( | MULTIMSG_ROUTE | flags, |
Int32 | type, | ||
void * | data | ||
) |
Sends a message to the atom and to its children, parents or branches, depending on flags.
[in] | flags | A combination of the following flags: MULTIMSG_ROUTE |
[in] | type | The message type, one of the following types: MSG |
[in,out] | data | The message data. The sender owns the pointed data. |
C4DAtom* GetClone | ( | COPYFLAGS | flags, |
AliasTrans * | trn | ||
) |
Retrieves a copy of the atom.
[in] | flags | Flags for the clone: COPYFLAGS |
[in] | trn | An alias translator for the operation. Can be nullptr. The caller owns the pointed object. |
Bool CopyTo | ( | C4DAtom * | dst, |
COPYFLAGS | flags, | ||
AliasTrans * | trn | ||
) |
Copies all values from *this
to *dst.
[out] | dst | The destination. The caller owns the pointed object. |
[in] | flags | Flags for the copy: COPYFLAGS |
[in] | trn | An alias translator for the operation. Can be nullptr. The caller owns the pointed object. |
Reads the atom from a HyperFile, manually specifying id and disk level.
[in] | hf | The hyper file to read from. The caller owns the pointed object. |
[in] | id | The ID of the atom to read. |
[in] | level | The disk level of the atom to read. |
Writes the atom to a HyperFile.
[in] | hf | The hyper file to write to. The caller owns the pointed object. |
Reads the atom from a HyperFile within another read operation.
[in] | hf | The hyper file to read from. The caller owns the pointed object. |
[in] | readheader | Normally true. Should only be false if the file header is manually read. |
Writes the atom to a HyperFile, within another write operation.
[in] | hf | The hyper file to write to. The caller owns the pointed object. |
Bool GetDescription | ( | Description * | description, |
DESCFLAGS_DESC | flags | ||
) |
Gets the description for the atom.
[out] | description | Filled with the atom's description. The caller owns the pointed object. |
[in] | flags | Flags: DESCFLAGS_DESC |
Bool GetParameter | ( | const DescID & | id, |
GeData & | t_data, | ||
DESCFLAGS_GET | flags | ||
) |
Gets a parameter of the atom.
[in] | id | The ID of the parameter. |
[out] | t_data | Assigned the parameter's data. |
[in] | flags | Flags: DESCFLAGS_GET |
Bool SetParameter | ( | const DescID & | id, |
const GeData & | t_data, | ||
DESCFLAGS_SET | flags | ||
) |
Sets a parameter of the atom.
[in] | id | The ID of the parameter. |
[in] | t_data | The data to set. |
[in] | flags | Flags: DESCFLAGS_SET |
DynamicDescription* GetDynamicDescription | ( | ) |
Gets the dynamic description of the atom. (Also known as the user data part of the Attribute Manager.)
Bool GetEnabling | ( | const DescID & | id, |
const GeData & | t_data, | ||
DESCFLAGS_ENABLE | flags, | ||
const BaseContainer * | itemdesc | ||
) |
Checks if a description parameter should be disabled or enabled.
[in] | id | The ID of the parameter. |
[out] | t_data | Assigned the current data. |
[in] | flags | Flags: DESCFLAGS_ENABLE |
[out] | itemdesc | The parameter's description, encoded to a container as described in Description. |
Redirects description IDs between nodes.
[in] | id | The description ID to redirect. |
[in] | res_id | The target description ID. |
[in] | res_at | The target node. |
UInt32 GetDirty | ( | DIRTYFLAGS | flags | ) | const |
Gets the dirty checksum for the object. This can be used to check if the object has been changed.
[in] | flags | Flags: DIRTYFLAGS |
void SetDirty | ( | DIRTYFLAGS | flags | ) |
Sets the dirty checksum, the one returned by GetDirty().
[in] | flags | Flags: DIRTYFLAGS |
UInt32 GetHDirty | ( | HDIRTYFLAGS | mask | ) | const |
Gets the dirty bits for the specified mask.
[in] | mask | Mask: HDIRTYFLAGS |
void SetHDirty | ( | HDIRTYFLAGS | mask | ) |
Sets the dirty bits, the one returned by GetHDirty().
[in] | mask | Mask: HDIRTYFLAGS |