]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Parameters.h
Machete filter with interactive plane: it now supports images and meshes. Not yet...
[cpPlugins.git] / lib / cpPlugins / Interface / Parameters.h
index ef8e3b31f08a2f4bb8793e494db861d1ed8f3077..56cb5fdc51719922754a33913b8ce5df630bb90a 100644 (file)
@@ -31,12 +31,12 @@ namespace cpPlugins
 
       enum Type
       {
-        String    , Bool       , Int      ,
-        Uint      , Real       , Index    ,
-        Point     , StringList , BoolList ,
-        IntList   , UintList   , RealList ,
-        IndexList , PointList  , Choices  ,
-        NoType
+        String     , Bool       , Int        ,
+        Uint       , Real       , Index      ,
+        Point      , Vector     , StringList ,
+        BoolList   , IntList    , UintList   ,
+        RealList   , IndexList  , PointList  ,
+        VectorList , Choices    , NoType
       };
 
       typedef bool          TBool;
@@ -78,6 +78,10 @@ namespace cpPlugins
         inline void ConfigureAsPoint(
           const TString& name, const TUint& dim, const P& v
           );
+      template< class V >
+        inline void ConfigureAsVector(
+          const TString& name, const TUint& dim, const V& v
+          );
 
       void ConfigureAsStringList( const TString& name );
       void ConfigureAsBoolList( const TString& name );
@@ -86,6 +90,7 @@ namespace cpPlugins
       void ConfigureAsRealList( const TString& name );
       void ConfigureAsIndexList( const TString& name );
       void ConfigureAsPointList( const TString& name );
+      void ConfigureAsVectorList( const TString& name );
       void ConfigureAsChoices(
         const TString& name, const std::vector< TString >& choices
         );
@@ -101,6 +106,7 @@ namespace cpPlugins
       bool HasReal( const TString& name ) const;
       bool HasIndex( const TString& name ) const;
       bool HasPoint( const TString& name ) const;
+      bool HasVector( const TString& name ) const;
       bool HasStringList( const TString& name ) const;
       bool HasBoolList( const TString& name ) const;
       bool HasIntList( const TString& name ) const;
@@ -108,6 +114,7 @@ namespace cpPlugins
       bool HasRealList( const TString& name ) const;
       bool HasIndexList( const TString& name ) const;
       bool HasPointList( const TString& name ) const;
+      bool HasVectorList( const TString& name ) const;
       bool HasChoices( const TString& name ) const;
 
       TString GetString( const TString& name ) const;
@@ -141,6 +148,8 @@ namespace cpPlugins
         inline I GetIndex( const TString& name, const TUint& dim ) const;
       template< class P >
         inline P GetPoint( const TString& name, const TUint& dim ) const;
+      template< class V >
+        inline V GetVector( const TString& name, const TUint& dim ) const;
 
       template< class I >
         inline void GetIndexList(
@@ -150,6 +159,10 @@ namespace cpPlugins
         inline void GetPointList(
           std::vector< P >& lst, const TString& name, const TUint& dim
           ) const;
+      template< class V >
+        inline void GetVectorList(
+          std::vector< V >& lst, const TString& name, const TUint& dim
+          ) const;
 
       // Set methods
       void SetString( const TString& name, const TString& v );
@@ -166,6 +179,10 @@ namespace cpPlugins
         inline void SetPoint(
           const TString& name, const TUint& dim, const P& v
           );
+      template< class V >
+        inline void SetVector(
+          const TString& name, const TUint& dim, const V& v
+          );
 
       void AddToStringList( const TString& name, const TString& v );
       void AddToBoolList( const TString& name, const TBool& v );
@@ -181,6 +198,10 @@ namespace cpPlugins
         inline void AddToPointList(
           const TString& name, const TUint& dim, const P& v
           );
+      template< class P >
+        inline void AddToVectorList(
+          const TString& name, const TUint& dim, const P& v
+          );
 
       void ClearStringList( const TString& name );
       void ClearBoolList( const TString& name );
@@ -189,6 +210,7 @@ namespace cpPlugins
       void ClearRealList( const TString& name );
       void ClearIndexList( const TString& name );
       void ClearPointList( const TString& name );
+      void ClearVectorList( const TString& name );
 
       bool SetSelectedChoice( const TString& name, const TString& choice );