BlackBoard instance factory. More...
#include <>>
Public Member Functions | |
BlackBoardInstanceFactory () | |
Constructor. | |
~BlackBoardInstanceFactory () | |
Destructor. | |
Interface * | new_interface_instance (const char *type, const char *identifier) |
Creates a new interface instance. | |
void | delete_interface_instance (Interface *interface) |
Destroy an interface instance. |
BlackBoard instance factory.
This class is used to interact with the interface shared object to create and delete interface instances.
Definition at line 36 of file instance_factory.h.
fawkes::BlackBoardInstanceFactory::BlackBoardInstanceFactory | ( | ) |
Constructor.
Definition at line 48 of file instance_factory.cpp.
References fawkes::ModuleManagerFactory::getInstance(), and fawkes::ModuleManagerFactory::MMT_DL.
fawkes::BlackBoardInstanceFactory::~BlackBoardInstanceFactory | ( | ) |
Destructor.
Definition at line 55 of file instance_factory.cpp.
void fawkes::BlackBoardInstanceFactory::delete_interface_instance | ( | Interface * | interface | ) |
Destroy an interface instance.
The destroyer function for the given interface is called to destroy the given interface instance.
interface | to destroy |
BlackBoardInterfaceNotFoundException | thrown if the destroyer function for the given interface could not be found. The interface will not be freed. |
Definition at line 103 of file instance_factory.cpp.
References fawkes::ModuleManager::close_module(), fawkes::ModuleManager::get_module(), fawkes::ModuleManager::get_module_file_extension(), fawkes::Module::get_symbol(), fawkes::Module::has_symbol(), and fawkes::Module::unref().
Referenced by fawkes::RemoteBlackBoard::close(), BBLogFile::set_interface(), and BBLogFile::~BBLogFile().
Interface * fawkes::BlackBoardInstanceFactory::new_interface_instance | ( | const char * | type, | |
const char * | identifier | |||
) |
Creates a new interface instance.
This method will look in the for the appropriate library in LIBDIR/interfaces and then use the factory function for the interface of the given type. If this was found a new instance of the interface is returned.
type | type of the interface | |
identifier | identifier of the interface |
BlackBoardInterfaceNotFoundException | thrown if the factory function for the given interface type could not be found |
Definition at line 72 of file instance_factory.cpp.
References fawkes::ModuleManager::get_module_file_extension(), fawkes::Module::get_symbol(), fawkes::Module::has_symbol(), and fawkes::ModuleManager::open_module().
Referenced by BBLogFile::BBLogFile().