X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkAtomicBlackBoxMacros.h;h=17e1c05369619f7103aacceec0b68f65c70b4798;hb=2d564c78c449d67b1d85511ba9601d3afb57c924;hp=d68ce239eb5eaf23284dde7a264e93301571edfc;hpb=6575a389b71b1b85c79e4444885becb76ecf16e4;p=bbtk.git diff --git a/kernel/src/bbtkAtomicBlackBoxMacros.h b/kernel/src/bbtkAtomicBlackBoxMacros.h index d68ce23..17e1c05 100644 --- a/kernel/src/bbtkAtomicBlackBoxMacros.h +++ b/kernel/src/bbtkAtomicBlackBoxMacros.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkAtomicBlackBoxMacros.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:12 $ - Version: $Revision: 1.11 $ + Date: $Date: 2009/06/10 11:36:51 $ + Version: $Revision: 1.19 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -41,7 +41,7 @@ /// 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; \ + BBTK_OBJECT_MINIMAL_INTERFACE; \ private: \ protected: \ CLASS(const std::string& name, bool allocate_connectors = true); \ @@ -53,10 +53,23 @@ { return std::string(#CLASS)+std::string(" '") \ +bbGetNameWithParent()+std::string("'"); } \ virtual void bbLockDescriptor(); \ + virtual void bbUserSetDefaultValues(); \ + virtual void bbUserInitializeProcessing(); \ + virtual void bbUserFinalizeProcessing(); \ + virtual void bbRecursiveInitializeProcessing() \ + { \ + PARENT::bbRecursiveInitializeProcessing(); \ + CLASS::bbUserInitializeProcessing(); \ + } \ + virtual void bbRecursiveFinalizeProcessing() \ + { \ + CLASS::bbUserFinalizeProcessing(); \ + PARENT::bbRecursiveFinalizeProcessing(); \ + } \ private: \ CLASS() : PARENT("") {} \ CLASS(const CLASS&) : PARENT("") {} - + //============================================================================ //============================================================================ @@ -85,14 +98,27 @@ } \ inline bbtk::BlackBox::Pointer bbClone(const std::string& name) \ { \ - bbtkDebugMessage("object",1,"##> "<<#CLASS \ - <<"::bbClone(\""< "<<#CLASS \ + <<"::bbClone(\""< Processing ["< Processing..." \ + < "<<#CLASS<<"::"<<#CLASS \ - <<"(\""< "<<#CLASS<<"::"<<#CLASS \ + <<"()"< "<<#CLASS<<"::"<<#CLASS \ - <<"("< "<<#CLASS<<"::"<<#CLASS \ + <<"("< "<<#CLASS <<"::~"<< #CLASS \ - <<"() ["<bbGetFullName()<<"]"< "<<#CLASS <<"::~"<< #CLASS \ + <<"()"<bbGetFullName()<<"]"<::bbSetOutput##NAME) ) ) //============================================================================ + +//JCP 09JUIN2009 BBTK_EXPORT + //============================================================================ /// Template AtomicBlackBox std implementation of ctor and dtor #define BBTK_BLACK_BOX_TEMPLATE_IMPLEMENTATION(CLASS,PARENT) \ @@ -515,7 +555,7 @@ : PARENT(name,false) \ { \ BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,alloc); \ - CLASS::bbUserConstructor(); \ + CLASS::bbUserSetDefaultValues(); \ BBTK_END_BLACK_BOX_CONSTRUCTOR(CLASS); \ } \ template \ @@ -524,14 +564,13 @@ : PARENT(from,name,false) \ { \ BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \ - CLASS::bbUserCopyConstructor(); \ - BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from); \ + CLASS::bbUserSetDefaultValues(); \ + BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \ } \ template \ CLASS::~CLASS() \ { \ BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS); \ - CLASS::bbUserDestructor(); \ BBTK_END_BLACK_BOX_DESTRUCTOR(CLASS); \ } \ template \ @@ -690,7 +729,7 @@ : PARENT(name,false) \ { \ BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,alloc); \ - CLASS::bbUserConstructor(); \ + CLASS::bbUserSetDefaultValues(); \ BBTK_END_BLACK_BOX_CONSTRUCTOR(CLASS); \ } \ template \ @@ -699,14 +738,13 @@ : PARENT(from,name,false) \ { \ BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \ - CLASS::bbUserCopyConstructor(); \ - BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from); \ + CLASS::bbUserSetDefaultValues(); \ + BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \ } \ template \ CLASS::~CLASS() \ { \ BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS); \ - CLASS::bbUserDestructor(); \ BBTK_END_BLACK_BOX_DESTRUCTOR(CLASS); \ } \ template \ @@ -717,46 +755,6 @@ //============================================================================ -/* -//============================================================================ -/// Template AtomicBlackBox std implementation of ctor and dtor -#define BBTK_BLACK_BOX_TEMPLATE2_WITH_TYPES_IMPLEMENTATION(CLASS,PARENT,TYPE1,TYPE2) \ - template \ - CLASS::CLASS(const std::string& name, bool alloc) \ - : PARENT(name,false) \ - { \ - BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,alloc); \ - this->bbUserConstructor(); \ - BBTK_END_BLACK_BOX_CONSTRUCTOR; \ - } \ - template \ - CLASS::CLASS(CLASS& from, \ - const std::string& name, bool allocate_connectors) \ - : PARENT(from,name,false) \ - { \ - BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \ - this->bbUserCopyConstructor(); \ - BBTK_END_BLACK_BOX_CONSTRUCTOR; \ - } \ - template \ - CLASS::~CLASS() \ - { \ - BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS); \ - this->bbUserDestructor(); \ - BBTK_END_BLACK_BOX_DESTRUCTOR; \ - } \ - template \ - void CLASS::bbLockDescriptor() \ - { \ - bbmDescriptorPointer = CLASS ## Descriptor::Instance(); \ - } -//============================================================================ - -*/ - - - -