Ember
Loading...
Searching...
No Matches
ITreeFactory.h
Go to the documentation of this file.
1#pragma once
2
3#include "ITreeNode.h"
4#include "ITreeStructure.h"
5#include <memory>
6
7namespace EmberCore {
8
17 public:
18 virtual ~ITreeFactory() = default;
19
25 virtual std::shared_ptr<ITreeStructure> CreateTree(const String &name = "New Tree") = 0;
26
33 virtual std::shared_ptr<ITreeNode> CreateNode(const String &name, ITreeNode::NodeType type) = 0;
34
39 virtual std::shared_ptr<ITreeStructure> CreateSampleTree() = 0;
40
45 virtual String GetFactoryName() const = 0;
46
51 virtual String GetFactoryVersion() const = 0;
52
58 virtual bool SupportsFeature(const String &feature_name) const = 0;
59};
60
61} // namespace EmberCore
Abstract factory interface for creating behavior tree implementations.
virtual std::shared_ptr< ITreeStructure > CreateTree(const String &name="New Tree")=0
Create a new empty behavior tree.
virtual std::shared_ptr< ITreeStructure > CreateSampleTree()=0
Create a sample behavior tree for testing.
virtual String GetFactoryName() const =0
Get the name of this factory implementation.
virtual ~ITreeFactory()=default
virtual std::shared_ptr< ITreeNode > CreateNode(const String &name, ITreeNode::NodeType type)=0
Create a new node.
virtual bool SupportsFeature(const String &feature_name) const =0
Check if this factory supports a specific feature.
virtual String GetFactoryVersion() const =0
Get the version of this factory implementation.
NodeType
Node types for visualization categorization.
Definition ITreeNode.h:36
Main types header for EmberCore.
std::string String
Framework-agnostic string type.
Definition String.h:14