Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
IvtPluginsManager.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Tristan Mehamli (Sep 2011)
22** Modified by : Jean Paul Digeon (Sep 2011)
23**=======================================================================*/
24#ifndef IVT_PLUGINS_MANAGER_H
25#define IVT_PLUGINS_MANAGER_H
26
28//
29// Class: IvtPluginsManager
30//
32
33#include <IvTune/IvTuneExtender/IvtLibName.h>
34
35#include <Inventor/SbString.h>
36
37#include <Inventor/STL/list>
38#include <Inventor/STL/map>
39#include <Inventor/STL/pair>
40#include <Inventor/STL/string>
41
42#include <QObject>
43#include <QtXml/QDomElement>
44
45#ifdef _WIN32
46# if !defined(IvTuneExtenderAPI_EXPORTS)
47# ifndef OIV_DISABLE_AUTOLINK
48# pragma comment(lib,__IVTUNEEXTENDERAPILIB)
49# endif
50# endif
51#endif //win
52
53class IvtPlugin;
54class IvtProfile;
56
72class IvtPluginsManager : public QObject
73{
74 Q_OBJECT
75public:
76
83 void addProfile( IvtProfile* profile );
84
89
96
100 const std::list< IvtPlugin* >& getPlugins() const;
101
106
113
117 const std::list<IvtProfile*>& getProfilesList() const;
118
125 IvtPlugin* loadPlugin( const SbString& path, const SbString& fileName );
126
133 void read( const SbString& configFilePath, bool isPath = true );
134
139 static void releaseInstance();
140
146 void removeProfile( IvtProfile* profile );
147
154 void setActiveProfile( IvtProfile* profile );
155
161 void unloadPlugin( IvtPlugin* plugin );
162
167
173 void write( const SbString& configFilePath );
174
179
180private:
183
185 void readControlledExtension ( QDomElement& controlledExtension, IvtProfileSetting* s);
186
188 void writeControlledExtension( QDomDocument& doc, QDomElement& extension, IvtProfileSetting* setting );
189
191 std::list< IvtPlugin*> m_pluginsInstances;
192
194 IvtProfile* m_defaultProfile;
195
197 IvtProfile* m_activeProfile;
198
200 std::list<IvtProfile*> m_profiles;
201
203 static IvtPluginsManager* m_instance;
204};
205
206#endif // IVT_PLUGINS_MANAGER_H
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base class for i...
Definition IvtPlugin.h:80
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class that manag...
const std::list< IvtProfile * > & getProfilesList() const
Returns the profiles list.
static IvtPluginsManager * getInstance()
Returns an instance of this plug-ins manager.
void removeProfile(IvtProfile *profile)
Remove the given profile from the list of managed profiles.
IvtProfile * getProfileByName(const SbString &name)
Returns a profile given its name.
IvtPlugin * getPluginByName(const SbString &name)
Returns a plug-in given its name.
const std::list< IvtPlugin * > & getPlugins() const
Returns the loaded plug-ins list.
void addProfile(IvtProfile *profile)
Add the specified profile to the list of profiles managed by this plug-in manager.
IvtProfile * getActiveProfile() const
Returns the active profile.
~IvtPluginsManager()
Destructor.
void write(const SbString &configFilePath)
Write the current configuration to the specified file.
void read(const SbString &configFilePath, bool isPath=true)
Read the configuration file, load plug-ins and extensions, and set up the profiles.
void unloadAllPlugins()
Unload all the loaded plug-ins.
void setActiveProfile(IvtProfile *profile)
Set the given profile to be the active profile.
void unloadPlugin(IvtPlugin *plugin)
Unload the specified plug-in.
IvtPlugin * loadPlugin(const SbString &path, const SbString &fileName)
Load the specified plug-in and return a pointer to it.
static void releaseInstance()
Release the current instance of this plug-ins manager.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Configuration pr...
Definition IvtProfile.h:69
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> IvTune extension...
Class for smart character strings.
Definition SbString.h:202