ADTF File Library
Loading...
Searching...
No Matches
adtf_file::Objects Class Reference

container for objects. this object container can be retrieved as objects singleton of the library via getObjects More...

#include <object.h>

Inheritance diagram for adtf_file::Objects:
[legend]
Collaboration diagram for adtf_file::Objects:
[legend]

Public Member Functions

 Objects ()
 CTOR.
 
 Objects (const Objects &)=delete
 
 Objects (Objects &&)=delete
 
template<typename OBJECT_TYPE>
std::vector< std::shared_ptr< OBJECT_TYPE > > getAllOfType () const
 Get the All Of Type of type OBJECT_TYPE.
 
void loadPlugin (const std::string &file_name)
 Load a plugin.
 
void loadPlugin (const std::string &file_name, Logger *plugin_logger)
 Load a plugin.
 
void unloadPlugin (const std::string &file_name)
 Unload a plugin.
 

Detailed Description

container for objects. this object container can be retrieved as objects singleton of the library via getObjects

Member Function Documentation

◆ getAllOfType()

template<typename OBJECT_TYPE>
std::vector< std::shared_ptr< OBJECT_TYPE > > adtf_file::Objects::getAllOfType ( ) const
inline

Get the All Of Type of type OBJECT_TYPE.

Template Parameters
OBJECT_TYPEthe type to check for
Returns
a vector of objects with all found object of type OBJECT_TYPE

◆ loadPlugin() [1/2]

void adtf_file::Objects::loadPlugin ( const std::string & file_name)

Load a plugin.

This will pass on the currently active logger instance to the plugin.

Parameters
file_namethe file name or path of the plugin.

◆ loadPlugin() [2/2]

void adtf_file::Objects::loadPlugin ( const std::string & file_name,
Logger * plugin_logger )

Load a plugin.

Parameters
file_namethe file name or path of the plugin.
plugin_loggerthe logger instance passed to the loaded plugin.

◆ unloadPlugin()

void adtf_file::Objects::unloadPlugin ( const std::string & file_name)

Unload a plugin.

Parameters
file_namethe file name or path of the plugin
Note
This needs to match the string that was passed to loadPlugin() exactly.

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