BaseLink Class Reference

#include <c4d_baselist.h>

详细描述

A dynamic link to a BaseList2D 对象。
These links can easily be stored in containers and saved to disk, and are even preserved when duplicating hierarchies.

注意
Has to be created with Alloc() and destroyed with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

私有成员函数

  BaseLink ()
  ~BaseLink ()

Alloc/Free

static BaseLink Alloc ()
static void  Free ( BaseLink *&link)

Get Link

BaseList2D GetLink (const BaseDocument *doc, Int32 instanceof=0) const
C4DAtomGoal GetLinkAtom (const BaseDocument *doc, Int32 instanceof=0) const
BaseList2D ForceGetLink () const
C4DAtomGoal ForceGetLinkAtom () const

Set Link

void  SetLink ( C4DAtomGoal *list)

Read/Write

Bool   读取 ( HyperFile *hf)
Bool   Write ( HyperFile *hf) const

拷贝

BaseLink GetClone ( COPYFLAGS flags, AliasTrans *trn) const
Bool   CopyTo ( BaseLink *dst, COPYFLAGS flags, AliasTrans *trn) const

杂项

Bool   IsCacheLink () const
void  SetUpPointer ( C4DAtom *t_up_pointer)

构造函数 & 析构函数文档编制

◆  BaseLink()

BaseLink () private

◆  ~BaseLink()

~ BaseLink () private

成员函数文档编制

◆  Alloc()

static BaseLink * Alloc ( )
static

Allocates a base link. Destroy the allocated base link with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated base link, or nullptr if the allocation failed.

◆  Free()

static void Free ( BaseLink *&  link )
static

Destructs base links allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in,out] link The base link to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆  GetLink()

BaseList2D * GetLink ( const BaseDocument doc ,
Int32   instanceof = 0  
) const

Evaluates the link in the specified document.
instanceof is specified, nullptr is returned if the object is not of this type.

参数
[in] doc The document to evaluate the link in. The caller owns the pointed document.
[in] instanceof Set this to a node type ID to only return the link if it is of this type.
返回
The linked object, or nullptr if the link is broken or of the wrong type. The document owns the pointed object.

◆  GetLinkAtom()

C4DAtomGoal * GetLinkAtom ( const BaseDocument doc ,
Int32   instanceof = 0  
) const

Evaluates the atom link in the specified document.
instanceof is specified, nullptr is returned if the atom object is not of this type.

参数
[in] doc The document to evaluate the link in. The caller owns the pointed document.
[in] instanceof Set this to a type ID to only return the link if it is of this type.
返回
The linked atom object, or nullptr if the link is broken or of the wrong type. The document owns the pointed atom object.

◆  ForceGetLink()

BaseList2D * ForceGetLink ( ) const

Retrieves the stored link independent of a document.
Can return nullptr if there is no object linked. For example:

◆  ForceGetLinkAtom()

C4DAtomGoal * ForceGetLinkAtom ( ) const

Retrieves the stored atom link independent of a document.
Can return nullptr if there is no object linked. For example:

◆  SetLink()

void SetLink ( C4DAtomGoal list )

Sets the link to point to list .

参数
[in] list The new atom goal. The caller owns the pointed atom goal.

◆  Read()

Bool 读取 ( HyperFile hf )

Reads the link from a hyper file.

参数
[in] hf The hyper file to read from. The caller owns the pointed hyper file.
返回
true if the link was read, otherwise false .

◆  Write()

Bool Write ( HyperFile hf ) const

Writes the link to a hyper file.

参数
[in] hf The hyper file to write to. The caller owns the pointed hyper file.
返回
true if the link was written, otherwise false .

◆  GetClone()

BaseLink * GetClone ( COPYFLAGS   flags ,
AliasTrans trn  
) const

Gets a copy of the link.

参数
[in] flags Flags for the clone: COPYFLAGS
[in] trn An alias translator for the operation. Can be nullptr . The caller owns the pointed alias translator.
返回
The cloned link. The caller owns the pointed link.

◆  CopyTo()

Bool CopyTo ( BaseLink dst ,
COPYFLAGS   flags ,
AliasTrans trn  
) const

Copies the link to dst .

参数
[in] dst The destination link. The caller owns the pointed link.
[in] flags Flags for the copy: COPYFLAGS
[in] trn An alias translator for the operation. Can be nullptr . The caller owns the pointed alias translator.
返回
true if the link was copied, otherwise false .

◆  IsCacheLink()

Bool IsCacheLink ( ) const

Checks if the link points to an object within the cache of another object.

返回
true if this link points to an object's cache, otherwise false .

◆  SetUpPointer()

void SetUpPointer ( C4DAtom t_up_pointer )

Private .