GvPortList Class Reference Graph View

#include <c4d_graphview.h>

详细描述

Manages a list of GvPortListEntry representing ports on a GvNode .

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

私有成员函数

  GvPortList ()
  ~GvPortList ()

Alloc/Free

static GvPortList Alloc ()
static void  Free ( GvPortList *&list)

List

Int32   GetCount (void) const
Bool   Append ( GvPortListEntry *e)
Bool   移除 ( GvPortListEntry *e)
GvPortListEntry GetIndex ( Int32 i) const
void  FlushAll (void)

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

◆  GvPortList()

GvPortList () private

◆  ~GvPortList()

~ GvPortList () private

成员函数文档编制

◆  Alloc()

static GvPortList * Alloc ( )
static

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

返回
The allocated port list, or nullptr if the allocation failed.

◆  Free()

static void Free ( GvPortList *&  list )
static

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

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

◆  GetCount()

Int32 GetCount ( void  ) const

Gets the number of port entries.

返回
The number of entries.

◆  Append()

Bool Append ( GvPortListEntry e )

Appends an entry to the end of the list.

参数
[in] e The entry to append. The list takes over the ownership of the pointed entry.
返回
true if the port was appended, otherwise false .

◆  Remove()

Bool 移除 ( GvPortListEntry e )

Removes the entry given by e .

注意
e is compared by pointer, so it must be either the pointer originally given to Append() or one returned from GetIndex() .
参数
[in] e The entry to remove. If the removal succeed, the ownership is transfered to the caller.
返回
true if the entry was found and removed, otherwise false .

◆  GetIndex()

GvPortListEntry * GetIndex ( Int32   i ) const

Retrieves an entry by index.

参数
[in] i The entry index: 0 <= i < GetCount() .
返回
The retrieved entry. The list owns the pointed entry.

◆  FlushAll()

void FlushAll ( void  )

Clears the list.