]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Parameters.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Parameters.h
index dbcf98c68a16c4c62073e95f19026f745dff582f..0e54f0f7fdfae594e9fd9a55cb7042fde4a22a10 100644 (file)
@@ -2,6 +2,7 @@
 #define __CPPLUGINS__INTERFACE__PARAMETERS__H__
 
 #include <map>
+#include <ostream>
 #include <string>
 #include <vector>
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
@@ -14,26 +15,35 @@ namespace cpPlugins
      */
     class cpPlugins_Interface_EXPORT Parameters
     {
+      // -------------------------------------------------------------------
+      friend std::ostream& operator<<(
+        std::ostream& os, const Parameters& p
+        )
+      {
+        Parameters::TParameters::const_iterator pIt =
+          p.m_Parameters.begin( );
+        for( ; pIt != p.m_Parameters.end( ); ++pIt )
+        {
+          os
+            << pIt->first << ": ("
+            << pIt->second.first << ", "
+            << pIt->second.second << ")"
+            << std::endl;
+
+        } // rof
+        return( os );
+      }
+
     public:
       typedef Parameters Self;
 
       enum Type
       {
-        String = 0,
-        Bool,
-        Int,
-        Uint,
-        Real,
-        Index,
-        Point,
-        StringList,
-        BoolList,
-        IntList,
-        UintList,
-        RealList,
-        IndexList,
-        PointList,
-        NoType
+        String    , Bool       , Int      ,
+        Uint      , Real       , Index    ,
+        Point     , StringList , BoolList ,
+        IntList   , UintList   , RealList ,
+        IndexList , PointList  , NoType
       };
 
       typedef bool          TBool;