25 #ifndef PLUMA_PLUMA_HPP
26 #define PLUMA_PLUMA_HPP
31 #include <Pluma/Config.hpp>
32 #include <Pluma/Provider.hpp>
33 #include <Pluma/PluginManager.hpp>
38 #define PLUMA_2STRING(X) #X
44 #define PLUMA_PROVIDER_HEADER(TYPE)\
45 PLUMA_PROVIDER_HEADER_BEGIN(TYPE)\
46 virtual TYPE* create() const = 0;\
47 PLUMA_PROVIDER_HEADER_END
52 #define PLUMA_PROVIDER_HEADER_BEGIN(TYPE)\
53 class TYPE##Provider: public pluma::Provider{\
55 friend class pluma::Pluma;\
56 static const unsigned int PLUMA_INTERFACE_VERSION;\
57 static const unsigned int PLUMA_INTERFACE_LOWEST_VERSION;\
58 static const std::string PLUMA_PROVIDER_TYPE;\
59 std::string plumaGetType() const{ return PLUMA_PROVIDER_TYPE; }\
61 unsigned int getVersion() const{ return PLUMA_INTERFACE_VERSION; }
66 #define PLUMA_PROVIDER_HEADER_END };
71 #define PLUMA_PROVIDER_SOURCE(TYPE, Version, LowestVersion)\
72 const std::string TYPE##Provider::PLUMA_PROVIDER_TYPE = PLUMA_2STRING( TYPE );\
73 const unsigned int TYPE##Provider::PLUMA_INTERFACE_VERSION = Version;\
74 const unsigned int TYPE##Provider::PLUMA_INTERFACE_LOWEST_VERSION = LowestVersion;
81 #define PLUMA_INHERIT_PROVIDER(SPECIALIZED_TYPE, BASE_TYPE)\
82 class SPECIALIZED_TYPE##Provider: public BASE_TYPE##Provider{\
84 BASE_TYPE * create() const{ return new SPECIALIZED_TYPE (); }\
114 template<
typename Prov
iderType>
127 template<
typename Prov
iderType>
128 void getProviders(std::vector<ProviderType*>& providers);
131 #include <Pluma/Pluma.inl>
136 #endif // PLUMA_PLUMA_HPP
Pluma plugins management.
void getProviders(std::vector< ProviderType * > &providers)
Get the stored providers of a certain type.
void acceptProviderType()
Tell Pluma to accept a certain type of providers.
Pluma()
Default Constructor.