Open Search
    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 ()
     
    const GeListNodeGetNext () const
     
    GeListNodeGetPred ()
     
    const GeListNodeGetPred () const
     
    GeListNodeGetDown ()
     
    const GeListNodeGetDown () const
     
    GeListNodeGetUp ()
     
    const GeListNodeGetUp () const
     
    GeListNodeGetDownLast ()
     
    const GeListNodeGetDownLast () const
     

    Insertion

    void InsertBefore (GeListNode *bl)
     
    void InsertAfter (GeListNode *bl)
     
    void InsertUnder (GeListNode *bl)
     
    void InsertUnderLast (GeListNode *bl)
     
    void Remove ()
     
    void FlushChilds ()
     
    void MoveChildrenTo (GeListNode *dest)
     

    Miscellaneous

    GeListHeadGetListHead ()
     
    const GeListHeadGetListHead () const
     
    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 ()
     
    const GeListNodeGetCustomData () const
     
    const BaseDocumentGetDocument () const
     
    BaseDocumentGetDocument ()
     
    maxon::Result< BoolGetBranchInfo (const maxon::ValueReceiver< const BranchInfo & > &info, GETBRANCHINFO flags) const
     
    Bool IsDocumentRelated () const
     
    Int32 GetInfo () const
     

    Nbit

    Bool GetNBit (NBIT bit) const
     
    UInt32 GetNBitMask (Int32 index) const
     
    Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
     

    Additional Inherited Members

    - Public Member Functions inherited from C4DAtom
    Int32 GetType () const
     
    Int32 GetRealType () const
     
    Int32 GetDiskType () const
     
    Bool IsInstanceOf (Int32 id) const
     
    Int32 GetClassification () const
     
    Bool Message (Int32 type, void *data=nullptr)
     
    Bool MultiMessage (MULTIMSG_ROUTE flags, Int32 type, void *data)
     
    C4DAtomGetClone (COPYFLAGS flags, AliasTrans *trn) const
     
    Bool CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn) const
     
    Bool Read (HyperFile *hf, Int32 id, Int32 level)
     
    Bool Write (HyperFile *hf) const
     
    Bool ReadObject (HyperFile *hf, Bool readheader)
     
    Bool WriteObject (HyperFile *hf) const
     
    Bool GetDescription (Description *description, DESCFLAGS_DESC flags) const
     
    Bool GetParameter (const DescID &id, GeData &t_data, DESCFLAGS_GET flags) const
     
    Bool SetParameter (const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
     
    DynamicDescriptionGetDynamicDescriptionWritable ()
     
    const DynamicDescriptionGetDynamicDescription () const
     
    Bool CopyDynamicDescriptionFrom (const BaseList2D *src)
     
    Bool GetEnabling (const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) const
     
    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() [1/2]

    GeListNode* GetNext ( )

    Gets the next node in the list.

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

    ◆ GetNext() [2/2]

    const GeListNode* GetNext ( ) const

    ◆ GetPred() [1/2]

    GeListNode* GetPred ( )

    Gets the previous node in the list.

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

    ◆ GetPred() [2/2]

    const GeListNode* GetPred ( ) const

    ◆ GetDown() [1/2]

    GeListNode* GetDown ( )

    Gets the first child node.

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

    ◆ GetDown() [2/2]

    const GeListNode* GetDown ( ) const

    ◆ GetUp() [1/2]

    GeListNode* GetUp ( )

    Gets the parent node.

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

    ◆ GetUp() [2/2]

    const GeListNode* GetUp ( ) const

    ◆ GetDownLast() [1/2]

    GeListNode* GetDownLast ( )

    Gets the last child node.

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

    ◆ GetDownLast() [2/2]

    const GeListNode* GetDownLast ( ) const

    ◆ 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 ( )

    Removal Removes the node from its list.

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

    ◆ FlushChilds()

    void FlushChilds ( )

    Deletes all childs in the GetDown() branch.

    ◆ MoveChildrenTo()

    void MoveChildrenTo ( GeListNode dest)

    Moves all children from this to dest No notifications are send around, this is for internal use if you know what you do. dest will call FlushChilds() before moving the objects.

    ◆ GetListHead() [1/2]

    GeListHead* GetListHead ( )

    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.

    ◆ GetListHead() [2/2]

    const GeListHead* GetListHead ( ) const

    ◆ 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() [1/2]

    GeListNode* GetCustomData ( )

    Gets the custom data for the node.

    See also
    SetCustomData()
    Returns
    The custom data.

    ◆ GetCustomData() [2/2]

    const GeListNode* GetCustomData ( ) const

    ◆ GetDocument() [1/2]

    const BaseDocument* GetDocument ( ) const

    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.

    ◆ GetDocument() [2/2]

    BaseDocument* GetDocument ( )

    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()

    maxon::Result<Bool> GetBranchInfo ( const maxon::ValueReceiver< const BranchInfo & > &  info,
    GETBRANCHINFO  flags 
    ) const

    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:

    Int32 count = node->GetBranchInfo(branch, MAX, GETBRANCHINFO::NONE);
    Py_ssize_t count
    Definition: abstract.h:640
    maxon::Int32 Int32
    Definition: ge_sys_math.h:60
    @ MAX
    Maximum NBIT.
    typename BufferedBaseArraySelector< COUNT, MINCHUNKSIZE, MEMFLAGS, ALLOCATOR >::template Type< T > BufferedBaseArray
    Definition: basearray.h:1810
    Definition: node.h:10
    Parameters
    [in]infoValueReceiver will be called for all found BranchInfo structures.
    [in]flagsFlags: GETBRANCHINFO
    Returns
    The number of BranchInfo elements filled in.

    ◆ IsDocumentRelated()

    Bool IsDocumentRelated ( ) const

    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.

    ◆ GetNBitMask()

    UInt32 GetNBitMask ( Int32  index) const

    Private.

    ◆ 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 ( ) const

    Private.