]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Parameters.hxx
Kind of bored: graph editor debugged
[cpPlugins.git] / lib / cpPlugins / Interface / Parameters.hxx
index b633f879f5e33b70b0a3064e259ca0c754849b4d..d0fb9c27b1e2cb055286e8d1efb24dddfc329c99 100644 (file)
@@ -1,51 +1,6 @@
 #ifndef __CPPLUGINS__INTERFACE__PARAMETERS__HXX__
 #define __CPPLUGINS__INTERFACE__PARAMETERS__HXX__
 
-// -------------------------------------------------------------------------
-template< class I >
-void cpPlugins::Interface::Parameters::
-ConfigureAsIndex( const TString& name, const TUint& dim, const I& v )
-{
-  std::stringstream str;
-  str << v[ 0 ];
-  for( unsigned int d = 1; d < dim; ++d )
-    str << ";" << v[ d ];
-  std::string s = str.str( );
-  this->m_Parameters[ name ] =
-    TParameter( Self::Index, TValues( s, s ) );
-  this->Modified( );
-}
-
-// -------------------------------------------------------------------------
-template< class P >
-void cpPlugins::Interface::Parameters::
-ConfigureAsPoint( const TString& name, const TUint& dim, const P& v )
-{
-  std::stringstream str;
-  str << v[ 0 ];
-  for( unsigned int d = 1; d < dim; ++d )
-    str << ";" << v[ d ];
-  std::string s = str.str( );
-  this->m_Parameters[ name ] =
-    TParameter( Self::Point, TValues( s, s ) );
-  this->Modified( );
-}
-
-// -------------------------------------------------------------------------
-template< class V >
-void cpPlugins::Interface::Parameters::
-ConfigureAsVector( const TString& name, const TUint& dim, const V& v )
-{
-  std::stringstream str;
-  str << v[ 0 ];
-  for( unsigned int d = 1; d < dim; ++d )
-    str << ";" << v[ d ];
-  std::string s = str.str( );
-  this->m_Parameters[ name ] =
-    TParameter( Self::Vector, TValues( s, s ) );
-  this->Modified( );
-}
-
 // -------------------------------------------------------------------------
 template< class I >
 I cpPlugins::Interface::Parameters::
@@ -57,7 +12,7 @@ GetIndex( const TString& name, const TUint& dim ) const
   {
     if( i->second.first == Self::Index )
     {
-      std::istringstream str( i->second.second.second );
+      std::istringstream str( i->second.second );
       std::string token;
       unsigned int d = 0;
       while( std::getline( str, token, ';' ) && d < dim )
@@ -89,7 +44,7 @@ GetPoint( const TString& name, const TUint& dim ) const
   {
     if( i->second.first == Self::Point )
     {
-      std::istringstream str( i->second.second.second );
+      std::istringstream str( i->second.second );
       std::string token;
       unsigned int d = 0;
       while( std::getline( str, token, ';' ) && d < dim )
@@ -122,7 +77,7 @@ GetVector( const TString& name, const TUint& dim ) const
   {
     if( i->second.first == Self::Vector )
     {
-      std::istringstream str( i->second.second.second );
+      std::istringstream str( i->second.second );
       std::string token;
       unsigned int d = 0;
       while( std::getline( str, token, ';' ) && d < dim )
@@ -159,7 +114,7 @@ GetIndexList(
   if( i->second.first == Self::IndexList )
     return;
 
-  std::istringstream str( i->second.second.second );
+  std::istringstream str( i->second.second );
   std::string token;
   unsigned int d = 0;
   while( std::getline( str, token, '#' ) )
@@ -194,7 +149,7 @@ GetPointList(
   if( i->second.first == Self::PointList )
     return;
 
-  std::istringstream str( i->second.second.second );
+  std::istringstream str( i->second.second );
   std::string token;
   unsigned int d = 0;
   while( std::getline( str, token, '#' ) )
@@ -230,7 +185,7 @@ GetVectorList(
   if( i->second.first == Self::VectorList )
     return;
 
-  std::istringstream str( i->second.second.second );
+  std::istringstream str( i->second.second );
   std::string token;
   unsigned int d = 0;
   while( std::getline( str, token, '#' ) )
@@ -266,7 +221,7 @@ SetIndex( const TString& name, const TUint& dim, const I& v )
   str << v[ 0 ];
   for( unsigned int d = 1; d < dim; ++d )
     str << ";" << v[ d ];
-  i->second.second.second = str.str( );
+  i->second.second = str.str( );
   this->Modified( );
 }
 
@@ -285,7 +240,7 @@ SetPoint( const TString& name, const TUint& dim, const P& v )
   str << v[ 0 ];
   for( unsigned int d = 1; d < dim; ++d )
     str << ";" << v[ d ];
-  i->second.second.second = str.str( );
+  i->second.second = str.str( );
   this->Modified( );
 }
 
@@ -304,7 +259,7 @@ SetVector( const TString& name, const TUint& dim, const V& v )
   str << v[ 0 ];
   for( unsigned int d = 1; d < dim; ++d )
     str << ";" << v[ d ];
-  i->second.second.second = str.str( );
+  i->second.second = str.str( );
   this->Modified( );
 }
 
@@ -320,13 +275,13 @@ AddToIndexList( const TString& name, const TUint& dim, const I& v )
     return;
 
   std::stringstream str;
-  if( i->second.second.second == "" )
+  if( i->second.second == "" )
     str << v[ 0 ];
   else
     str << "#" << v[ 0 ];
   for( unsigned int d = 1; d < dim; ++d )
     str << ";" << v[ d ];
-  i->second.second.second += str.str( );
+  i->second.second += str.str( );
   this->Modified( );
 }
 
@@ -342,13 +297,13 @@ AddToPointList( const TString& name, const TUint& dim, const P& v )
     return;
 
   std::stringstream str;
-  if( i->second.second.second == "" )
+  if( i->second.second == "" )
     str << v[ 0 ];
   else
     str << "#" << v[ 0 ];
   for( unsigned int d = 1; d < dim; ++d )
     str << ";" << v[ d ];
-  i->second.second.second += str.str( );
+  i->second.second += str.str( );
   this->Modified( );
 }
 
@@ -364,13 +319,13 @@ AddToVectorList( const TString& name, const TUint& dim, const V& v )
     return;
 
   std::stringstream str;
-  if( i->second.second.second == "" )
+  if( i->second.second == "" )
     str << v[ 0 ];
   else
     str << "#" << v[ 0 ];
   for( unsigned int d = 1; d < dim; ++d )
     str << ";" << v[ d ];
-  i->second.second.second += str.str( );
+  i->second.second += str.str( );
   this->Modified( );
 }