]> Creatis software - bbtk.git/commitdiff
*** MAJOR CHANGE *** NOT WORKING YET !!!
authorguigues <guigues>
Thu, 14 May 2009 14:43:27 +0000 (14:43 +0000)
committerguigues <guigues>
Thu, 14 May 2009 14:43:27 +0000 (14:43 +0000)
We have removed the bbUserConstructor/CopyConstructor/Destructor methods
And created the bbUserSetDefaultValues / InitializeProcessing / FinalizeProcessing which are better !
Related changes have been made in:
*the kernel
*bbfy
*the std-template.xml of bbCreateBlackBox
*package std

All other packages have to be patched !!!!

46 files changed:
kernel/appli/bbCreateBlackBox/xml-templates/std-template.xml
kernel/appli/bbfy/bbfy.cpp
kernel/cmake/BBTKDefineOptions.cmake
kernel/cmake/BBTKFindLibraries.cmake
kernel/src/CMakeLists.txt
kernel/src/ThirdParty/CMakeLists.txt
kernel/src/bbtkAtomicBlackBox.h
kernel/src/bbtkAtomicBlackBoxMacros.h
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkBlackBox.h
kernel/src/bbtkQtBlackBox.cxx
kernel/src/bbtkVtkBlackBoxMacros.h
kernel/src/bbtkWidgetBlackBox.h
kernel/src/bbtkWidgetBlackBox.txx
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxBlackBox.h
packages/std/src/bbstdASCII.cxx
packages/std/src/bbstdASCII.h
packages/std/src/bbstdAdd.xml
packages/std/src/bbstdCast.h
packages/std/src/bbstdConcatStrings.cxx
packages/std/src/bbstdConcatStrings.h
packages/std/src/bbstdConfiguration.cxx
packages/std/src/bbstdConfiguration.h
packages/std/src/bbstdDiv.xml
packages/std/src/bbstdExecBbiCommand.cxx
packages/std/src/bbstdExecBbiCommand.h
packages/std/src/bbstdExecSystemCommand.cxx
packages/std/src/bbstdExecSystemCommand.h
packages/std/src/bbstdFilesFromDirectory.cxx
packages/std/src/bbstdFilesFromDirectory.h
packages/std/src/bbstdGetVectorElement.h
packages/std/src/bbstdMagicBox.cxx
packages/std/src/bbstdMagicBox.h
packages/std/src/bbstdMakeFileName.cxx
packages/std/src/bbstdMakeFileName.h
packages/std/src/bbstdMul.xml
packages/std/src/bbstdRelay.h
packages/std/src/bbstdStringSelect.cxx
packages/std/src/bbstdStringSelect.h
packages/std/src/bbstdStringTo.h
packages/std/src/bbstdStringToVector.h
packages/std/src/bbstdToString.h
packages/std/src/bbstdVectorToString.h
packages/std/src/bbstdWait.xml
packages/vtk/src/bbvtkSphereSource.xml

index bb8050b23c1487a5e6e1db11d3ef03f1399fbbf9..e40b521e4e5ea2ff39436af44e7a5ed50c3659a8 100644 (file)
   <output name="Out" type="double" description="First output"/>
   <!--=====================================================================-->
 
-  <!--========================================================================
-    THE PROCESSING METHOD BODY :
-    Here simpy copies the value of the input 'In' to the output 'Out'
-    And prints out the value
-    INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
-      void bbSet{Input|Output}NAME(const TYPE&)
-      const TYPE& bbGet{Input|Output}NAME() const 
-    Where :
-    * NAME is the name of the input/output
-      (the one provided in the attribute 'name' of the tag 'input')
-    * TYPE is the C++ type of the input/output
-      (the one provided in the attribute 'type' of the tag 'input') -->
-
   <process>
   <PRE>
+// THE MAIN PROCESSING METHOD BODY
+//   Here we simply set the input 'In' value to the output 'Out'
+//   And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+//    void bbSet{Input|Output}NAME(const TYPE&)
+//    const TYPE& bbGet{Input|Output}NAME() const 
+//    Where :
+//    * NAME is the name of the input/output
+//      (the one provided in the attribute 'name' of the tag 'input')
+//    * TYPE is the C++ type of the input/output
+//      (the one provided in the attribute 'type' of the tag 'input')
     bbSetOutputOut( bbGetInputIn() );
     std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   </PRE>
   </process>
   <!--=====================================================================-->
 
-  <!--========================================================================
-    CONSTRUCTORS / DESTRUCTORS (OPTIONAL) 
-    THE CONSTRUCTION METHOD BODY :
-    Here initializes the input 'In' to 0
-    This is also where you should allocate the output pointers -->
-  <constructor>
+   <defaultValues>
   <PRE>
-    bbSetInputIn(0);
+//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
+//    Here we initialize the input 'In' to 0
+   bbSetInputIn(0);
   </PRE>
-  </constructor>
+  </defaultValues>
+
 
-  <!-- THE COPY-CONSTRUCTION METHOD BODY :
-    Here does nothing 
-    But this is where you should allocate the output pointers if any
-    and copy the pointed values (to avoid bug caused by multiple references)-->
-  <copyconstructor>
+
+  <initializeProcessing>
   <PRE>
+//  THE INITIALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should allocate the internal/output pointers 
+//    if any 
+
   </PRE>
-  </copyconstructor>
+  </initializeProcessing>
 
-  <!-- THE DESTRUCTION METHOD BODY :
-    Here does nothing 
-    but this is where you should desallocate the output pointers if any -->
-  <destructor>
+  <finalizeProcessing>
   <PRE>
+//  THE FINALIZATION METHOD BODY :
+//    Here does nothing 
+//    but this is where you should desallocate the internal/output pointers 
+//    if any
   </PRE>
-  </destructor>
 <!--=====================================================================-->
+  </finalizeProcessing>
+ <!--=====================================================================-->
 
 <!--=======================================================================-->
 <!-- END OF BLACK BOX DESCRIPTION -->
index 347babc2b89afcf162727fc8b7eeff4cd77c41a5..d528eb916e4e5ae60a104655e136064b33f67a44 100644 (file)
@@ -79,9 +79,9 @@ private:
   std::vector<std::string> mInclude;
   std::vector<std::string> mTypedef;
 
-  std::string mUserConstructor;
-  std::string mUserCopyConstructor;
-  std::string mUserDestructor;
+  std::string mUserSetDefaultValues;
+  std::string mUserInitializeProcessing;
+  std::string mUserFinalizeProcessing;
 
   typedef struct
   {
@@ -276,25 +276,30 @@ void bbfy::ParseXML()
       bbtk::GetTextOrClear(BB.getChildNode("namespace"),mNamespace);
     }
 
-  // UserConstructor body
-  if (BB.nChildNode("constructor"))
+  // UserSetDefaultValues body
+  if (BB.nChildNode("defaultValues"))
     {
-      bbtk::GetTextOrClear(BB.getChildNode("constructor"),mUserConstructor);
+      bbtk::GetTextOrClear(BB.getChildNode("defaultValues"),
+                          mUserSetDefaultValues);
     }
     
-  // UserCopyConstructor body
-  if (BB.nChildNode("copyconstructor"))
+  // UserInitializeProcessing body
+  if (BB.nChildNode("initializeProcessing"))
     {
-      bbtk::GetTextOrClear(BB.getChildNode("copyconstructor"),mUserCopyConstructor);
+      bbtk::GetTextOrClear(BB.getChildNode("initializeProcessing"),
+                          mUserInitializeProcessing);
     }
     
 // UserDestructor body
-  if (BB.nChildNode("destructor"))
// UserFinalizeProcessing body
+  if (BB.nChildNode("finalizeProcessing"))
     {
-      bbtk::GetTextOrClear(BB.getChildNode("destructor"),mUserDestructor);
+      bbtk::GetTextOrClear(BB.getChildNode("finalizeProcessing"),
+                          mUserFinalizeProcessing);
     }
-    // Template parameters
+
+
+
+     // Template parameters
   //  mNbTemplateParam = BB.nChildNode("template");
 
   if ( BB.nChildNode("template") > 0)
@@ -430,6 +435,30 @@ void bbfy::ParseXML()
      {
        bbtk::GetTextOrClear(BB.getChildNode("createwidget"),mCreateWidget);
      }
+
+
+
+
+
+
+
+   // OBSOLETE/UNSUPPORTED TAGS
+  // WARN IF OBSOLETE TAGS PROVIDED
+  if (BB.nChildNode("constructor"))
+    {
+      std::cout << "WARNING !!! The tag <constructor> is obsolete !!"<<std::endl;
+    }
+  if (BB.nChildNode("destructor"))
+    {
+      std::cout << "WARNING !!! The tag <destructor> is obsolete !!"<<std::endl;
+    }
+  if (BB.nChildNode("copy_constructor"))
+    {
+      std::cout << "WARNING !!! The tag <copy_constructor> is obsolete !!"<<std::endl;
+    }
+
+
+
 }
 //==========================================================================
 
@@ -584,6 +613,7 @@ void bbfy::CreateHeader()
     }
 
   // Declare user constructor / copy cons /destr 
+  /*
   mFile << "//=================================================================="<<std::endl;
   mFile << "/// User callback called in the box contructor"<<std::endl;
 
@@ -594,7 +624,7 @@ void bbfy::CreateHeader()
   mFile << "virtual void bbUserDestructor();"<<std::endl;
   mFile << "//=================================================================="<<std::endl; 
 
-
+  */
 
   // Inputs
   std::vector<IO>::iterator ioi;
@@ -1045,24 +1075,20 @@ void bbfy::CreateCode()
     }
 
   // User constr / copy constr / destr implementation
-  mFile <<"void "<<mName<<"::bbUserConstructor()"<<std::endl;
-  mFile << "{"<<std::endl;
-  //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserConstructor()"<<std::endl);"<<std::endl;
-  
-  mFile << mUserConstructor << std::endl;
+  mFile <<"void "<<mName<<"::bbUserSetDefaultValues()"<<std::endl;
+  mFile << "{"<<std::endl;  
+  mFile << mUserSetDefaultValues << std::endl;
   mFile << "}" << std::endl;
 
-  mFile <<"void "<<mName<<"::bbUserCopyConstructor(bbtk::BlackBox::Pointer)"
+  mFile <<"void "<<mName<<"::bbUserInitializeProcessing()"
        <<std::endl;
   mFile << "{"<<std::endl;
-  //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserCopyConstructor()"<<std::endl);"<<std::endl;
-  mFile << mUserCopyConstructor << std::endl;
+  mFile << mUserInitializeProcessing << std::endl;
   mFile << "}" << std::endl;
 
-  mFile <<"void "<<mName<<"::bbUserDestructor()"<<std::endl;
+  mFile <<"void "<<mName<<"::bbUserFinalizeProcessing()"<<std::endl;
   mFile << "{"<<std::endl;
-  //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserDestructor()"<<std::endl);"<<std::endl;
-  mFile << mUserDestructor << std::endl;
+  mFile << mUserFinalizeProcessing << std::endl;
   mFile << "}" << std::endl;
 
 
index 34c0a776209ba9afd671520a52808c90d14546ae..ab9ab1ce148149efd4a235b5b74dbaa688aef755 100644 (file)
@@ -53,9 +53,9 @@ ENDIF(BUILD_BBTK_DOC)
 
 #-----------------------------------------------------------------------------
 # BOOST C++
-SET(BBTK_SHIPPED_BOOST boost_1_35_0 CACHE INTERNAL "Shipped boost dir" FORCE)
-OPTION(BBTK_USE_SHIPPED_BOOST 
-  "Use the shipped boost C++ library (${BBTK_SHIPPED_BOOST})" ON)
+#SET(BBTK_SHIPPED_BOOST boost_1_35_0 CACHE INTERNAL "Shipped boost dir" FORCE)
+#OPTION(BBTK_USE_SHIPPED_BOOST 
+#  "Use the shipped boost C++ library (${BBTK_SHIPPED_BOOST})" ON)
 #-----------------------------------------------------------------------------
 
 #-----------------------------------------------------------------------------
index 9947b1c01252e453bdedbb68942ed481929dcf20..a5b0aff85043d23ceda0dd9effcfd4cf30f942b2 100644 (file)
@@ -21,25 +21,25 @@ ENDIF(crea_FOUND)
 # USE SHIPPED BOOST ?
 IF(BBTK_KERNEL OR BBTK_CORE_PACKAGE)
 
-IF(BBTK_USE_SHIPPED_BOOST)
+#IF(BBTK_USE_SHIPPED_BOOST)
 
-  MESSAGE ( STATUS "=======================================")
-  MESSAGE ( STATUS "bbtk uses shipped boost C++ library (${BBTK_SHIPPED_BOOST})")
-  INCLUDE_DIRECTORIES( 
-    ${PROJECT_SOURCE_DIR}/kernel/src/ThirdParty/${BBTK_SHIPPED_BOOST})
+#  MESSAGE ( STATUS "=======================================")
+#  MESSAGE ( STATUS "bbtk uses shipped boost C++ library (${BBTK_SHIPPED_BOOST})")
+#  INCLUDE_DIRECTORIES( 
+#    ${PROJECT_SOURCE_DIR}/kernel/src/ThirdParty/${BBTK_SHIPPED_BOOST})
 
   # TO DO : CLEANLY BLOCK auto_link.hpp INCLUSION 
   #CREA_DEFINE(BOOST_SIGNALS_NO_LIB)
-  SET(BBTK_BOOST_LIBRARIES
-    bbtk_boost_signals
-    )  
+#  SET(BBTK_BOOST_LIBRARIES
+#    bbtk_boost_signals
+#    )  
   
-ELSE(BBTK_USE_SHIPPED_BOOST)
+#ELSE(BBTK_USE_SHIPPED_BOOST)
   SET(USE_BOOST ON CACHE BOOL "Use boost C++ library" FORCE)
   SET(BBTK_BOOST_LIBRARIES
     boost_signals
     )
-ENDIF(BBTK_USE_SHIPPED_BOOST)
+#ENDIF(BBTK_USE_SHIPPED_BOOST)
 
 ENDIF(BBTK_KERNEL OR BBTK_CORE_PACKAGE)
 #-----------------------------------------------------------------------------
index 48e2b36dc3f9fb4539fb1da4276f306a7c4a50d2..37d355d207166f32bb8fa94b2580d9aa6b7e40fc 100644 (file)
@@ -210,13 +210,14 @@ INSTALL(TARGETS bbtk DESTINATION ${BBTK_LIB_PATH})
 SET(LIBRARY_NAME BBTK)
 SET(${LIBRARY_NAME}_INSTALL_FOLDER bbtk)
 SET(${LIBRARY_NAME}_LIBRARIES bbtk)
-SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS kernel/src kernel/src/ThirdParty)
-IF(BBTK_USE_SHIPPED_BOOST)
-  SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
-    ${${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS} 
-    kernel/src/ThirdParty/${BBTK_SHIPPED_BOOST}
-    )
-ENDIF(BBTK_USE_SHIPPED_BOOST)
+SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS kernel/src)
+#kernel/src/ThirdParty)
+#IF(BBTK_USE_SHIPPED_BOOST)
+#  SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
+#    ${${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS} 
+#    kernel/src/ThirdParty/${BBTK_SHIPPED_BOOST}
+#    )
+#ENDIF(BBTK_USE_SHIPPED_BOOST)
 IF(UNIX)
   SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS 
     ${EXECUTABLE_OUTPUT_REL_PATH})
@@ -228,7 +229,8 @@ ELSE(UNIX)
     #${EXECUTABLE_OUTPUT_REL_PATH})/Debug
     #${EXECUTABLE_OUTPUT_REL_PATH}/Release)
 ENDIF(UNIX)
-SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/bbtk include/bbtk/ThirdParty)
+SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/bbtk)
+# include/bbtk/ThirdParty)
 SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS ${BBTK_LIB_PATH})
 
 # OPTIONAL 
@@ -262,7 +264,7 @@ CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
 
 #-----------------------------------------------------------------------------
 # Recurse in ThirdParty to build the needed libs
-SUBDIRS(ThirdParty)
+#SUBDIRS(ThirdParty)
 #-----------------------------------------------------------------------------
 
 MESSAGE(STATUS "=======================================")
index 1b468bd9eaf28f8bd2f985b1a629a32de6920344..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,6 +0,0 @@
-#-----------------------------------------------------------------------------
-# If bbtk uses shipped boost then recurse in boost to build the needed libs
-IF(BBTK_USE_SHIPPED_BOOST)
-  SUBDIRS(${BBTK_SHIPPED_BOOST})
-ENDIF(BBTK_USE_SHIPPED_BOOST)
-#-----------------------------------------------------------------------------
index 8348ea410581c314db0b4a99b428b0d86bfef2f1..8b45b915f394bc2472b81bda63212012e2641452 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/30 14:31:30 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2009/05/14 14:43:33 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -141,22 +141,19 @@ namespace bbtk
     //==================================================================
 
     //==================================================================
-    /// User callback called in the box contructor
-    virtual void bbUserConstructor() {}
-    /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer) {}
-    /// User callback called in the box destructor
-    virtual void bbUserDestructor() {}
+    /// *** TO BE REMOVED WHEN EVERYTHING IS OK ***
+    /// CHANGED RETURN TYPE OF bbUserConstructor FROM void TO int
+    /// TO PRODUCE COMPILATION ERROR IF AN USER DECLARES THE OLD 
+    /// METHOD bbUserConstructor IN ITS BOX
+    virtual int bbUserConstructor() { return 0; }
+    /// *** TO BE REMOVED WHEN EVERYTHING IS OK ***
+    /// THE SAME AS bbUserConstructor
+    virtual int bbUserCopyConstructor(bbtk::BlackBox::Pointer) { return 0; }
+    /// *** TO BE REMOVED WHEN EVERYTHING IS OK ***
+    /// THE SAME AS bbUserConstructor
+    virtual int bbUserDestructor() { return 0; }
     //==================================================================    
 
-    //==================================================================
-    /// System callback which calls bbUserConstructor for all its ancestors 
-    /// and the box itself
-    virtual void bbConstructor() {}
-    /// System callback which calls bbUserDestructor for all its ancestors 
-    /// and the box itself
-    virtual void bbDestructor() {}
-    //==================================================================    
 
      //==================================================================
   private:
index 9bc56ad02c3d59b53d957fe7adcfc962f93700b1..aa70474fbb3b0f0682d9f5b98485c3fec7718e74 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/30 14:31:30 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2009/05/14 14:43:33 $
+  Version:   $Revision: 1.16 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
   { return std::string(#CLASS)+std::string(" '")                       \
       +bbGetNameWithParent()+std::string("'"); }                       \
   virtual void bbLockDescriptor();                                     \
-  virtual void bbConstructor() {                                       \
-    PARENT::bbConstructor();                                           \
-    CLASS::bbUserConstructor();                                                \
+  virtual void bbUserSetDefaultValues();                               \
+  virtual void bbUserInitializeProcessing();                           \
+  virtual void bbUserFinalizeProcessing();                             \
+  virtual void bbRecursiveInitializeProcessing()                       \
+  {                                                                    \
+    PARENT::bbRecursiveInitializeProcessing();                         \
+    CLASS::bbUserInitializeProcessing();                               \
   }                                                                    \
-  virtual void bbDestructor() {                                                \
-    PARENT::bbDestructor();                                            \
-    CLASS::bbUserDestructor();                                         \
+  virtual void bbRecursiveFinalizeProcessing()                         \
+  {                                                                    \
+    CLASS::bbUserFinalizeProcessing();                                 \
+    PARENT::bbRecursiveFinalizeProcessing();                           \
   }                                                                    \
   private:                                                             \
   CLASS() : PARENT("") {}                                              \
     return p;                                                          \
   }                                                                    \
   virtual void bbLockDescriptor();                                     \
-  virtual void bbConstructor() {                                       \
-    PARENT::bbConstructor();                                           \
-    CLASS::bbUserConstructor();                                                \
+  virtual void bbUserSetDefaultValues();                               \
+  virtual void bbUserInitializeProcessing();                           \
+  virtual void bbUserFinalizeProcessing();                             \
+  virtual void bbRecursiveInitializeProcessing()                       \
+  {                                                                    \
+    PARENT::bbRecursiveInitializeProcessing();                         \
+    CLASS::bbUserInitializeProcessing();                               \
   }                                                                    \
-  virtual void bbDestructor() {                                                \
-    PARENT::bbDestructor();                                            \
-    CLASS::bbUserDestructor();                                         \
+  virtual void bbRecursiveFinalizeProcessing()                         \
+  {                                                                    \
+    CLASS::bbUserFinalizeProcessing();                                 \
+    PARENT::bbRecursiveFinalizeProcessing();                           \
   }                                                                    \
   private:                                                             \
   CLASS() : PARENT("") {}                                              \
     {                                                                  \
       bbLockDescriptor();                                              \
       bbAllocateConnectors();                                          \
-    }
+    }                                                                  
+
 //============================================================================
 
 //============================================================================
     {                                                                  \
       bbLockDescriptor();                                              \
       bbAllocateConnectors();                                          \
-      bbCopyIOValues(FROM);                                            \
-   }
+    }
 //============================================================================
 
 //============================================================================
-#define BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,FROM)                        \
+#define BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,FROM,ALLOC)          \
   bbtkDebugMessage("object",2,"<== "<<#CLASS<<"::"<<#CLASS             \
                   <<"("<<FROM.bbGetFullName()<<",\""                   \
-                  <<bbGetName()<<"\")"<<std::endl);            
+                  <<bbGetName()<<"\")"<<std::endl);                    \
+  if (ALLOC)                                                           \
+    {                                                                  \
+      bbCopyIOValues(FROM);                                            \
+    }
 //============================================================================
 
 //============================================================================
 #define BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS)                         \
   bbtkDebugMessage("object",2,"==> "<<#CLASS <<"::~"<< #CLASS          \
-                  <<"() ["<<this->bbGetFullName()<<"]"<<std::endl);
+                  <<"() ["<<this->bbGetFullName()<<"]"<<std::endl);    
+
+
 //============================================================================
 
 //============================================================================
     : PARENT(name,false)                                               \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,allocate_connectors);       \
-    /*CLASS::bbUserConstructor();      */                              \
+    CLASS::bbUserSetDefaultValues();                                           \
     BBTK_END_BLACK_BOX_CONSTRUCTOR(CLASS);                             \
   }                                                                    \
   CLASS::CLASS(CLASS& from,                                            \
     : PARENT(from,name,false)                                          \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \
-    /*CLASS::bbUserCopyConstructor(from.GetThisPointer<bbtk::BlackBox>());*/ \
-    BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from);                   \
+    CLASS::bbUserSetDefaultValues();                                           \
+    BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors);                       \
   }                                                                    \
   CLASS::~CLASS()                                                      \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS);                            \
-    /*CLASS::bbUserDestructor();*/                                     \
+    CLASS::bbUserFinalizeProcessing();                                 \
     BBTK_END_BLACK_BOX_DESTRUCTOR(CLASS);                              \
   }                                                                    \
   void CLASS::bbLockDescriptor()                                       \
     : PARENT(name,false)                                               \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,alloc);                     \
-    /*CLASS<T>::bbUserConstructor();*/                                 \
+    CLASS<T>::bbUserSetDefaultValues();                                        \
     BBTK_END_BLACK_BOX_CONSTRUCTOR(CLASS);                             \
   }                                                                    \
   template <class T>                                                   \
     : PARENT(from,name,false)                                          \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \
-    /*CLASS<T>::bbUserCopyConstructor(from.GetThisPointer<bbtk::BlackBox>());*/ \
-    BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from);                   \
+    CLASS<T>::bbUserSetDefaultValues();                                        \
+    BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors);                       \
   }                                                                    \
   template <class T>                                                   \
   CLASS<T>::~CLASS()                                                   \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS);                            \
-    /*CLASS<T>::bbUserDestructor();*/                                  \
+    CLASS<T>::bbFinalizeProcessing();                                  \
     BBTK_END_BLACK_BOX_DESTRUCTOR(CLASS);                              \
   }                                                                    \
   template <class T>                                                   \
     : PARENT(name,false)                                               \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_CONSTRUCTOR(CLASS,alloc);                     \
-    /*CLASS<T1,T2>::bbUserConstructor();*/                             \
+    CLASS<T1,T2>::bbUserSetDefaultValues();                            \
     BBTK_END_BLACK_BOX_CONSTRUCTOR(CLASS);                             \
   }                                                                    \
   template <class T1, class T2>                                                \
     : PARENT(from,name,false)                                          \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors); \
-    /*CLASS<T1,T2>::bbUserCopyConstructor(from.GetThisPointer<bbtk::BlackBox>());*/ \
-    BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from);                   \
+    CLASS<T1,T2>::bbUserSetDefaultValues();                            \
+    BBTK_END_BLACK_BOX_COPY_CONSTRUCTOR(CLASS,from,allocate_connectors);                       \
   }                                                                    \
   template <class T1, class T2>                                                \
   CLASS<T1,T2>::~CLASS()                                               \
   {                                                                    \
     BBTK_BEGIN_BLACK_BOX_DESTRUCTOR(CLASS);                            \
-    /*CLASS<T1,T2>::bbUserDestructor();*/                              \
+    CLASS<T1,T2>::bbFinalizeProcessing();                              \
     BBTK_END_BLACK_BOX_DESTRUCTOR(CLASS);                              \
   }                                                                    \
   template <class T1, class T2>                                                \
index 4aa8d0160fcb3d3b2b867d73b273d3bff7cb9f65..76fce5343da8a4c96dcb2e838c6454fa1470e6e9 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/30 14:31:31 $
-  Version:   $Revision: 1.43 $
+  Date:      $Date: 2009/05/14 14:43:33 $
+  Version:   $Revision: 1.44 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -107,7 +107,7 @@ namespace bbtk
   BlackBox::BlackBox(const std::string &name) 
     : 
     //    bbmStatus(MODIFIED), 
-    bbmConstructed(false),
+    bbmInitialized(false),
     bbmExecuting(false),
     bbmName(name),
     bbmBoxProcessMode("Pipeline"),
@@ -129,7 +129,7 @@ namespace bbtk
   BlackBox::BlackBox(BlackBox& from, const std::string &name) 
     :
     //    bbmStatus(from.bbmStatus), 
-    bbmConstructed(false),
+    bbmInitialized(false),
     bbmExecuting(false),
     bbmName(name), 
     bbmBoxProcessMode(from.bbmBoxProcessMode),
@@ -753,7 +753,31 @@ namespace bbtk
   }
   //=========================================================================
 
+  //=========================================================================
+  void BlackBox::bbInitializeProcessing()
+  {
+    if (!bbmInitialized) 
+      {
+       std::cout << "INIT "<<bbGetFullName()<<std::endl;
+       this->bbRecursiveInitializeProcessing();
+       bbmInitialized = true;
+      }
+  }
+  //=========================================================================
 
+  //=========================================================================
+  void BlackBox::bbFinalizeProcessing()
+  {
+    if (bbmInitialized) 
+      {
+       std::cout << "FINI "<<bbGetFullName()<<std::endl;
+       this->bbRecursiveFinalizeProcessing();
+       bbmInitialized = false;
+      }
+  }
+  //=========================================================================
+
+  
   //=========================================================================
   /// Main recursive processing method of the box.
   void BlackBox::bbRecursiveExecute( Connection::Pointer caller )
@@ -771,13 +795,8 @@ namespace bbtk
        return; 
       }
     
-    // If not constructed do it 
-    if (!bbmConstructed) 
-      {
-       this->bbConstructor();
-       bbmConstructed = true;
-      }
-
+    // If not initialized do it
+    bbInitializeProcessing();
 
     bbSetExecuting(true);
     bool wasExecuting = bbGlobalGetSomeBoxExecuting();
index d25fc88c01d2dc505dce8162df5803b6ae031095..ce1117fed4214d3f691a80f384436b7545ecba28 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/30 14:31:31 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2009/05/14 14:43:33 $
+  Version:   $Revision: 1.25 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -118,14 +118,6 @@ namespace bbtk
 
 
  
-    //==================================================================
-    /// System callback which calls bbUserConstructor for all its ancestors 
-    /// and the box itself
-    virtual void bbConstructor() {}
-    /// System callback which calls bbUserDestructor for all its ancestors 
-    /// and the box itself
-    virtual void bbDestructor() {}
-    //==================================================================    
  
 
 
@@ -247,6 +239,62 @@ namespace bbtk
 
 
 
+    //==================================================================
+   /// User can redefine this method to set 
+    /// the default values of the box inputs and outputs
+    /// (it is called in the box constructor)
+    virtual void bbUserSetDefaultValues() {}
+
+    /// User can redefine this method to initialize what must be 
+    /// initialized for the box to work, for example allocate dynamic data.
+    /// It is called once and only once before any call to bbUserCreateWidget
+    /// or bbUserProcess.
+    /// What has been allocated here must be desalocated in 
+    /// bbFinalizeProcessing
+    virtual void bbUserInitializeProcessing() {}
+
+    /// User must redefine this method to uninitialize what has been
+    /// initialized in bbUserInitializeProcessing,
+    /// typically desallocate memory that has been allocated dynamically.
+    /// It is called in the box destructor if and only if (iff) 
+    /// bbUserInitializeProcessing has been called previously.
+    virtual void bbUserFinalizeProcessing() {}
+
+
+    /// Initializes processing IF NEEDED. 
+    /// Calls bbRecursiveInitializeProcessing if the box is in 
+    /// "uninitialized" state and put it in "initialized" state.
+    /// On construction, boxes are "uninitialized".
+    /// See also bbFinalizeProcessing
+    void bbInitializeProcessing();
+
+    /// Finalizes processing IF NEEDED.
+    /// Calls bbRecursiveFinalizeProcessing if the box is in 
+    /// "initialized" state and put it in "uninitialized" state.
+    /// On construction, boxes are "uninitialized".
+    /// See also bbInitializeProcessing
+    void bbFinalizeProcessing();
+
+    /// Abstract prototype of the method which 
+    /// Recursively calls itself for the parent black box and then
+    /// calls bbUserInitializeProcessing for its own class. 
+    /// It is redefined in each black box descendant.
+    /// Allows to call bbUserInitializeProcessing for all inherited classes
+    /// (like a constructor does)
+    virtual void bbRecursiveInitializeProcessing() {}
+
+
+    /// Abstract prototype of the method which 
+    /// calls bbUserFinalizeProcessing for its own class and then 
+    /// recursively calls itself for the parent black box.
+    /// It is redefined in each black box descendant.
+    /// Allows to call bbUserFinalizeProcessing for all inherited classes
+    /// (like a destructor does)
+   virtual void bbRecursiveFinalizeProcessing() {}
+
+    //==================================================================
+
+
    //==================================================================
     // Common inputs / outputs to all boxes
     /// Returns the value of the input "BoxProcessMode"
