]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Object.h
WARNING: It does not compile yet git status!
[cpPlugins.git] / lib / cpPlugins / Interface / Object.h
index 6e273f174264f5fe3ea7f822c5254a76102557e8..5b0ebd6de87f9e79dd152d6465e3d1043ab06187 100644 (file)
@@ -51,6 +51,12 @@ public:                                                         \
     }                                                                   \
   };
 
+// -------------------------------------------------------------------------
+#define cpPlugins_Id_Macro( name, category )                            \
+  public:                                                               \
+  static std::string GetClassName( ) { return( #name ); }               \
+  static std::string GetClassCategory( ) { return( category ); }
+
 namespace cpPlugins
 {
   namespace Interface
@@ -69,10 +75,10 @@ namespace cpPlugins
     public:
       itkNewMacro( Self );
       itkTypeMacro( Object, itkObject );
+      cpPlugins_Id_Macro( cpPlugins::Interface::Object, "BaseObject" );
 
-    public:
-      itkGetConstMacro( ClassName, std::string );
-      itkGetConstMacro( ClassCategory, std::string );
+      itkGetStringMacro( Name );
+      itkSetStringMacro( Name );
 
     protected:
       Object( );
@@ -84,8 +90,7 @@ namespace cpPlugins
       Self& operator=( const Self& );
 
     protected:
-      std::string m_ClassName;
-      std::string m_ClassCategory;
+      std::string m_Name;
     };
 
     /**