1 #ifndef __CPPLUGINS__INTERFACE__INTERFACE__H__
2 #define __CPPLUGINS__INTERFACE__INTERFACE__H__
7 #include <Pluma/Pluma.hpp>
9 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
10 #include <cpPlugins/Interface/Object.h>
18 class cpPlugins_Interface_EXPORT Interface
21 typedef std::vector< ObjectProvider* > TProviders;
22 typedef std::map< std::string, unsigned int > TClasses;
24 typedef TProviders::const_iterator TProvidersIterator;
25 typedef TClasses::const_iterator TClassesIterator;
29 virtual ~Interface( );
32 TClasses& GetClasses( );
33 const TClasses& GetClasses( ) const;
34 Object* CreateObject( const std::string& name ) const;
36 /// Interface to PLUMA
37 bool Load( const std::string& path );
38 bool Load( const std::string& folder, const std::string& name );
39 int LoadFromFolder( const std::string& folder, bool r = false );
40 bool Unload( const std::string& name );
42 void GetLoadedPlugins( std::vector< const std::string* >& names ) const;
43 bool IsLoaded( const std::string& name ) const;
50 TProviders m_Providers;
58 #endif // __CPPLUGINS__INTERFACE__INTERFACE__H__