Elaztek Developer Hub
Blamite Game Engine - Sapien (Library)  00433.02.16.25.2127.blamite
The level editor application for the Blamite Game Engine.
BlamScenarioHierarchyNode_Group Class Reference

Class representing a group hierarchy node. More...

#include <hierarchy.h>

+ Inheritance diagram for BlamScenarioHierarchyNode_Group:
+ Collaboration diagram for BlamScenarioHierarchyNode_Group:

Public Member Functions

 BlamScenarioHierarchyNode_Group (std::string group_name, int _folder_id)
 Constructs a new hierarchy group node. More...
 
 ~BlamScenarioHierarchyNode_Group ()
 
void ReleaseData ()
 Releases any data used by this node. More...
 
void AddChild (BlamScenarioHierarchyNode *node)
 Adds a new item to this group node. More...
 
BlamScenarioHierarchyNodeGetChildAt (int index)
 Retrieves the child node at the specified index. More...
 
int GetChildCount ()
 Retrieves the total number of child nodes. More...
 
void RemoveNodeAt (int index, bool delete_object=true)
 Removes the child node at the specified index. More...
 
void RemoveNode (BlamScenarioHierarchyNode *node, bool delete_object=true)
 Removes a specific child node from this group. More...
 
bool HasChild (BlamScenarioHierarchyNode *node)
 Checks whether or not a node is a direct child of this node. More...
 
std::vector< BlamScenarioHierarchyNode_Object * > GetAllObjectNodes ()
 Generates a list of all object nodes, within any child nodes. More...
 
- Public Member Functions inherited from BlamScenarioHierarchyNode
 BlamScenarioHierarchyNode (BlamScenarioHierarchyNodeType _node_type)
 Constructs a new scenario hierarchy node. More...
 
 BlamScenarioHierarchyNode (BlamScenarioHierarchyNodeType _node_type, std::string _display_name_override)
 Constructs a new scenario hierarchy node. More...
 
virtual ~BlamScenarioHierarchyNode ()
 
BlamScenarioHierarchyNodeType GetType ()
 Retrieves the type of this node. More...
 
virtual std::string GetName ()
 Retrieves the display name of the hierarchy node. More...
 

Public Attributes

int folder_id = -1
 The folder ID of this group. This number should be unique within the hierarchy. More...
 
- Public Attributes inherited from BlamScenarioHierarchyNode
BlamScenarioHierarchyNodeparent_node = nullptr
 The parent node, if any, of this hierarchy node. More...
 

Additional Inherited Members

- Protected Attributes inherited from BlamScenarioHierarchyNode
bool use_custom_name = false
 Whether or not to use a custom display name for the node. More...
 
std::string display_name_override = "unspecified"
 The custom display name of this hierarchy node. More...
 

Detailed Description

Class representing a group hierarchy node.

Groups act as folders, allowing for better organization of objects within the hierarchy.

Constructor & Destructor Documentation

◆ BlamScenarioHierarchyNode_Group()

BlamScenarioHierarchyNode_Group::BlamScenarioHierarchyNode_Group ( std::string  group_name,
int  _folder_id 
)

Constructs a new hierarchy group node.

Parameters
group_name- The name of this group.
_folder_id- The folder ID of this group.

◆ ~BlamScenarioHierarchyNode_Group()

BlamScenarioHierarchyNode_Group::~BlamScenarioHierarchyNode_Group ( )
+ Here is the call graph for this function:

Member Function Documentation

◆ AddChild()

void BlamScenarioHierarchyNode_Group::AddChild ( BlamScenarioHierarchyNode node)

Adds a new item to this group node.

Parameters
node- The new child node to add.
+ Here is the caller graph for this function:

◆ GetAllObjectNodes()

std::vector< BlamScenarioHierarchyNode_Object * > BlamScenarioHierarchyNode_Group::GetAllObjectNodes ( )

Generates a list of all object nodes, within any child nodes.

Returns
A list of all object nodes within this node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChildAt()

BlamScenarioHierarchyNode * BlamScenarioHierarchyNode_Group::GetChildAt ( int  index)

Retrieves the child node at the specified index.

Parameters
index- The index of the desired child node.
Returns
The child node at the specified index, or nullptr if the index was out of range.
+ Here is the caller graph for this function:

◆ GetChildCount()

int BlamScenarioHierarchyNode_Group::GetChildCount ( )

Retrieves the total number of child nodes.

Returns
The total number of child nodes.
+ Here is the caller graph for this function:

◆ HasChild()

bool BlamScenarioHierarchyNode_Group::HasChild ( BlamScenarioHierarchyNode node)

Checks whether or not a node is a direct child of this node.

Parameters
node- The child node to check.
Returns
true if the specified node is a direct child of this node, otherwise returns false.
+ Here is the caller graph for this function:

◆ ReleaseData()

void BlamScenarioHierarchyNode_Group::ReleaseData ( )

Releases any data used by this node.

This will also release the data used by any and all child nodes.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveNode()

void BlamScenarioHierarchyNode_Group::RemoveNode ( BlamScenarioHierarchyNode node,
bool  delete_object = true 
)

Removes a specific child node from this group.

Note
If node is not nullptr and delete_object is set to true, then the provided node will be deleted - regardless of if it is a child of this node or not.
Parameters
node- The node to remove.
delete_object- Whether or not to delete the node data itself.
+ Here is the caller graph for this function:

◆ RemoveNodeAt()

void BlamScenarioHierarchyNode_Group::RemoveNodeAt ( int  index,
bool  delete_object = true 
)

Removes the child node at the specified index.

If the specified index was out of range, then no operations are performed.

Parameters
index- The index of the child to remove.
delete_object- Whether or not to delete the node data itself.

Member Data Documentation

◆ folder_id

int BlamScenarioHierarchyNode_Group::folder_id = -1

The folder ID of this group. This number should be unique within the hierarchy.


The documentation for this class was generated from the following files: