Ember
Loading...
Searching...
No Matches
EmberCore::ITreeFactory Class Referenceabstract

Abstract factory interface for creating behavior tree implementations. More...

#include <ITreeFactory.h>

Inheritance diagram for EmberCore::ITreeFactory:
EmberCore::DefaultTreeFactory

Public Member Functions

virtual ~ITreeFactory ()=default
virtual std::shared_ptr< ITreeStructureCreateTree (const String &name="New Tree")=0
 Create a new empty behavior tree.
virtual std::shared_ptr< ITreeNodeCreateNode (const String &name, ITreeNode::NodeType type)=0
 Create a new node.
virtual std::shared_ptr< ITreeStructureCreateSampleTree ()=0
 Create a sample behavior tree for testing.
virtual String GetFactoryName () const =0
 Get the name of this factory implementation.
virtual String GetFactoryVersion () const =0
 Get the version of this factory implementation.
virtual bool SupportsFeature (const String &feature_name) const =0
 Check if this factory supports a specific feature.

Detailed Description

Abstract factory interface for creating behavior tree implementations.

This interface allows the system to create different behavior tree implementations (current implementation, BehaviorTree.CPP, etc.) while maintaining the same abstract interface for the visualization system.

Definition at line 16 of file ITreeFactory.h.

Constructor & Destructor Documentation

◆ ~ITreeFactory()

virtual EmberCore::ITreeFactory::~ITreeFactory ( )
virtualdefault

Member Function Documentation

◆ CreateNode()

virtual std::shared_ptr< ITreeNode > EmberCore::ITreeFactory::CreateNode ( const String & name,
ITreeNode::NodeType type )
pure virtual

Create a new node.

Parameters
nameName of the node
typeType of the node
Returns
Shared pointer to the tree node interface

Implemented in EmberCore::DefaultTreeFactory.

◆ CreateSampleTree()

virtual std::shared_ptr< ITreeStructure > EmberCore::ITreeFactory::CreateSampleTree ( )
pure virtual

Create a sample behavior tree for testing.

Returns
Shared pointer to the tree structure interface

Implemented in EmberCore::DefaultTreeFactory.

◆ CreateTree()

virtual std::shared_ptr< ITreeStructure > EmberCore::ITreeFactory::CreateTree ( const String & name = "New Tree")
pure virtual

Create a new empty behavior tree.

Parameters
nameName of the tree
Returns
Shared pointer to the tree structure interface

Implemented in EmberCore::DefaultTreeFactory.

◆ GetFactoryName()

virtual String EmberCore::ITreeFactory::GetFactoryName ( ) const
pure virtual

Get the name of this factory implementation.

Returns
String identifying the implementation

Implemented in EmberCore::DefaultTreeFactory.

◆ GetFactoryVersion()

virtual String EmberCore::ITreeFactory::GetFactoryVersion ( ) const
pure virtual

Get the version of this factory implementation.

Returns
Version string

Implemented in EmberCore::DefaultTreeFactory.

◆ SupportsFeature()

virtual bool EmberCore::ITreeFactory::SupportsFeature ( const String & feature_name) const
pure virtual

Check if this factory supports a specific feature.

Parameters
feature_nameName of the feature to check
Returns
True if the feature is supported

Implemented in EmberCore::DefaultTreeFactory.


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