]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Pipeline/Events.h
yet another refactoring
[cpPlugins.git] / lib / cpPlugins / Pipeline / Events.h
diff --git a/lib/cpPlugins/Pipeline/Events.h b/lib/cpPlugins/Pipeline/Events.h
new file mode 100644 (file)
index 0000000..a675d93
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef __cpPlugins__Pipeline__Events__h__
+#define __cpPlugins__Pipeline__Events__h__
+
+#include <cpPlugins/Config.h>
+#include <itkEventObject.h>
+
+// -------------------------------------------------------------------------
+#define cpPluginsEventsOpenMacro( name )                                \
+  class name                                                            \
+    : public itk::AnyEvent                                              \
+  {                                                                     \
+  public:                                                               \
+    typedef name          Self;                                         \
+    typedef itk::AnyEvent Superclass;                                   \
+  public:                                                               \
+    name( ) : Superclass( ) { }                                         \
+      virtual ~name( )      { }                                         \
+      const char* GetEventName( ) const                                 \
+      { return( "cpPlugins::Pipeline::Events::#name" ); }               \
+      bool CheckEvent( const itk::EventObject* e ) const                \
+      { return( dynamic_cast< const Self* >( e ) != NULL ); }           \
+      itk::EventObject* MakeObject( ) const                             \
+      { return( new Self( ) ); }
+
+// -------------------------------------------------------------------------
+#define cpPluginsEventsCloseMacro( name )       \
+  }
+
+namespace cpPlugins
+{
+  namespace Pipeline
+  {
+    namespace Events
+    {
+      /**
+       */
+      cpPluginsEventsOpenMacro( Modified )
+        public:
+      itk::ModifiedTimeType Time;
+      long                  Span;
+      cpPluginsEventsCloseMacro( Modified );
+
+    } // ecapseman
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __cpPlugins__Pipeline__Events__h__
+
+// eof - $RCSfile$