17 #ifndef ADTF_FILE_FACTORY_INCLUDED
18 #define ADTF_FILE_FACTORY_INCLUDED
35 virtual ~
Object() =
default;
42 class Objects:
public std::vector<std::shared_ptr<Object>>
55 template <
typename OBJECT_TYPE>
58 std::vector<std::shared_ptr<OBJECT_TYPE>> all_of_given_type;
59 for (
auto&
object: *
this)
61 auto object_of_given_type = std::dynamic_pointer_cast<OBJECT_TYPE>(
object);
62 if (object_of_given_type)
64 all_of_given_type.push_back(object_of_given_type);
68 return all_of_given_type;
87 template <
typename FACTORIES,
typename FACTORY_TYPE>
92 for (
auto& factory:
getObjects().getAllOfType<FACTORY_TYPE>())
94 factories.add(factory);
133 __declspec(dllimport)
134 bool adtfFileIsDebugPlugin();
143 __declspec(dllimport)
154 __declspec(dllimport)
base interface class for all available objects of the ADTF File Library that can be added to the obje...
Definition: object.h:33
container for objects. this object container can be retrieved as objects singleton of the library via...
Definition: object.h:43
std::vector< std::shared_ptr< OBJECT_TYPE > > getAllOfType() const
Get the All Of Type of type OBJECT_TYPE.
Definition: object.h:56
Plugin initializer class to use within a ADTF File Library plugin.
Definition: object.h:104
PluginInitializer(std::function< void()> initialization_callback)
CTOR.
namespace for ADTF File library
Definition: adtf2_adtf_core_media_sample_deserializer.h:25
FACTORIES getFactories()
Get the Factories from the objects singleton of the library.
Definition: object.h:88
void loadPlugin(const std::string &file_name)
Loads a ADTF File Library plugin.
Objects & getObjects()
Get the objects singleton of the library.
const char * adtfFileGetVersion()
retrieves the ADTF File Library plugin version
void adtfFileSetObjects2(adtf_file::Objects &objects)
sets the objects singleton of the calling application to the plugin