engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FClassTree类 参考

Manages an inheritance tree. 更多...

#include <ClassTree.h>

Public 成员函数

bool AddClass (UClass *ChildClass)
 Public interface for adding a new class to the tree. 更多...
 
bool ChangeParentClass (UClass *SearchClass, UClass *InNewParentClass=NULL)
 Move a class node in the hierarchy tree after a class has changed its SuperClass 更多...
 
 FClassTree (UClass *BaseClass)
 Constructor 更多...
 
const FClassTree * FindNode (UClass *SearchClass) const
 Find the node associated with the class specified 更多...
 
template<class Comparator >
FClassTree * GenerateMaskedClassTree (const Comparator &Mask) const
 Creates a new class tree rooted at this node's class, which contains only classes which match the class flags specified. 更多...
 
void GetChildClasses (TArray< const FClassTree * > &ChildClasses, bool bRecurse=false) const
 Retrieve the child nodes of this node 更多...
 
void GetChildClasses (TArray< FClassTree * > &ChildClasses, bool bRecurse=false)
 Retrieve the child nodes of this node 更多...
 
template<class Comparator >
void GetChildClasses (TArray< UClass * > &ChildClasses, const Comparator &Mask, bool bRecurse=false) const
 Retrieve the child nodes of this node that match the flags specified 更多...
 
UClass * GetClass () const
 Get the class associated with this node 更多...
 
FClassTree * GetNode (UClass *SearchClass)
 Find the node associated with the class specified 更多...
 
FClassTree * GetRootNode ()
 Gets the root node for this class tree
 
const FClassTree * GetRootNode () const
 Gets the root node for this class tree
 
int32 Num () const
 Get the number of classes represented by this node, including any child nodes 更多...
 
FORCEINLINE int32 NumChildren () const
 Get the number of child nodes of this node 更多...
 
void PopulateTree ()
 Utility/convenience method for populating a class tree.
 
void Validate () const
 Verify that this node is at the correct location in the class tree
 
 ~FClassTree ()
 Destructor. 更多...
 

详细描述

Manages an inheritance tree.

There is one FClassTree node for each UClass. Each node stores pointers to its parent and child nodes. New nodes should always be added to the root node. This is enforced by allowing const references to child nodes.

构造及析构函数说明

◆ FClassTree()

FClassTree::FClassTree ( UClass *  BaseClass)
inline

Constructor

参数
BaseClassthe class that should be associated with this node.

◆ ~FClassTree()

FClassTree::~FClassTree ( )
inline

Destructor.

Frees the memory for all child nodes, recursively.

成员函数说明

◆ AddClass()

bool FClassTree::AddClass ( UClass *  ChildClass)
inline

Public interface for adding a new class to the tree.

Actual functionality implemented separately in order to support being able to call AddClass() on any node in the tree structure and have it inserted into the correct location.

Can be called on any node in the tree. Takes care of inserting the class into the correct location in the structure. Correctly handles adding classes in any arbitrary order (i.e. parent classes do not need to be added before child classes, etc.)

参数
ChildClassthe class to add to the tree
返回
buffer that will contain the post processed text

◆ ChangeParentClass()

bool FClassTree::ChangeParentClass ( UClass *  SearchClass,
UClass *  InNewParentClass = NULL 
)
inline

Move a class node in the hierarchy tree after a class has changed its SuperClass

参数
SearchClassthe class that has changed parents
InNewParentClassif non-null force reparenting to this instead of the SuperClass
返回
true if SearchClass was successfully moved to the new location

◆ FindNode()

const FClassTree * FClassTree::FindNode ( UClass *  SearchClass) const
inline

Find the node associated with the class specified

参数
SearchClassthe class to search for
返回
a pointer to the node associated with the class specified, or NULL if this branch doesn't contain that class

◆ GenerateMaskedClassTree()

template<class Comparator >
FClassTree * FClassTree::GenerateMaskedClassTree ( const Comparator &  Mask) const
inline

Creates a new class tree rooted at this node's class, which contains only classes which match the class flags specified.

参数
Maskinformation about the types of classes to include. Must implement bool IsValidClass(const FClassTree* Node) const.
返回
a pointer to an FClassTree that contains only classes which match the parameters specified by MaskParams. If the class associated with this node does not meet the requirements of the MaskParams, the return value is a NULL pointer, and the class tree will not contain any of the children of that class. NOTE: the caller is responsible for deleting the FClassTree returned by this function!!

◆ GetChildClasses() [1/3]

void FClassTree::GetChildClasses ( TArray< const FClassTree * > &  ChildClasses,
bool  bRecurse = false 
) const
inline

Retrieve the child nodes of this node

参数
ChildClasses[out] this node's children
bRecurseif false, only direct children of this node's class will be considered

◆ GetChildClasses() [2/3]

void FClassTree::GetChildClasses ( TArray< FClassTree * > &  ChildClasses,
bool  bRecurse = false 
)
inline

Retrieve the child nodes of this node

参数
ChildClasses[out] this node's children
bRecurseif false, only direct children of this node's class will be considered

◆ GetChildClasses() [3/3]

template<class Comparator >
void FClassTree::GetChildClasses ( TArray< UClass * > &  ChildClasses,
const Comparator &  Mask,
bool  bRecurse = false 
) const
inline

Retrieve the child nodes of this node that match the flags specified

参数
ChildClasses[out] array of child classes with class flags matching the flags specified
Maskinfo on how to determine whether classes are included in the results. Must implement bool IsValidClass(const FClassTree* Node) const.
bRecurseif false, only direct children of this node's class will be considered

◆ GetClass()

UClass * FClassTree::GetClass ( ) const
inline

Get the class associated with this node

返回
a pointer to the class associated with this node

◆ GetNode()

FClassTree * FClassTree::GetNode ( UClass *  SearchClass)
inline

Find the node associated with the class specified

参数
SearchClassthe class to search for
返回
a pointer to the node associated with the class specified, or NULL if this branch doesn't contain that class

◆ Num()

int32 FClassTree::Num ( ) const
inline

Get the number of classes represented by this node, including any child nodes

返回
the number of classes represented by this node, including any child nodes

◆ NumChildren()

FORCEINLINE int32 FClassTree::NumChildren ( ) const
inline

Get the number of child nodes of this node

返回
the number of child nodes of this node

该类的文档由以下文件生成: