);
// Slots <-> signals
- _QT_CONNECT_ACTION( Open );
- _QT_CONNECT_ACTION( Save );
- _QT_CONNECT_ACTION( Close );
- _QT_CONNECT_ACTION( LoadPluginFile );
- _QT_CONNECT_ACTION( LoadPluginDirectory );
- _QT_CONNECT_ACTION( ShowPlugins );
+ this->connect(
+ this->m_UI->ActionOpen, SIGNAL( triggered( ) ),
+ this, SLOT( _InteractiveLoadWorkspace( ) )
+ );
+ this->connect(
+ this->m_UI->ActionSave, SIGNAL( triggered( ) ),
+ this, SLOT( _InteractiveSaveWorkspace( ) )
+ );
+ // TODO: _QT_CONNECT_ACTION( Close );
+ this->connect(
+ this->m_UI->ActionLoadPluginFile, SIGNAL( triggered( ) ),
+ this, SLOT( _InteractiveLoadPlugins( ) )
+ );
+ this->connect(
+ this->m_UI->ActionLoadPluginDirectory, SIGNAL( triggered( ) ),
+ this, SLOT( _InteractiveLoadPluginsFromPath( ) )
+ );
+ this->connect(
+ this->m_UI->ActionShowPlugins, SIGNAL( triggered( ) ),
+ this, SLOT( _ShowPlugins( ) )
+ );
+ this->connect(
+ this->m_UI->ActionAddEnvironmentPath, SIGNAL( triggered( ) ),
+ this, SLOT( _InteractiveAddEnviromentPaths( ) )
+ );
}
// -------------------------------------------------------------------------
delete this->m_UI;
}
-// -------------------------------------------------------------------------
-void PipelineEditorMainWindow::
-_ActionOpen( )
-{
- this->_InteractiveLoadWorkspace( );
-}
-
-// -------------------------------------------------------------------------
-void PipelineEditorMainWindow::
-_ActionSave( )
-{
- this->_InteractiveSaveWorkspace( );
-}
-
-// -------------------------------------------------------------------------
-void PipelineEditorMainWindow::
-_ActionClose( )
-{
-}
-
-// -------------------------------------------------------------------------
-void PipelineEditorMainWindow::
-_ActionLoadPluginFile( )
-{
- this->_InteractiveLoadPlugins( );
-}
-
-// -------------------------------------------------------------------------
-void PipelineEditorMainWindow::
-_ActionLoadPluginDirectory( )
-{
- this->_InteractiveLoadPluginsFromPath( );
-}
-
-// -------------------------------------------------------------------------
-void PipelineEditorMainWindow::
-_ActionShowPlugins( )
-{
- this->_ShowPlugins( );
-}
-
// eof - $RCSfile$
);
virtual ~PipelineEditorMainWindow( );
-protected slots:
- void _ActionOpen( );
- void _ActionSave( );
- void _ActionClose( );
- void _ActionLoadPluginFile( );
- void _ActionLoadPluginDirectory( );
- void _ActionShowPlugins( );
-
/*
void _ActionBackgroundMPR( );
void _ActionBackground3D( );
<addaction name="ActionLoadPluginDirectory"/>
<addaction name="separator"/>
<addaction name="ActionShowPlugins"/>
+ <addaction name="ActionAddEnvironmentPath"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuPlugins"/>
<string>Ctrl+Shift+S</string>
</property>
</action>
+ <action name="ActionAddEnvironmentPath">
+ <property name="text">
+ <string>&Manage enviroment paths</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+F9</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
cpPlugins::Interface interface;
try
{
- interface.LoadEnvironment( );
+ interface.LoadEnvironments( );
interface.GuessPlugins( );
}
catch( std::exception& err )
cpPlugins::Interface interface;
try
{
- interface.LoadEnvironment( );
+ interface.LoadEnvironments( );
interface.LoadDirectory( directory );
}
catch( std::exception& err )
cpPlugins::Interface interface;
try
{
- interface.LoadEnvironment( );
+ interface.LoadEnvironments( );
interface.LoadFile( library_file );
}
catch( std::exception& err )
cpPlugins::Interface interface;
try
{
- interface.LoadEnvironment( );
+ interface.LoadEnvironments( );
interface.LoadPlugin( plugin );
}
catch( std::exception& err )
cpPlugins::Interface interface;
try
{
- interface.LoadEnvironment( );
+ interface.LoadEnvironments( );
interface.GuessPlugins( );
}
catch( std::exception& err )
#include <cpExtensions/QT/SimpleMPRWidget.h>
#include <cpBaseQtApplication/ActorPropertiesQDialog.h>
#include <cpBaseQtApplication/Editor.h>
+#include <cpBaseQtApplication/PathsDialog.h>
#include <vtkRenderer.h>
#include <QApplication>
#include <QColorDialog>
if( i.exists( ) )
{
this->m_ExecutionPath = i.canonicalPath( ).toStdString( );
- try
- {
- this->m_Interface.OpenEnvironments( this->m_ExecutionPath );
- this->m_Interface.UpdateEnvironments( this->m_ExecutionPath );
- }
+ try { this->m_Interface.AddEnvironments( this->m_ExecutionPath ); }
+ catch( ... ) { }
+ try { this->m_Interface.OpenEnvironments( this->m_ExecutionPath ); }
+ catch( ... ) { }
+ try { this->m_Interface.SaveEnvironments( this->m_ExecutionPath ); }
catch( ... ) { }
}
else
this->m_ExecutionPath = "";
+ this->UpdateEnvironment( );
this->m_Workspace.SetInterface( &( this->m_Interface ) );
}
{
try
{
- this->m_Interface.LoadEnvironment( );
+ this->m_Interface.LoadEnvironments( );
this->m_Interface.GuessPlugins( );
}
catch( std::exception& err )
this->m_Workspace.Clear( );
}
+// -------------------------------------------------------------------------
+void cpBaseQtApplication::MainWindow::
+_AddEnvironments( const std::string& environments )
+{
+ try { this->m_Interface.AddEnvironments( environments ); }
+ catch( ... ) { }
+ try { this->m_Interface.SaveEnvironments( this->m_ExecutionPath ); }
+ catch( ... ) { }
+ this->UpdateEnvironment( );
+}
+
// -------------------------------------------------------------------------
void cpBaseQtApplication::MainWindow::
_LoadPlugins( const std::string& filename )
);
}
-// -------------------------------------------------------------------------
-void cpBaseQtApplication::MainWindow::
-_ShowPlugins( )
-{
- auto paths = this->m_Interface.GetPaths( );
- auto plugins = this->m_Interface.GetPlugins( );
- std::stringstream info;
- info << "----- PATHS -----" << std::endl;
- for( auto i = paths.begin( ); i != paths.end( ); ++i )
- info << " " << *i << std::endl;
- info << std::endl << "----- PLUGINS -----" << std::endl;
- for( auto i = plugins.begin( ); i != plugins.end( ); ++i )
- info << " " << *i << std::endl;
- QMessageBox::information(
- this,
- "Loaded libraries and plugins information",
- info.str( ).c_str( )
- );
-}
-
// -------------------------------------------------------------------------
void cpBaseQtApplication::MainWindow::
_Block( )
this->_LoadPluginsFromPath( d.selectedFiles( ).begin( )->toStdString( ) );
}
+// -------------------------------------------------------------------------
+void cpBaseQtApplication::MainWindow::
+_ShowPlugins( )
+{
+ auto paths = this->m_Interface.GetPaths( );
+ auto plugins = this->m_Interface.GetPlugins( );
+ std::stringstream info;
+ info << "----- PATHS -----" << std::endl;
+ for( auto i = paths.begin( ); i != paths.end( ); ++i )
+ info << " " << *i << std::endl;
+ info << std::endl << "----- PLUGINS -----" << std::endl;
+ for( auto i = plugins.begin( ); i != plugins.end( ); ++i )
+ info << " " << *i << std::endl;
+ QMessageBox::information(
+ this,
+ "Loaded libraries and plugins information",
+ info.str( ).c_str( )
+ );
+}
+
// -------------------------------------------------------------------------
void cpBaseQtApplication::MainWindow::
_InteractiveLoadWorkspace( )
this->_SaveWorkspace( dlg.selectedFiles( ).begin( )->toStdString( ) );
}
+// -------------------------------------------------------------------------
+void cpBaseQtApplication::MainWindow::
+_InteractiveAddEnviromentPaths( )
+{
+ PathsDialog dlg( this );
+ dlg.addPaths( this->m_Interface.GetPaths( ) );
+ if( dlg.exec( ) )
+ {
+ auto paths = dlg.getPaths( );
+ for( auto p = paths.begin( ); p != paths.end( ); ++p )
+ {
+ try { this->m_Interface.AddEnvironments( *p ); }
+ catch( ... ) { }
+
+ } // rof
+ this->UpdateEnvironment( );
+
+ } // fi
+}
+
// -------------------------------------------------------------------------
void cpBaseQtApplication::MainWindow::
_ExecFilter( const std::string& filter_name )
cpBaseQtApplication::Editor* editor
);
void _ClearWorkspace( );
+ void _AddEnvironments( const std::string& environments );
void _LoadPlugins( const std::string& filename );
void _LoadPluginsFromPath( const std::string& path );
void _UpdateLoadedPlugins( );
- void _ShowPlugins( );
void _Block( );
void _UnBlock( );
protected slots:
void _InteractiveLoadPlugins( );
void _InteractiveLoadPluginsFromPath( );
+ void _ShowPlugins( );
void _InteractiveLoadWorkspace( );
void _InteractiveSaveWorkspace( );
+ void _InteractiveAddEnviromentPaths( );
void _ExecFilter( const std::string& filter_name );
void _ShowData(
const std::string& filter_name, const std::string& output_name
--- /dev/null
+#include <cpBaseQtApplication/PathsDialog.h>
+
+#include <cpBaseQtApplication/ui_PathsDialog.h>
+#include <QFileDialog>
+
+// -------------------------------------------------------------------------
+cpBaseQtApplication::PathsDialog::
+PathsDialog( QWidget* parent, Qt::WindowFlags flags )
+ : QDialog( parent, flags ),
+ m_UI( new Ui::PathsDialog )
+{
+ this->m_UI->setupUi( this );
+ this->connect(
+ this->m_UI->AddButton, SIGNAL( clicked( ) ),
+ this, SLOT( _addPath( ) )
+ );
+ this->connect(
+ this->m_UI->RemoveButton, SIGNAL( clicked( ) ),
+ this, SLOT( _removePath( ) )
+ );
+}
+
+// -------------------------------------------------------------------------
+cpBaseQtApplication::PathsDialog::
+~PathsDialog( )
+{
+ delete this->m_UI;
+}
+
+// -------------------------------------------------------------------------
+void cpBaseQtApplication::PathsDialog::
+addPaths( const std::set< std::string >& paths )
+{
+ QStringList lst;
+ for( auto i = paths.begin( ); i != paths.end( ); ++i )
+ lst << i->c_str( );
+ this->m_UI->Paths->addItems( lst );
+}
+
+// -------------------------------------------------------------------------
+std::set< std::string > cpBaseQtApplication::PathsDialog::
+getPaths( ) const
+{
+ std::set< std::string > paths;
+ for( int c = 0; c < this->m_UI->Paths->count( ); ++c )
+ paths.insert( this->m_UI->Paths->item( c )->text( ).toStdString( ) );
+ return( paths );
+}
+
+// -------------------------------------------------------------------------
+void cpBaseQtApplication::PathsDialog::
+_addPath( )
+{
+ auto res =
+ QFileDialog::getExistingDirectory( this, "Choose a directory", "." );
+ if( res.toStdString( ) != "" )
+ this->m_UI->Paths->addItem( res );
+}
+
+// -------------------------------------------------------------------------
+void cpBaseQtApplication::PathsDialog::
+_removePath( )
+{
+ /* TODO
+ auto items = this->m_UI->Paths->selectedItems( );
+ if( items.size( ) == 1 )
+ this->m_UI->Paths->removeItemWidget( items[ 0 ] );
+ */
+}
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __CPBASEQTAPPLICATION__PATHSDIALOG__H__
+#define __CPBASEQTAPPLICATION__PATHSDIALOG__H__
+
+#include <cpBaseQtApplication_Export.h>
+#include <cpPlugins/Config.h>
+#include <set>
+#include <string>
+#include <QDialog>
+
+// -------------------------------------------------------------------------
+namespace Ui
+{
+ class PathsDialog;
+}
+
+// -------------------------------------------------------------------------
+namespace cpBaseQtApplication
+{
+ /**
+ */
+ class cpBaseQtApplication_EXPORT PathsDialog
+ : public QDialog
+ {
+ Q_OBJECT;
+
+ public:
+ explicit PathsDialog( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
+ virtual ~PathsDialog( );
+
+ void addPaths( const std::set< std::string >& paths );
+ std::set< std::string > getPaths( ) const;
+
+ protected slots:
+ void _addPath( );
+ void _removePath( );
+
+ protected:
+ Ui::PathsDialog* m_UI;
+ };
+
+} // ecapseman
+
+#endif // __CPBASEQTAPPLICATION__PATHSDIALOG__H__
+
+// eof - $RCSfile$
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PathsDialog</class>
+ <widget class="QDialog" name="PathsDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>1</number>
+ </property>
+ <property name="margin">
+ <number>1</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QListWidget" name="Paths"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="RemoveButton">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>25</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>-</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="AddButton">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>25</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>+</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>PathsDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>PathsDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
-#include <cpPlugins/LoadDynamicLibrariesFunctions.h>
+#include <cpPlugins/DLLManager.h>
#ifdef cpPlugins_SYS_WINDOWS
# include <Windows.h>
-#ifndef __CPPLUGINS__LOADDYNAMICLIBRARIESFUNCTIONS__H__
-#define __CPPLUGINS__LOADDYNAMICLIBRARIESFUNCTIONS__H__
+#ifndef __CPPLUGINS__DLLMANAGER__H__
+#define __CPPLUGINS__DLLMANAGER__H__
#include <cpPlugins/Config.h>
} // ecapseman
-#endif // __CPPLUGINS__LOADDYNAMICLIBRARIESFUNCTIONS__H__
+#endif // __CPPLUGINS__DLLMANAGER__H__
// eof - $RCSfile$
#include <cpPlugins/Interface.h>
#include <cpPlugins/Utilities.h>
-#include <cpPlugins/LoadDynamicLibrariesFunctions.h>
+#include <cpPlugins/DLLManager.h>
#include <cpPlugins/dirent.h>
#include <algorithm>
if( p != NULL )
str << p << cpPlugins_SEPARATOR;
str << ".";
- this->UpdateEnvironments( str.str( ) );
+ this->AddEnvironments( str.str( ) );
}
// -------------------------------------------------------------------------
}
// -------------------------------------------------------------------------
-const std::set< std::string >& cpPlugins::Interface::
+const cpPlugins::Interface::
+TStrings& cpPlugins::Interface::
GetPaths( ) const
{
return( this->m_Paths );
}
// -------------------------------------------------------------------------
-std::set< std::string > cpPlugins::Interface::
+cpPlugins::Interface::
+TStrings cpPlugins::Interface::
GetLibraries( ) const
{
- std::set< std::string > res;
+ TStrings res;
for(
auto i = this->m_Libraries.begin( ); i != this->m_Libraries.end( ); ++i
)
}
// -------------------------------------------------------------------------
-std::set< std::string > cpPlugins::Interface::
+cpPlugins::Interface::
+TStrings cpPlugins::Interface::
GetPlugins( ) const
{
- std::set< std::string > res;
+ TStrings res;
for( auto i = this->m_Plugins.begin( ); i != this->m_Plugins.end( ); ++i )
res.insert( i->first );
return( res );
}
// -------------------------------------------------------------------------
-std::set< std::string > cpPlugins::Interface::
+cpPlugins::Interface::
+TStrings cpPlugins::Interface::
GetCategories( ) const
{
- std::set< std::string > res;
+ TStrings res;
for( auto i = this->m_Filters.begin( ); i != this->m_Filters.end( ); ++i )
res.insert( i->first );
return( res );
}
// -------------------------------------------------------------------------
-std::set< std::string > cpPlugins::Interface::
+cpPlugins::Interface::
+TStrings cpPlugins::Interface::
GetFilters( const std::string& category ) const
{
- std::set< std::string > res;
+ TStrings res;
auto cIt = this->m_Filters.find( category );
if( cIt != this->m_Filters.end( ) )
- {
for( auto i = cIt->second.begin( ); i != cIt->second.end( ); ++i )
res.insert( i->first );
-
- } // rof
return( res );
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::
-UpdateEnvironments( const std::string& new_environment )
+AddEnvironments( const std::string& new_environment )
{
std::vector< std::string > tokens;
cpPlugins::TokenizeString( tokens, new_environment, cpPlugins_SEPARATOR );
for( auto i = tokens.begin( ); i != tokens.end( ); ++i )
{
- std::string dir = cpPlugins::CanonicalPath( *i );
- if( dir != "" )
- this->m_Paths.insert( dir );
+ std::stringstream dir;
+ dir << cpPlugins::CanonicalPath( *i );
+ if( dir.str( ) != "" )
+ {
+ if( !cpPlugins::IsPathSeparator( dir.str( ).back( ) ) )
+ dir << cpPlugins_PATH_SEPARATOR;
+ std::stringstream name;
+ name << dir.str( ) << cpPlugins_CONFIG;
+ std::ifstream check( name.str( ).c_str( ), std::ifstream::binary );
+ if( check )
+ this->m_Paths.insert( dir.str( ) );
+ check.close( );
+
+ } // fi
} // rof
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::
-LoadEnvironment( )
+LoadEnvironments( )
{
std::stringstream all_errors;
- for( auto i = this->m_Paths.begin( ); i != this->m_Paths.end( ); ++i )
+ for( auto d = this->m_Paths.begin( ); d != this->m_Paths.end( ); ++d )
{
- std::stringstream dir;
- dir << *i;
- if( !cpPlugins::IsPathSeparator( i->back( ) ) )
- dir << cpPlugins_PATH_SEPARATOR;
- std::string fname = dir.str( ) + std::string( cpPlugins_CONFIG );
- std::string config_file;
- if( cpPlugins::ReadFileIntoBuffer( config_file, fname ) )
+ std::stringstream name;
+ name << *d << cpPlugins_CONFIG;
+ std::string buffer;
+ if( cpPlugins::ReadFileIntoBuffer( buffer, name.str( ) ) )
{
- std::istringstream input( config_file );
+ std::istringstream input( buffer );
for( std::string line; std::getline( input, line ); )
{
std::vector< std::string > tokens;
if( tokens[ 0 ] == "local" )
library_file =
cpPlugins::CanonicalPath(
- dir.str( ) +
- std::string( cpPlugins_LIB_PREFIX ) +
- tokens[ 1 ] +
- std::string( "." ) +
+ *d + std::string( cpPlugins_LIB_PREFIX ) +
+ tokens[ 1 ] + std::string( "." ) +
std::string( cpPlugins_LIB_EXT )
);
else if( tokens[ 0 ] == "global" )
std::stringstream fname;
fname << dir;
- if( cpPlugins::IsPathSeparator( dir.back( ) ) )
+ if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
fname << cpPlugins_PATH_SEPARATOR;
- fname << cpPlugins_CONFIG;
- if( !( cpPlugins::WriteBufferToFile( buffer.str( ), fname.str( ) ) ) )
+ fname << cpPlugins_PATHS;
+ if( !cpPlugins::WriteBufferToFile( buffer.str( ), fname.str( ) ) )
throw std::runtime_error( "Error writing environment file." );
}
else
{
std::stringstream fname;
fname << dir;
- if( cpPlugins::IsPathSeparator( dir.back( ) ) )
+ if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
fname << cpPlugins_PATH_SEPARATOR;
- fname << cpPlugins_CONFIG;
+ fname << cpPlugins_PATHS;
std::string buffer;
if( cpPlugins::ReadFileIntoBuffer( buffer, fname.str( ) ) )
{
std::istringstream input( buffer );
+ std::stringstream paths;
for( std::string line; std::getline( input, line ); )
- this->m_Paths.insert( cpPlugins::CanonicalPath( line ) );
+ paths << line << cpPlugins_SEPARATOR;
+ this->AddEnvironments( paths.str( ) );
}
else
throw std::runtime_error( "Error opening environment file." );
{
for( auto i = this->m_Paths.begin( ); i != this->m_Paths.end( ); ++i )
{
- try
- {
- this->LoadDirectory( *i );
- }
- catch( ... )
- {
- } // yrt
+ try { this->LoadDirectory( *i ); }
+ catch( ... ) { }
} // rof
}
void* LibraryHandle;
TCreator Creator;
};
- typedef std::map< std::string, std::map< std::string, TCreatorData > > TFilters;
+ typedef std::map< std::string, TCreatorData > TFilterData;
+ typedef std::map< std::string, TFilterData > TFilters;
+ typedef std::set< std::string > TStrings;
public:
Interface( );
virtual ~Interface( );
- const std::set< std::string >& GetPaths( ) const;
- std::set< std::string > GetLibraries( ) const;
- std::set< std::string > GetPlugins( ) const;
- std::set< std::string > GetCategories( ) const;
- std::set< std::string > GetFilters( const std::string& category ) const;
+ const TStrings& GetPaths( ) const;
+ TStrings GetLibraries( ) const;
+ TStrings GetPlugins( ) const;
+ TStrings GetCategories( ) const;
+ TStrings GetFilters( const std::string& category ) const;
- void UpdateEnvironments( const std::string& new_environment );
- void LoadEnvironment( );
+ void AddEnvironments( const std::string& new_environment );
+ void LoadEnvironments( );
void SaveEnvironments( const std::string& dir ) const;
void OpenEnvironments( const std::string& dir );
);
protected:
- std::set< std::string > m_Paths;
+ TStrings m_Paths;
TLibraries m_Libraries;
TLibraries m_Plugins;
- TFilters m_Filters;
-
-
- /* TODO
- const TFilters& GetFilters( );
-
- void UpdatePaths( );
- void GuessAccesiblePlugins( );
- void LoadPlugin( const std::string& name );
- void LoadPluginDir( const std::string& dirname );
- void LoadPluginFile( const std::string& filename );
- void UnloadAll( );
-
- ProcessObject::Pointer Create(
- const std::string& category, const std::string& name
- );
- std::string GetPluginName(
- const std::string& category, const std::string& name
- ) const;
- std::string GetPluginName( const ProcessObject* obj ) const;
- std::set< std::string > GetPlugins( ) const;
-
- protected:
- static void* _DLOpen( const std::string& fname, std::string& error );
- static const char* _DLGetName( void* hnd );
- static TFilters _DLGetFilters( void* hnd );
- static TCreator _DLGetCreator(
- void* hnd, const std::string& category, const std::string& name
- );
- static void _DLClose( void* hnd );
-
- protected:
- std::vector< std::string > m_Paths;
- TDynLibraries m_DynLibraries;
- TDynFilters m_DynFilters;
- TFilters m_Filters;
-
- static unsigned int InterfacesCount;
- */
+ TFilters m_Filters;
};
} // ecapseman
const std::string& buffer, const std::string& fname
)
{
- std::ofstream file_stream(
- CanonicalPath( fname ).c_str( ), std::ofstream::binary
- );
+ std::ofstream file_stream( fname.c_str( ), std::ofstream::binary );
if( !file_stream )
return( false );
file_stream.write( buffer.c_str( ), buffer.size( ) );