GeListNode Class Reference

#include <c4d_baselist.h>

Inheritance diagram for GeListNode:

Detailed Description

Represents a C4DAtom that resides in a 4D list.

Private Member Functions

 GeListNode ()
 
 ~GeListNode ()
 

Navigation

GeListNodeGetNext (void)
 
GeListNodeGetPred (void)
 
GeListNodeGetDown (void)
 
GeListNodeGetUp (void)
 
GeListNodeGetDownLast (void)
 

Insertion

void InsertBefore (GeListNode *bl)
 
void InsertAfter (GeListNode *bl)
 
void InsertUnder (GeListNode *bl)
 
void InsertUnderLast (GeListNode *bl)
 
void Remove (void)
 

Miscellaneous

GeListHeadGetListHead (void)
 
Int32 GetNodeID (Int32 index=0) const
 
template<typename CAST >
const CAST * GetNodeData (Int32 index=0) const
 
template<typename CAST >
CAST * GetNodeData (Int32 index=0)
 
void SetCustomData (GeListNode *node)
 
GeListNodeGetCustomData (void)
 
BaseDocumentGetDocument (void)
 
Int32 GetBranchInfo (BranchInfo *info, Int32 max, GETBRANCHINFO flags)
 
Bool IsDocumentRelated (void)
 
Int32 GetInfo (void)
 

Nbit

Bool GetNBit (NBIT bit) const
 
Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 

Additional Inherited Members

- Public Member Functions inherited from C4DAtom
Int32 GetType (void) const
 
Int32 GetRealType (void) const
 
Int32 GetDiskType (void) const
 
Bool IsInstanceOf (Int32 id) const
 
Int32 GetClassification (void) const
 
Bool Message (Int32 type, void *data=nullptr)
 
Bool MultiMessage (MULTIMSG_ROUTE flags, Int32 type, void *data)
 
C4DAtomGetClone (COPYFLAGS flags, AliasTrans *trn)
 
Bool CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn)
 
Bool Read (HyperFile *hf, Int32 id, Int32 level)
 
Bool Write (HyperFile *hf)
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf)
 
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)
 
DynamicDescriptionGetDynamicDescription ()
 
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)
 
UInt32 GetDirty (DIRTYFLAGS flags) const
 
void SetDirty (DIRTYFLAGS flags)
 
UInt32 GetHDirty (HDIRTYFLAGS mask) const
 
void SetHDirty (HDIRTYFLAGS mask)
 

Constructor & Destructor Documentation

§ GeListNode()

GeListNode ( )
private

§ ~GeListNode()

~GeListNode ( )
private

Member Function Documentation

§ GetNext()

GeListNode* GetNext ( void  )

Gets the next node in the list.

Returns
The next node, or nullptr if there is none. Cinema 4D owns the pointed node.

§ GetPred()

GeListNode* GetPred ( void  )

Gets the previous node in the list.

Returns
The previous node, or nullptr if there is none. Cinema 4D owns the pointed node.

§ GetDown()

GeListNode* GetDown ( void  )

Gets the first child node.

Returns
The first child node, or nullptr if there is none. Cinema 4D owns the pointed node.

§ GetUp()

GeListNode* GetUp ( void  )

Gets the parent node.

Returns
The parent node, or nullptr if there is none. Cinema 4D owns the pointed node.

§ GetDownLast()

GeListNode* GetDownLast ( void  )

Gets the last child node.

Returns
The last child node, or nullptr if there is none. Cinema 4D owns the pointed node.

§ InsertBefore()

void InsertBefore ( GeListNode bl)

Inserts the node before bl.

Warning
You must make sure that bl has a parent and that the insertion is sane, for example it is forbidden to insert a key.
It is also necessary to use Remove() first if the object is already inserted into another list.
Parameters
[in]blThe node to insert before. The caller owns the pointed node.

§ InsertAfter()

void InsertAfter ( GeListNode bl)

Inserts the node after bl.

Warning
You must make sure that bl has a parent and that the insertion is sane, for example it is forbidden to insert a key.
It is also necessary to use Remove() first if the object is already inserted into another list.
Parameters
[in]blThe node to insert after. The caller owns the pointed node.

§ InsertUnder()

void InsertUnder ( GeListNode bl)

Inserts the node under bl as the first child.

Warning
You must make sure that the insertion is sane, for example it is forbidden to insert a key.
It is also necessary to use Remove() first if the object is already inserted into another list.
Parameters
[in]blThe node to insert under. The caller owns the pointed node.

