Behaviour module factory.
More...
#include <BehaviourModules.h>
|
enum | ModuleType { kNone = -1
, kNative = 0
, kScript = 1
} |
|
typedef BehaviourModule *(* | creatorFn) (const std::string ¶meter) |
|
Behaviour module factory.
Factory used to create Behaviour modules.
◆ createBehaviourModule()
AtomsPtr<BehaviourModule> Atoms::BehaviourModules::createBehaviourModule |
( |
const std::string & |
name | ) |
|
Creates a behaviour module.
- Parameters
-
name | behaviour module type name |
- Returns
- Smart pointer to the behaviour module created
◆ createBehaviourModuleRawPtr()
BehaviourModule* Atoms::BehaviourModules::createBehaviourModuleRawPtr |
( |
const std::string & |
name | ) |
|
Creates a behaviour module.
- Parameters
-
name | behaviour module type name |
- Returns
- Raw pointer to the behaviour module created
◆ deregisterBehaviourModule()
bool Atoms::BehaviourModules::deregisterBehaviourModule |
( |
const std::string & |
name | ) |
|
Deregisters a Behaviour module type from the factory.
- Parameters
-
- Returns
- True if the module is removed from the map
◆ getBehaviourModuleCategory()
const std::string Atoms::BehaviourModules::getBehaviourModuleCategory |
( |
const std::string & |
moduleName | ) |
|
Gets a registered behaviour category.
- Returns
- String representing the module category, the string will be empty if this module has no category
◆ getRegisteredBehaviourModules()
std::vector<std::string> Atoms::BehaviourModules::getRegisteredBehaviourModules |
( |
| ) |
|
Gets all registered behaviour modules.
- Returns
- List of all behaviour module registered
◆ isRegistered()
bool Atoms::BehaviourModules::isRegistered |
( |
const std::string & |
name | ) |
|
Check if a behaviour module is registered.
- Parameters
-
- Returns
- Return true if the behaviour module is already registered
◆ registerBehaviourModule()
bool Atoms::BehaviourModules::registerBehaviourModule |
( |
const std::string & |
moduleName, |
|
|
creatorFn |
func, |
|
|
unsigned int |
moduleType = kNative , |
|
|
bool |
replace = false , |
|
|
const std::string |
category = "" |
|
) |
| |
Registers a behaviour module in the factory.
- Parameters
-
name | Behavioir module name |
func | creator function |
replace | Replace module if it already exists |
- Returns
- True if the module is added to the map
The documentation for this class was generated from the following file: