]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Plugins.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / Plugins.cxx
index eabd53ef905e45048dd4530530b360b014a2bb43..81366c13b25c5bb58b7446ef5a88765fde8f2b67 100644 (file)
@@ -1,7 +1,7 @@
 #include <cpPlugins/Interface/Plugins.h>
 #include <cpPlugins/OS/DLLManager.h>
 #include <cpPlugins/OS/DirContents.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
 
 // -------------------------------------------------------------------------
 cpPlugins::Interface::Plugins::
@@ -85,9 +85,9 @@ void cpPlugins::Interface::Plugins::
 AddEnvironments( const std::string& env )
 {
   std::vector< std::string > directories;
-  cpExtensions::Tokenize( directories, env, cpPlugins_ENV_SEPARATOR );
+  cpPlugins::Tokenize( directories, env, cpPlugins_ENV_SEPARATOR );
   for( auto dir = directories.begin( ); dir != directories.end( ); ++dir )
-    this->m_Paths.insert( cpExtensions::CanonicalPath( *dir ) );
+    this->m_Paths.insert( cpPlugins::CanonicalPath( *dir ) );
 }
 
 // -------------------------------------------------------------------------
@@ -100,7 +100,7 @@ LoadEnvironments( )
     std::stringstream fname;
     fname << *d << cpPlugins_PATH_SEPARATOR << cpPlugins_CONFIG;
     std::string buffer;
-    if( cpExtensions::Read( buffer, fname.str( ) ) )
+    if( cpPlugins::Read( buffer, fname.str( ) ) )
     {
       std::istringstream input( buffer );
       for( std::string line; std::getline( input, line ); )
@@ -125,7 +125,7 @@ LoadEnvironments( )
 
   for( auto l = libs.begin( ); l != libs.end( ); ++l )
   {
-    std::string lib = cpExtensions::CanonicalPath( *l );
+    std::string lib = cpPlugins::CanonicalPath( *l );
     if( lib != "" )
     {
       if( this->m_Libraries.find( lib ) == this->m_Libraries.end( ) )
@@ -148,11 +148,11 @@ LoadPaths( const std::string& dir )
 {
   std::stringstream fname, envs;
   fname << dir;
-  if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
-    fname << cpExtensions_PATH_SEPARATOR;
+  if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
+    fname << cpPlugins_PATH_SEPARATOR;
   fname << cpPlugins_PATHS;
   std::string buffer;
-  if( cpExtensions::Read( buffer, fname.str( ) ) )
+  if( cpPlugins::Read( buffer, fname.str( ) ) )
   {
     std::istringstream input( buffer );
     for( std::string line; std::getline( input, line ); )
@@ -173,10 +173,10 @@ SavePaths( const std::string& dir ) const
 
   std::stringstream fname;
   fname << dir;
-  if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
-    fname << cpExtensions_PATH_SEPARATOR;
+  if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
+    fname << cpPlugins_PATH_SEPARATOR;
   fname << cpPlugins_PATHS;
-  if( !cpExtensions::Write( buffer.str( ), fname.str( ) ) )
+  if( !cpPlugins::Write( buffer.str( ), fname.str( ) ) )
     throw std::runtime_error( "Error writing environment file." );
 }
 
@@ -185,7 +185,7 @@ void cpPlugins::Interface::Plugins::
 LoadFile( const std::string& fname )
 {
   // Resolve canonical filename
-  std::string can_name = cpExtensions::CanonicalPath( fname );
+  std::string can_name = cpPlugins::CanonicalPath( fname );
   if( can_name == "" )
     throw std::runtime_error(
       std::string( "Loading file: can't find library \"" ) +
@@ -307,8 +307,8 @@ LoadPlugin( const std::string& pname )
   {
     std::stringstream dir;
     dir << *i;
-    if( !cpExtensions::IsPathSeparator( i->back( ) ) )
-      dir << cpExtensions_PATH_SEPARATOR;
+    if( !cpPlugins::IsPathSeparator( i->back( ) ) )
+      dir << cpPlugins_PATH_SEPARATOR;
     dir << fname.str( );
     try
     {