This class must be extended to load behaviour trees. The contract here is that the parsing only happens once (of course) and then ITreeLoader::getTrees
and ITreeLoader::load
will just access the cached data.
More...
#include <ITreeLoader.h>
|
| ITreeLoader (const IAIFactory &aiFactory) |
|
void | shutdown () |
|
const IAIFactory & | getAIFactory () const |
|
void | getTrees (std::vector< std::string > &trees) const |
| Fill the given vector with the loaded behaviour tree names.
|
|
bool | addTree (const std::string &name, const TreeNodePtr &root) |
| Register a new TreeNode as behaviour tree with the specified name . More...
|
|
TreeNodePtr | load (const std::string &name) |
| Loads on particular behaviour tree.
|
|
void | setError (const char *msg,...) __attribute__((format(printf |
|
void std::string | getError () const |
| Gives access to the last error state of the ITreeLoader .
|
|
|
typedef std::map< std::string,
TreeNodePtr > | TreeMap |
|
This class must be extended to load behaviour trees. The contract here is that the parsing only happens once (of course) and then ITreeLoader::getTrees
and ITreeLoader::load
will just access the cached data.
bool ai::ITreeLoader::addTree |
( |
const std::string & |
name, |
|
|
const TreeNodePtr & |
root |
|
) |
| |
|
inline |
Register a new TreeNode
as behaviour tree with the specified name
.
- Parameters
-
name | The name to register the given root node under |
root | The TreeNode that will act as behaviour tree root node |
- Returns
true
if the registration process went fine, false
otherwise (there is already a behaviour tree registered with the same name or the given root node is invalid.
The documentation for this class was generated from the following file:
- /home/travis/build/mgerhardy/simpleai/src/ai/tree/loaders/ITreeLoader.h