]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkAtomicBlackBoxMacros.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkAtomicBlackBoxMacros.h
index cdbf459ecae949a39f2e75d8a66ed1b1fc9e4b3f..ef5042aae19e35de69223c1d438d14119975f312 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2008/05/07 06:31:37 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/07/29 07:31:13 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #ifndef __bbtkAtomicBlackBoxMacros_h__
 #define __bbtkAtomicBlackBoxMacros_h__
 
+//============================================================================
+/// Declares the standard interface of a AtomicBlackBox 
+/// (ctor, New, descriptor related methods)
+#define BBTK_BLACK_BOX_INTERFACE_INTERNAL_WITHOUT_NEW(CLASS,PARENT)    \
+  BBTK_OBJECT_MINIMAL_INTERFACE;                               \
+  private:                                                             \
+  protected:                                                           \
+  CLASS(const std::string& name, bool allocate_connectors = true);     \
+  CLASS(Self& from, const std::string& name,                           \
+       bool allocate_connectors = true);                               \
+  ~CLASS();                                                            \
+  public:                                                              \
+  std::string GetObjectName() const                                    \
+  { return std::string(#CLASS)+std::string(" '")                       \
+      +bbGetNameWithParent()+std::string("'"); }                       \
+  virtual void bbLockDescriptor();                                     \
+  private:                                                             \
+  CLASS() : PARENT("") {}                                              \
+  CLASS(const CLASS&) : PARENT("") {}                                  
+
+//============================================================================
+
 //============================================================================
 /// Declares the standard interface of a AtomicBlackBox 
 /// (ctor, New, descriptor related methods)
   BBTK_BLACK_BOX_INTERFACE_INTERNAL(CLASS,PARENT);
 //============================================================================
 
+//============================================================================
+#define BBTK_BLACK_BOX_INTERFACE_WITHOUT_NEW(CLASS,PARENT)     \
+  public : typedef CLASS Self;                         \
+  BBTK_BLACK_BOX_INTERFACE_INTERNAL_WITHOUT_NEW(CLASS,PARENT);
+//============================================================================
+
 //============================================================================
 /// Defines the bbUserProcess method
 #define BBTK_PROCESS(CALLBACK)                                         \