@@ -502,8 +550,8 @@ namespace bbtk
  
     //==================================================================
     // ATTRIBUTES
-    /// Is the box "constructed" ? (initialized)
-    bool bbmConstructed;
+    /// Is the box initialized ?
+    bool bbmInitialized;
     /// Is the box executing ?
     bool bbmExecuting;
     /// The name of the black-box
index 7534fd65ee478fa99ed22d442f5522cbdd735b2f..8ac7de07a3983c31e8fe4d66da84656b0724ad9f 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkQtBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/08 07:56:11 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/14 14:43:33 $
+  Version:   $Revision: 1.2 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -82,7 +82,23 @@ namespace bbtk
   }
   //==================================================================    
 
+  //==================================================================    
+  void QtBlackBox::bbUserSetDefaultValues()
+  {
+  }
+  //==================================================================    
+
+  //==================================================================    
+  void QtBlackBox::bbUserInitializeProcessing()
+  {
+  }
+  //==================================================================    
  
+ //==================================================================    
+  void QtBlackBox::bbUserFinalizeProcessing()
+  {
+  }
+  //==================================================================    
    
   //==================================================================
   //  void QtBlackBox::InitWindowManagerIfNeeded() { Qt::
index 21816d3f9de43f510c60fb6f4bf19a5236c98786..8b1c8abb92f22bd338b2bd6ccb181d34f73b71a0 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkVtkBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/30 14:31:31 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2009/05/14 14:43:34 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
   { return vtkParent::Get##NAME(); }                                   \
   void bbSetInput##NAME (TYPE d)                                       \
   { vtkParent::Set##NAME(d);                                           \
-    /*bbSetModifiedStatus();*/ }
+  }
 //===========================================================================
 
+//===========================================================================
+/// Declares an AtomicBlackBox input corresponding to an 
+/// inherited vtk parameter
+/// which was declared by vtkSetMacro/vtkGetMacro
+/// The NAME **MUST** be the same than the vtk parameter name
+/*
+#define BBTK_DECLARE_VTK_2_PARAM(NAME,TYPE)            \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  {
+  TO DO : HOW TO RECOMPOSE A VECTOR ?
+  { return vtkParent::Get##NAME(); }                                   \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { 
+  vtkParent::Set##NAME(d[0],d[1]);             \
+}
+*/
+//===========================================================================
 
 
 //============================================================================
index 66f2bf133ede6c3fd2de84b1c13f9afad5cf4dd0..03601b1db8b76abea4d083c8e928b1f5941f7143 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWidgetBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/21 14:36:51 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2009/05/14 14:43:34 $
+  Version:   $Revision: 1.3 $
 ========================================================================*/
 
 
@@ -138,17 +138,6 @@ namespace bbtk
   protected:
     
   
-    //==================================================================
-    /// User callback called in the box contructor
-    virtual void bbUserConstructor();
-    /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-    /// User callback called in the box destructor
-    virtual void bbUserDestructor();
-    //==================================================================    
-
-
 
     //==================================================================
     /// Convenient method for layout widgets which creates and returns
@@ -213,7 +202,6 @@ namespace bbtk
     Window* bbmWindow;
 
 
-    void bbInitAttributes();
 
   };
   //=================================================================
index 39738cf6b3032aaebe8689488fb17d7204ac3a5b..1abdaad92f81ad694410b80c9fc9ccd974c94137 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWidgetBlackBox.txx,v $
   Language:  C++
-  Date:      $Date: 2009/04/21 14:36:51 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2009/05/14 14:43:34 $
+  Version:   $Revision: 1.3 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -54,56 +54,42 @@ namespace bbtk
   
 //=========================================================================
   template <class T>  
-  void WidgetBlackBox<T>::bbUserConstructor()
+  void WidgetBlackBox<T>::bbUserSetDefaultValues()
   {
-    bbtkDebugMessage("widget",9,"WidgetBlackBox::bbUserConstructor()"<<std::endl);
-    bbInitAttributes();
+    bbtkDebugMessage("widget",9,"WidgetBlackBox::bbUserSetDefaultValues()"<<std::endl);
+    bbmWindow = 0;
+    bbSetInputWinTitle(bbGetName());
+    bbSetInputWinWidth(800);
+    bbSetInputWinHeight(800);
+    bbSetInputWinDialog(false);
+    bbSetOutputWidget(0);
   }
   //=========================================================================
 
   //=========================================================================
   template <class T>  
-  void WidgetBlackBox<T>::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+  void WidgetBlackBox<T>::bbUserInitializeProcessing()
   {
-    bbtkDebugMessage("widget",9,"WidgetBlackBox::bbUserCopyConstructor()"
-                    <<std::endl);
-    bbInitAttributes();
   }
   //=========================================================================
 
-
   //=========================================================================
   template <class T>  
-  void WidgetBlackBox<T>::bbUserDestructor()
+  void WidgetBlackBox<T>::bbUserFinalizeProcessing()
   {
-    bbtkDebugMessage("widget",9,"==> WidgetBlackBox::bbUserDestructor() ["<<bbGetFullName()<<"]"<<std::endl);
+    bbtkDebugMessage("widget",9,"==> WidgetBlackBox::bbUserFinalizeProcessing() ["<<bbGetFullName()<<"]"<<std::endl);
     if (bbGetWindow()) {
       bbGetWindow()->bbClose();
       bbSetWindow(0);
     }
-    bbtkDebugMessage("widget",9,"<== WidgetBlackBox::bbUserDestructor() ["<<bbGetFullName()<<"]"<<std::endl);
+    bbtkDebugMessage("widget",9,"<== WidgetBlackBox::bbUserFinalizeProcessing() ["<<bbGetFullName()<<"]"<<std::endl);
   }
   //=========================================================================
   
 
 
-  //=========================================================================
-  /**
-   * \brief Initialize the attributes of the class
-   *
-   */
-  template <class T>  
-  void WidgetBlackBox<T>::bbInitAttributes()
-  {
-    bbmWindow = 0;
-    bbSetInputWinTitle(bbGetName());
-    bbSetInputWinWidth(800);
-    bbSetInputWinHeight(800);
-    bbSetInputWinDialog(false);
-    bbSetOutputWidget(0);
-  }
-  //=========================================================================
-
 
   //=========================================================================
   template <class T>  
@@ -181,7 +167,10 @@ namespace bbtk
        // Cast it into a WidgetBlackBox
        typename WidgetBlackBox<T>::Pointer wfrom 
          = boost::dynamic_pointer_cast<WidgetBlackBox<T> >(from);
-       // Call bbCreateWidget
+       // If the black box from construction is not done yet : do it
+        // If not constructed do it 
+       wfrom->bbInitializeProcessing();
+       // Call bbUserCreateWidget
        wfrom->bbUserCreateWidget(parent);
        // Get the widget created
        w = wfrom->bbGetOutputWidget();
index b99ca45163c9d13b5c8875341f30b87226950201..245a07412fa108ca4b135e4a0e10e5246ac51a18 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/08 07:56:11 $
-  Version:   $Revision: 1.38 $
+  Date:      $Date: 2009/05/14 14:43:34 $
+  Version:   $Revision: 1.39 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -292,31 +292,24 @@ namespace bbtk
   //=========================================================================
   
   //=========================================================================
-  void WxBlackBox::bbUserConstructor()
+  void WxBlackBox::bbUserSetDefaultValues()
   {
-    bbtkDebugMessage("Kernel",9,"WxBlackBox::bbUserConstructor()"<<std::endl);
-    bbInitAttributes();
+    bbtkDebugMessage("Kernel",9,"WxBlackBox::bbUserSetDefaultValues()"<<std::endl);
+    bbSetWidgetEventHandler(0);
   }
   //=========================================================================
 
   //=========================================================================
-  void WxBlackBox::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+  void WxBlackBox::bbUserInitializeProcessing()
   {
-    bbtkDebugMessage("Kernel",9,"WxBlackBox::bbUserCopyConstructor()"
-                    <<std::endl);
-    bbInitAttributes();
   }
-  //=========================================================================
-
-
+  //==================================================================    
 
   //=========================================================================
-  /// Initialize the attributes of the class
-  void WxBlackBox::bbInitAttributes()
+  void WxBlackBox::bbUserFinalizeProcessing()
   {
-    bbSetWidgetEventHandler(0);
   }
-  //=========================================================================
+  //==================================================================    
 
   //==================================================================    
   /// Callback for creating a Dialog window (modal)
index 368491847f0fa498f2b00b1f588f2f93c80d4fda..7c9db44300ea4d3e09786e367db368c8625c3c43 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/08 07:56:11 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2009/05/14 14:43:34 $
+  Version:   $Revision: 1.27 $
 ========================================================================*/
 
 
@@ -92,13 +92,7 @@ namespace bbtk
     virtual void bbCreateFrameWindow();
     //==================================================================    
 
-    //==================================================================
-    /// User callback called in the box contructor
-    virtual void bbUserConstructor();
-    /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-    //==================================================================    
-
+  
   
     //==================================================================
     //    virtual void InitWindowManagerIfNeeded();
@@ -132,8 +126,6 @@ namespace bbtk
     { return bbmWidgetEventHandler; }
     /// The WxBlackBoxWidgetEventHandler associated to the box
     WxBlackBoxWidgetEventHandler* bbmWidgetEventHandler;
-    /// Init the attributes 
-    void bbInitAttributes();
   };
   //=================================================================
  
index 10e630fc6c66899443f58d3f14e7ff479ac6c372..fa2e686d2d33a7a8c7067d8b7e5695cdc89908c3 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdASCII.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/25 11:17:20 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -82,19 +82,18 @@ namespace bbstd
     bbSetOutputOut( result );  
   }
   
-  void ASCII::bbUserConstructor()
+  void ASCII::bbUserSetDefaultValues()
   {
     bbSetInputIn("");
     bbSetInputType(0);
   }
-  
-  void ASCII::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
-  {    
+   void ASCII::bbUserInitializeProcessing() 
+  { 
   }
-  
-  void ASCII::bbUserDestructor()
+  void ASCII::bbUserFinalizeProcessing() 
   {
-  }
+  } 
 }
 // EO namespace bbstd
 
index 5acb0220db7362cdcc878fa4b2ece3ebe21a63b2..1f1f20384826b41211163aba5dbaf31fa9f9831a 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdASCII.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/11 15:30:09 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -43,14 +43,6 @@ namespace bbstd
     public bbtk::AtomicBlackBox
   {
     BBTK_BLACK_BOX_INTERFACE(ASCII,bbtk::AtomicBlackBox);
-    //==================================================================
-    /// User callback called in the box contructor
-    virtual void bbUserConstructor();
-    /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-    /// User callback called in the box destructor
-    virtual void bbUserDestructor();
-    //==================================================================
     BBTK_DECLARE_INPUT(In,std::string);
     BBTK_DECLARE_INPUT(Type,int);
     BBTK_DECLARE_OUTPUT(Out,std::string);
index c3c1c3c5be402f621311052d10d5818ea25bca29..a085e87ff6df3e49c22dd81914cd4a0e449f4293 100644 (file)
     bbSetOutputOut( bbGetInputIn1() + bbGetInputIn2() );
   </PRE></process>
   
-  <constructor><PRE>
+  <defaultValues><PRE>
     bbSetInputIn1(0);
     bbSetInputIn2(0);
     bbSetOutputOut(0);    
-  </PRE></constructor
+  </PRE></defaultValues
 
 </blackbox>
 
index 73731a930189296ff445064e6f82b3825846212d..2f40c18afeb6aa055f681a26dbd730c8e8042457 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdCast.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:20 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -76,6 +76,10 @@ namespace bbstd
   BBTK_END_DESCRIBE_TEMPLATE2_BLACK_BOX(Cast);
   //=================================================================
 
+  template <class T, class U> void Cast<T,U>::bbUserSetDefaultValues() {}
+  template <class T, class U> void Cast<T,U>::bbUserInitializeProcessing() {}
+  template <class T, class U> void Cast<T,U>::bbUserFinalizeProcessing() {}
+
 
 } // namespace bbstd
 
index b332eb08fe7dae21eb090fda85d2d1f731bd6c66..8c81ef0165c1d2ecef27306c367c847c772e8efc 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdConcatStrings.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:26 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -37,7 +37,7 @@ namespace bbstd
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ConcatStrings);
   BBTK_BLACK_BOX_IMPLEMENTATION(ConcatStrings,bbtk::AtomicBlackBox);
   
-  void ConcatStrings::bbUserConstructor() 
+  void ConcatStrings::bbUserSetDefaultValues() 
   { 
     bbSetInputIn1("");
     bbSetInputIn2("");
@@ -51,6 +51,12 @@ namespace bbstd
     bbSetInputIn10("");
   }
   
+  void ConcatStrings::bbUserInitializeProcessing() 
+  { 
+  }
+  void ConcatStrings::bbUserFinalizeProcessing() 
+  { 
+  }
   
   void ConcatStrings::DoProcess()
   {
index 715154cd1dcf7e919445f878b8ee9261c52ce850..c00d58119590b1ad6564132af8ba710a1500c2a3 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdConcatStrings.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -55,9 +55,6 @@ namespace bbstd
     BBTK_DECLARE_OUTPUT(Out,std::string);
     BBTK_PROCESS(DoProcess);
     void DoProcess();
-
-  protected:
-    virtual void bbUserConstructor();
   };
 
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(ConcatStrings,bbtk::AtomicBlackBox);
index 08a1e89c7800cd1d5b6674d0b9da59a8f680d24a..7aced9a86b2c77decbff37031d7208cf23fb315d 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdConfiguration.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:26 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -38,11 +38,17 @@ namespace bbstd
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,Configuration);
   BBTK_BLACK_BOX_IMPLEMENTATION(Configuration,bbtk::AtomicBlackBox);
   
-  void Configuration::bbUserConstructor() 
+  void Configuration::bbUserSetDefaultValues() 
   { 
     
   }
-  
+  void Configuration::bbUserInitializeProcessing() 
+  { 
+  }
+  void Configuration::bbUserFinalizeProcessing() 
+  {
+  }
+    
   void Configuration::DoProcess()
   {
     bbSetOutputBinPath( bbtk::ConfigurationFile::GetInstance().Get_bin_path() );
index 0c76ab31d6c9f780992f04e2c792efe44bda9750..09a6b27b1d9f1cfe08f53476eec83e6e65e1c830 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdConfiguration.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.11 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -50,9 +50,6 @@ namespace bbstd
     BBTK_PROCESS(DoProcess);
     void DoProcess();
 
-  protected:
-    virtual void bbUserConstructor();
-
   };
 
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(Configuration,bbtk::AtomicBlackBox);
index 5a090581012b9bd2764b13ae23c2641c522eeae4..09686ebb6bd647626d1952717ec2ac2d6f2e2d48 100644 (file)
     bbSetOutputOut( bbGetInputIn1() / bbGetInputIn2() );
   </PRE></process>
   
-  <constructor><PRE>
+  <defaultValues><PRE>
     bbSetInputIn1(0);
     bbSetInputIn2(1);
     bbSetOutputOut(0);
-  </PRE></constructor>    
+  </PRE></defaultValues>    
 
 </blackbox>
 
index c496ca1602afc80a00d6fad38d55e53a482968df..ea7894fceed30e2a88753e68c8bc1d8c453b7b27 100755 (executable)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdExecBbiCommand.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:26 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.11 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -40,11 +40,17 @@ namespace bbstd
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ExecBbiCommand);
   BBTK_BLACK_BOX_IMPLEMENTATION(ExecBbiCommand,bbtk::AtomicBlackBox);
 
-  void ExecBbiCommand::bbUserConstructor() 
+  void ExecBbiCommand::bbUserSetDefaultValues() 
   { 
     bbSetInputIn("help");
   }
-
+  void ExecBbiCommand::bbUserInitializeProcessing() 
+  { 
+  }
+  void ExecBbiCommand::bbUserFinalizeProcessing() 
+  {
+  }
+  
   void ExecBbiCommand::DoProcess()
     {
 
index 7a85a7de5bcc597c34040781542263894978fed1..fff3bc6a745fadd287388352ac0e0e23fd1b0792 100755 (executable)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdExecBbiCommand.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -47,9 +47,6 @@ namespace bbstd
     BBTK_DECLARE_INPUT(In,std::string);
     BBTK_PROCESS(DoProcess);
     void DoProcess();
-
-  protected:
-    virtual void bbUserConstructor();
   };
 
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(ExecBbiCommand,bbtk::AtomicBlackBox);
index f30234f7f6f3875cf4de9f317f497fe99738b572..3c321754c0b26047794c4c04908f498be1b2ec4a 100755 (executable)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdExecSystemCommand.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:26 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -39,11 +39,17 @@ namespace bbstd
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ExecSystemCommand);
   BBTK_BLACK_BOX_IMPLEMENTATION(ExecSystemCommand,bbtk::AtomicBlackBox);
 
-  void ExecSystemCommand::bbUserConstructor() 
+  void ExecSystemCommand::bbUserSetDefaultValues() 
   { 
     bbSetInputIn("help");
   }
-
+  void ExecSystemCommand::bbUserInitializeProcessing() 
+  { 
+  }
+  void ExecSystemCommand::bbUserFinalizeProcessing() 
+  {
+  }
+  
   void ExecSystemCommand::DoProcess()
   {
     bool ok=true;
index 6633fafdb84fa78c45b3adb386edf41a2ba6eb97..d10c26cb89868fca400e3a135f791bb7b0243e85 100755 (executable)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdExecSystemCommand.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -47,9 +47,6 @@ namespace bbstd
     BBTK_DECLARE_INPUT(In,std::string)
     BBTK_PROCESS(DoProcess);
     void DoProcess();
-
-  protected:
-    virtual void bbUserConstructor();
   };
 
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(ExecSystemCommand,bbtk::AtomicBlackBox);
index e91ef23898cf5190eccc0aebbf930ab8c315c42a..698cca545686326c20eb0a42da98a1009d3d8270 100644 (file)
@@ -27,24 +27,20 @@ void FilesFromDirectory::Process()
    
   
 }
-void FilesFromDirectory::bbUserConstructor()
+void FilesFromDirectory::bbUserSetDefaultValues()
 {
 
     bbSetInputIn(".");
     bbSetInputRecursive(false);
   
 }
-void FilesFromDirectory::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
-{
-
-  
-}
-void FilesFromDirectory::bbUserDestructor()
-{
-
+  void FilesFromDirectory::bbUserInitializeProcessing() 
+  { 
+  }
+  void FilesFromDirectory::bbUserFinalizeProcessing() 
+  {
+  }
   
-}
-
 /**
  * \brief   Add a SEPARATOR to the end of the name if necessary
  * @param   pathname file/directory name to normalize 
index 125909ba62a6373c58adf652d3ddde351af42092..6223255fa84d45e93db141017aa99d37973069c8 100644 (file)
@@ -12,14 +12,6 @@ namespace bbstd
     public bbtk::AtomicBlackBox
   {
     BBTK_BLACK_BOX_INTERFACE(FilesFromDirectory,bbtk::AtomicBlackBox);
-    //==================================================================
-    /// User callback called in the box contructor
-    virtual void bbUserConstructor();
-    /// User callback called in the box copy constructor
-    virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-    /// User callback called in the box destructor
-    virtual void bbUserDestructor();
-    //==================================================================
     BBTK_DECLARE_INPUT(In,std::string);
     BBTK_DECLARE_INPUT(Recursive,bool);  
     BBTK_DECLARE_OUTPUT(Out,std::vector<std::string>);
index d49110e97408d25befb1a4a5b7cd5970578aba43..438caea889e0b99ae21f732cd6e6fb96e75ae18c 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdGetVectorElement.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -48,7 +48,6 @@ namespace bbstd
     BBTK_DECLARE_OUTPUT(Out,T);
     BBTK_PROCESS(DoIt);
     void DoIt(); 
-    virtual void bbUserConstructor();
   };
   //=================================================================
 
@@ -81,7 +80,21 @@ namespace bbstd
 
   //=================================================================  
   template <class T>
-  void GetVectorElement<T>::bbUserConstructor()
+  void GetVectorElement<T>::bbUserSetDefaultValues()
+  {
+
+  }
+  //=================================================================
+  //=================================================================  
+  template <class T>
+  void GetVectorElement<T>::bbUserInitializeProcessing()
+  {
+
+  }
+  //=================================================================
+  //=================================================================  
+  template <class T>
+  void GetVectorElement<T>::bbUserFinalizeProcessing()
   {
 
   }
index fe601be58f205e9d0c8e289d9af17f3e60265822..16d7c975b53e7f0990911053b9c48e4e3f141afa 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdMagicBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/03/30 14:42:23 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -57,6 +57,16 @@ namespace bbstd
    BlackBox::bbSetStatusAndPropagate(c,s);
   }
 
+  void MagicBox::bbUserSetDefaultValues()
+  {
+    mCanSet = true;
+  }
+  void MagicBox::bbUserInitializeProcessing() 
+  { 
+  }
+  void  MagicBox::bbUserFinalizeProcessing() 
+  {
+  }
   void MagicBox::DoProcess()
   { 
     mCanSet = true;
index de0e443e99d9108a7864e5898e943ad32142de56..ec5a16966850b9784203a82deb465682adc97edc 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdMagicBox.h,v $
   Language:  C++
-  Date:      $Date: 2009/03/30 14:42:23 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.12 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -71,8 +71,6 @@ public:                                                                       \
     virtual void bbSetStatusAndPropagate(bbtk::BlackBoxInputConnector* c,
                                         bbtk::IOStatus s);
     bool mCanSet;
-    virtual void bbUserConstructor() { mCanSet = true; }
-
  };
   //==================================================================
   
index ef056a30d8ddf11326b42792af14303c85fc48d6..f888ded910335b3caa66176af534b99d84187578 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdMakeFileName.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:27 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -39,13 +39,19 @@ namespace bbstd
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MakeFileName);
   BBTK_BLACK_BOX_IMPLEMENTATION(MakeFileName,bbtk::AtomicBlackBox);
   
-  void MakeFileName::bbUserConstructor()
+  void MakeFileName::bbUserSetDefaultValues()
   {
     bbSetInputDirectory("");
     bbSetInputFile("");
     bbSetInputExtent("");
   }
-  
+  void MakeFileName::bbUserInitializeProcessing() 
+  { 
+  }
+  void MakeFileName::bbUserFinalizeProcessing() 
+  { 
+  }
+
   void MakeFileName::DoProcess()
   {
     std::string fileSep = bbtk::ConfigurationFile::GetInstance().Get_file_separator();
index d2591376c096188d3d872fc0c781dd7436693289..00c30516ba62f1a6157e3610ff67020fa50b718e 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdMakeFileName.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.9 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -48,10 +48,6 @@ namespace bbstd
     BBTK_DECLARE_OUTPUT(Out,      std::string);
     BBTK_PROCESS(DoProcess);
     void DoProcess();
-
-  protected:
-    virtual void bbUserConstructor();
-
   };
 
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(MakeFileName,bbtk::AtomicBlackBox);
index 7397061e956f2616211807cf51f5ebe2bda16b05..1c0dfd923ebbeb00abec24e25896af885366cae6 100644 (file)
     bbSetOutputOut( bbGetInputIn1() * bbGetInputIn2() );
   </PRE></process>
   
-  <constructor><PRE>
+  <defaultValues><PRE>
     bbSetInputIn1(0);
     bbSetInputIn2(0);
     bbSetOutputOut(0);
-  </PRE></constructor>    
+  </PRE></defaultValues>    
 
 </blackbox>
 
index fe80f662eb02edb9521adba31a1e40a499b42fb1..4d9d7ff0e4ebdf6b0561b9e2d726123021dff496 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdRelay.h,v $
   Language:  C++
-  Date:      $Date: 2009/01/08 10:18:34 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -63,6 +63,10 @@ namespace bbstd
   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(Relay);
   //=======================================================================
 
+  template <class T> void Relay<T>::bbUserSetDefaultValues() {}
+  template <class T> void Relay<T>::bbUserInitializeProcessing() {}
+  template <class T> void Relay<T>::bbUserFinalizeProcessing() {}
+
 }
 // namespace bbstd
 
index 47054d273a9b775d80bc263f9ec8c565fbbcc936..825683aff9391ba4ad9c5449706bdcfed7e92e50 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdStringSelect.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:27 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -38,7 +38,7 @@ namespace bbstd
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,StringSelect)
     BBTK_BLACK_BOX_IMPLEMENTATION(StringSelect,bbtk::AtomicBlackBox);
   
-  void StringSelect::bbUserConstructor() 
+  void StringSelect::bbUserSetDefaultValues() 
   { 
     bbSetInputIn(0);
     bbSetInputIn0("");
@@ -52,9 +52,16 @@ namespace bbstd
     bbSetInputIn8("");
     bbSetInputIn9("");
   }
+   
+  void StringSelect::bbUserInitializeProcessing() 
+  {
+  }
   
-  
-  
+  void StringSelect::bbUserFinalizeProcessing() 
+  {
+  }
+    
   void StringSelect::DoProcess()
   {
     if (bbGetInputIn()==0) bbSetOutputOut( bbGetInputIn0() );
index 2e3ab738a7fdf56c63c29863fea497dbca09ebc8..d4bb635ad2a0737d5dcc1912eb10f36612eeaa63 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdStringSelect.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -57,10 +57,6 @@ namespace bbstd
     BBTK_DECLARE_OUTPUT(Out,std::string);
     BBTK_PROCESS(DoProcess);
     void DoProcess();
-    
-  protected:
-    virtual void bbUserConstructor();
-    
   };
   //=======================================================================
 
index 1e6893890844625a61e067c6b2730ab25d2ffcb8..77e6a8eba7abc104199346aa37bf6299dc4cf11b 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdStringTo.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -63,7 +63,12 @@ namespace bbstd
   BBTK_TEMPLATE_OUTPUT(StringTo, Out,"Output",T);
   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(StringTo);
   //=================================================================
-  
+
+  template <class T> void StringTo<T>::bbUserSetDefaultValues() {}
+  template <class T> void StringTo<T>::bbUserInitializeProcessing() {}
+  template <class T> void StringTo<T>::bbUserFinalizeProcessing() {}
+
+
 } // namespace bbstd
 
 #endif // __bbstdStringTo_h_INCLUDED__
index 7b515d18fe2477ad8cdd52b1ef4c2c46e77896ae..95572f1072e2254782f716dd43d5b6dfb330417d 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdStringToVector.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -66,6 +66,10 @@ namespace bbstd
   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(StringToVector);
   //=================================================================
   
+
+  template <class T> void StringToVector<T>::bbUserSetDefaultValues() {}
+  template <class T> void StringToVector<T>::bbUserInitializeProcessing() {}
+  template <class T> void StringToVector<T>::bbUserFinalizeProcessing() {}
   //=================================================================
   template <class T>
   void StringToVector<T>::DoIt()
index ab8c6a2877c48117a2a1d0a1fd5adf676184e693..5ec4195cb9203b14633833b4ca2cde629d01512a 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdToString.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -62,6 +62,10 @@ namespace bbstd
   BBTK_TEMPLATE_OUTPUT(ToString, Out,"Output",std::string);
   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(ToString);
   //=================================================================
+
+  template <class T> void ToString<T>::bbUserSetDefaultValues() {}
+  template <class T> void ToString<T>::bbUserInitializeProcessing() {}
+  template <class T> void ToString<T>::bbUserFinalizeProcessing() {}
   
 } // namespace bbstd 
 
index b75907def4a29a30cfa47055e57397ca00a08b28..a493ce6bb4a133b6dbfb35a20519c516bf461fb9 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdVectorToString.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.9 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -49,7 +49,6 @@ namespace bbstd
     BBTK_DECLARE_OUTPUT(Out,std::string);
     BBTK_PROCESS(DoIt);
     void DoIt(); 
-    virtual void bbUserConstructor();
   };
   //=================================================================
 
@@ -67,7 +66,7 @@ namespace bbstd
   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(VectorToString);
   //=================================================================
 
 //=================================================================
+ //=================================================================
   template <class T>
   void VectorToString<T>::DoIt()
   {
@@ -87,12 +86,21 @@ namespace bbstd
 
   //=================================================================  
   template <class T>
-  void VectorToString<T>::bbUserConstructor()
+  void VectorToString<T>::bbUserSetDefaultValues()
   {
     bbSetInputSeparator(" ");
   }
   //=================================================================
-
+  template <class T>
+  void VectorToString<T>::bbUserInitializeProcessing() 
+  { 
+  }
+  //=================================================================
+  template <class T>
+  void VectorToString<T>::bbUserFinalizeProcessing() 
+  {
+  }
+  //=================================================================
 } // namespace bbstd
 
 #endif //__bbstdVectorToString_INCLUDED_h__
index 8d6c09351057640433a8cad0a23e07a95574cd28..b554ceed9f5fd0c2910bd1e435c00ae0ec19f857 100644 (file)
   </process>
   <!--=====================================================================-->
 
-  <!--========================================================================
-    CONSTRUCTORS / DESTRUCTORS (OPTIONAL) 
-    THE CONSTRUCTION METHOD BODY : -->
-  <constructor>
+  <defaultValues>
   <PRE>
     bbSetInputIn(1000);
   </PRE>
-  </constructor>
-
-  <!-- THE COPY-CONSTRUCTION METHOD BODY :
-    Here does nothing 
-    But this is where you should allocate the output pointers if any
-    and copy the pointed values (to avoid bug caused by multiple references)-->
-  <copyconstructor>
-  <PRE>
-  </PRE>
-  </copyconstructor>
+  </defaultValues>
 
-  <!-- THE DESTRUCTION METHOD BODY :
-    Here does nothing 
-    but this is where you should desallocate the output pointers if any -->
-  <destructor>
-  <PRE>
-  </PRE>
-  </destructor>
   <!--=====================================================================-->
 
 <!--=======================================================================-->
index 113aa8d33a84e8cc7e1fd5bb01cf0387fff49826..bad1264e4290c4d2c1541be59b9caaee9f554acc 100644 (file)
@@ -22,9 +22,6 @@
 SetCenter(bbGetInputCenterX(), 
           bbGetInputCenterY(), 
           bbGetInputCenterZ());
-SetPhiResolution(bbGetInputPhiResolution());
-SetRadius((double)bbGetInputRadius());
-SetThetaResolution(bbGetInputThetaResolution());
 Update();
 </PRE>
 </process>