#ifndef __CPPLUGINS__INTERFACE__INTERFACE__H__ #define __CPPLUGINS__INTERFACE__INTERFACE__H__ #include #include #include #include #include #include // Some forward declarations namespace pluma { class Pluma; } namespace cpPlugins { namespace Interface { // Some forward declarations class ProcessObjectProvider; /** */ class cpPlugins_Interface_EXPORT Interface { public: typedef Interface Self; typedef std::vector< ProcessObjectProvider* > TProviders; typedef std::map< std::string, unsigned int > TClass; typedef std::map< std::string, TClass > TClasses; typedef std::map< std::string, std::vector< std::string > > TLoadedPlugins; typedef TProviders::const_iterator TProvidersIterator; typedef TClasses::const_iterator TClassesIterator; public: Interface( ); virtual ~Interface( ); bool LoadDefaultConfiguration( const std::string& path ); bool SaveDefaultConfiguration( const std::string& path ); // Plugin access TClasses& GetClasses( ); const TClasses& GetClasses( ) const; TLoadedPlugins& GetLoadedPlugins( ); const TLoadedPlugins& GetLoadedPlugins( ) const; ProcessObject::Pointer CreateObject( const std::string& name ) const; // Interface to PLUMA bool Load( const std::string& path ); bool Load( const std::string& folder, const std::string& name ); bool LoadFromFolder( const std::string& folder, bool r = false ); bool Unload( const std::string& name ); void UnloadAll( ); bool IsLoaded( const std::string& name ) const; protected: void _LoadClasses( ); static void _SepFName( const std::string& path, std::string& folder, std::string& name ); protected: pluma::Pluma* m_Pluma; TProviders m_Providers; TClasses m_Classes; TLoadedPlugins m_LoadedPlugins; }; } // ecapseman } // ecapseman #endif // __CPPLUGINS__INTERFACE__INTERFACE__H__ // eof - $RCSfile$