BaseLink Class Reference

#include <c4d_baselink.h>

Private Member Functions

 BaseLink (const BaseLink &s)
 
const BaseLinkoperator= (const BaseLink &s)
 

Private Attributes

Stringcachepath
 
GeAliasXLinkxlink
 
C4DAtomup_pointer
 

Friends

class GeAliasXGoal
 
class GeAliasXLink
 
class GeAliasXTrans
 
struct tagInExcludeElement
 

Constructor/Destructor

 BaseLink ()
 
virtual ~BaseLink ()
 

Alloc/Free

static BaseLinkAlloc ()
 
static void Free (BaseLink *&ptr)
 

Read/Write

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

Clone/Copy

virtual BaseLinkGetClone (AliasTrans *aliastrans) const
 
virtual void CopyData (BaseLink *dest, AliasTrans *aliastrans) const
 

Link

void SetLink (GeListNode *bl)
 
void * GetLink () const
 
void Transfer (BaseLink *dest)
 

Private

GeListNodeGetLinkAtom (const BaseDocument *doc, Int32 instanceof=0) const
 
void XCopyData (BaseLink *dest, AliasTrans *aliastrans) const
 
void XSetLink (GeAliasGoal &org)
 
void SetLink (GeAliasGoal &org)
 
GeAliasGoalGetLinkGoal () const
 
GeAliasGoalXGetLinkGoal () const
 
void XRemoveLink ()
 
void RemoveLink ()
 
void GetAliasID (GeAliasID *id) const
 
void SetAliasID (const GeAliasID &id, AliasTrans &trans, GeAliasGoal *old_goal)
 
Bool IsCacheLink () const
 
void SetUpPointer (C4DAtom *up_pointer)
 

Detailed Description

A dynamic link to a BaseList2D object.
A link can be easily stored in containers and saved to disk, and is even preserved when duplicating hierarchies.

Constructor & Destructor Documentation

◆ BaseLink() [1/2]

BaseLink ( const BaseLink s)
private

◆ BaseLink() [2/2]

BaseLink ( )

Default constructor.

◆ ~BaseLink()

virtual ~BaseLink ( )
virtual

Default destructor.

Member Function Documentation

◆ operator=()

const BaseLink& operator= ( const BaseLink s)
private

◆ Alloc()

static BaseLink* Alloc ( )
static

Allocates an alias link. Destroy the allocated alias link with Free(). The allocated alias link, or nullptr if the allocation failed.

◆ Free()

static void Free ( BaseLink *&  ptr)
static

Destructs alias links allocated with Alloc().

Parameters
[in,out]ptrThe alias link to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ Read()

Bool Read ( HyperFile hf)

Reads the alias link from a hyper file.

Parameters
[in]hfThe hyper file to read from. The caller owns the pointed hyper file.
Returns
true if the alias link was read, otherwise false.

◆ Write()

Bool Write ( HyperFile hf)

Writes the alias link to a hyper file.

Parameters
[in]hfThe hyper file to write to. The caller owns the pointed hyper file.
Returns
true if the alias link was written, otherwise false.

◆ GetClone()

virtual BaseLink* GetClone ( AliasTrans aliastrans) const
virtual

Gets a copy of the alias link.

Parameters
[in]aliastransAn alias translator for the operation. Can be nullptr. The caller owns the pointed alias link.
Returns
The cloned alias link. The caller owns the pointed alias link.

◆ CopyData()

virtual void CopyData ( BaseLink dest,
AliasTrans aliastrans 
) const
virtual

Copies the link to dest.

Parameters
[out]destThe destination alias link. The caller owns the pointed alias link.
[in]aliastransAn alias translator for the operation. Can be nullptr. The caller owns the pointed alias link.

◆ SetLink() [1/2]

void SetLink ( GeListNode bl)

Sets the link to point to bl.

Parameters
[in]blThe new link. The caller owns the pointed list node.

◆ GetLink()

void* GetLink ( ) const

Evaluates and gets the link in its document.

Returns
The link, or nullptr if the link is broken. The document owns the pointed .

◆ Transfer()

void Transfer ( BaseLink dest)

Transfers the link to dest.

Parameters
[out]destThe destination alias link. The caller owns the pointed alias link.

◆ GetLinkAtom()

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

Private.

◆ XCopyData()

void XCopyData ( BaseLink dest,
AliasTrans aliastrans 
) const

Private.

◆ XSetLink()

void XSetLink ( GeAliasGoal org)

Private.

◆ SetLink() [2/2]

void SetLink ( GeAliasGoal org)

Private.

◆ GetLinkGoal()

GeAliasGoal* GetLinkGoal ( ) const

Private.

◆ XGetLinkGoal()

GeAliasGoal* XGetLinkGoal ( ) const

Private.

◆ XRemoveLink()

void XRemoveLink ( )

Private.

◆ RemoveLink()

void RemoveLink ( )

Private.

◆ GetAliasID()

void GetAliasID ( GeAliasID id) const

Private.

◆ SetAliasID()

void SetAliasID ( const GeAliasID id,
AliasTrans trans,
GeAliasGoal old_goal 
)

Private.

◆ IsCacheLink()

Bool IsCacheLink ( ) const

Private.

◆ SetUpPointer()

void SetUpPointer ( C4DAtom up_pointer)

Private.

Friends And Related Function Documentation

◆ GeAliasXGoal

friend class GeAliasXGoal
friend

◆ GeAliasXLink

friend class GeAliasXLink
friend

◆ GeAliasXTrans

friend class GeAliasXTrans
friend

◆ tagInExcludeElement

friend struct tagInExcludeElement
friend

Member Data Documentation

◆ cachepath

String* cachepath
private

◆ xlink

GeAliasXLink* xlink
private

◆ up_pointer

C4DAtom* up_pointer
private