§ InsertUnderLast()

void InsertUnderLast ( GeListNode bl)

Inserts the node as the last child of bl.

Warning
You must make sure that the insertion is sane, for example it is forbidden to insert a key.
It is also necessary to use Remove() first if the object is already inserted into another list.
Parameters
[in]blThe node to insert under as last child. The caller owns the pointed node.

§ Remove()

void Remove ( void  )

RemovalRemoves the node from its list.

Warning
When a node is removed you become responsible for freeing it or passing its ownership to another list.

§ GetListHead()

GeListHead* GetListHead ( void  )

Retrieves the list head for the node.

Returns
The list head or nullptr if the node is not attached to one. The pointed list head owns the node.

§ GetNodeID()

Int32 GetNodeID ( Int32  index = 0) const

Gets the ID of the node optionally for the given level index.

Parameters
[in]indexFor multi-nodes (two or more nodes virtually linked together) retrieve the ID for every level index.
For example GvNode is a level 2 multi-nodes. They consist of one list element (GeListNode or BaseList2D) and two virtual NodeData derivate: one is private and one is used by the operator.
Returns
The node's ID.

§ GetNodeData() [1/2]

const CAST* GetNodeData ( Int32  index = 0) const

Retrieves the data for the node.

Note
Changed in R17. Changed returned object type from NodeData* to template <typename CAST> CAST*.
Warning
Only use the virtual functions of the object if GetNodeData() is called in the same module that registered the node.
Parameters
[in]indexFor multi-nodes (two or more nodes virtually linked together) retrieve the ID for every level index.
For example GvNode objects are level 2 multi-nodes. They consist of one list element (GeListNode or BaseList2D) and two virtual NodeData derivate: one is private and one is used by the operator.
Returns
The node data, or nullptr. The node owns the pointed NodeData.

§ GetNodeData() [2/2]

CAST* GetNodeData ( Int32  index = 0)

Retrieves the data for the node.

Note
Changed in R17. Changed returned object type from NodeData* to template <typename CAST> CAST*.
Warning
Only use the virtual functions of the object if GetNodeData() is called in the same module that registered the node.
Parameters
[in]indexFor multi-nodes (two or more nodes virtually linked together) retrieve the ID for every level index.
For example GvNode objects are level 2 multi-nodes. They consist of one list element (GeListNode or BaseList2D) and two virtual NodeData derivate: one is private and one is used by the operator.
Returns
The node data, or nullptr. The node owns the pointed NodeData.

§ SetCustomData()

void SetCustomData ( GeListNode node)

Sets the custom data for the node.

Note
The custom data is private data that can be attached to an object.
Only the owner of an object type (not an object instance) is allowed to attach custom data to that object.
Parameters
[in]nodeThe new custom data.

§ GetCustomData()

GeListNode* GetCustomData ( void  )

Gets the custom data for the node.

See also
SetCustomData()
Returns
The custom data.

§ GetDocument()

BaseDocument* GetDocument ( void  )

Retrieves the document for the node.

Returns
The document, or nullptr if the node is not in a document. The pointed document owns the list head that possesses the node.

§ GetBranchInfo()

Int32 GetBranchInfo ( BranchInfo info,
Int32  max,
GETBRANCHINFO  flags 
)

Gets information about which other node types the node contains.
For example objects contain tags.
Example: Pass an array of BranchInfo objects and its size, the function returns the number of filled elements:

BranchInfo branch[MAX];
Int32 count = node->GetBranchInfo(branch, MAX, GETBRANCHINFO_0);
Parameters
[in,out]infoAn array of max BranchInfo structures. The caller owns the pointed array.
[in]maxThe number of elements in info.
[in]flagsFlags: GETBRANCHINFO
Returns
The number of BranchInfo elements filled in.

§ IsDocumentRelated()

Bool IsDocumentRelated ( void  )

Checks if the node is of a type that can be inserted into a document.

Returns
true if the node is document related, otherwise false.

§ GetNBit()

Bool GetNBit ( NBIT  bit) const

Raw access to the node state.

Parameters
[in]bitThe bit index: NBIT
Returns
The bit state.

§ ChangeNBit()

Bool ChangeNBit ( NBIT  bit,
NBITCONTROL  bitmode 
)

Sets bits in the node state.

Parameters
[in]bitThe bit index: NBIT
[in]bitmodeThe bit mode: NBITCONTROL
Returns
true if the bit was successfully changed, otherwise false.

§ GetInfo()

Int32 GetInfo ( void  )

Private.