SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
Classes | Public Member Functions | List of all members
ai::LUATreeLoader Class Reference

Implementation of ITreeLoader that gets its data from a lua script. More...

#include <LUATreeLoader.h>

Inheritance diagram for ai::LUATreeLoader:
[legend]
Collaboration diagram for ai::LUATreeLoader:
[legend]

Public Member Functions

 LUATreeLoader (const IAIFactory &aiFactory)
 
bool init (const std::string &luaString)
 this will initialize the loader once with all the defined behaviours from the given lua string.
 
- Public Member Functions inherited from ai::ITreeLoader
 ITreeLoader (const IAIFactory &aiFactory)
 
void shutdown ()
 
const IAIFactorygetAIFactory () 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.
 

Additional Inherited Members

- Protected Types inherited from ai::ITreeLoader
typedef std::map< std::string,
TreeNodePtr > 
TreeMap
 
- Protected Member Functions inherited from ai::ITreeLoader
void resetError ()
 
- Protected Attributes inherited from ai::ITreeLoader
const IAIFactory_aiFactory
 
TreeMap _treeMap
 
ReadWriteLock _lock = {"treeloader"}
 

Detailed Description

Implementation of ITreeLoader that gets its data from a lua script.


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