Fawkes API
Fawkes Development Version
|
BlackBoard instance factory. More...
#include <>>
Public Member Functions | |
BlackBoardInstanceFactory () | |
Constructor. More... | |
~BlackBoardInstanceFactory () | |
Destructor. More... | |
Interface * | new_interface_instance (const char *type, const char *identifier) |
Creates a new interface instance. More... | |
void | delete_interface_instance (Interface *interface) |
Destroy an interface instance. More... | |
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 47 of file instance_factory.cpp.
fawkes::BlackBoardInstanceFactory::~BlackBoardInstanceFactory | ( | ) |
Destructor.
Definition at line 54 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 117 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(), fawkes::RemoteBlackBoard::try_aliveness_restore(), and fawkes::BlackBoardInterfaceManager::~BlackBoardInterfaceManager().
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 71 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 fawkes::RemoteBlackBoard::try_aliveness_restore(), and fawkes::BlackBoardInterfaceManager::~BlackBoardInterfaceManager().