+
+Let's have a look at the file \texttt{packages/std/bbstdMakeFileName.h}
+
+\begin{file}{\texttt{packages/std/bbstdMakeFileName.h}}
+\small
+\begin{verbatim}
+#ifndef __bbstdMakeFileName_h_INCLUDED__
+#define __bbstdMakeFileName_h_INCLUDED__
+
+#include "bbtkAtomicBlackBox.h"
+
+namespace bbstd
+{
+ class MakeFileName : public bbtk::AtomicBlackBox
+ {
+ BBTK_BLACK_BOX_INTERFACE(MakeFileName,bbtk::AtomicBlackBox);
+ BBTK_DECLARE_INPUT(Directory, std::string);
+ BBTK_DECLARE_INPUT(File, std::string);
+ BBTK_DECLARE_INPUT(Extent, std::string);
+ BBTK_DECLARE_OUTPUT(Out, std::string);
+ BBTK_PROCESS(DoProcess);
+ void DoProcess();
+ protected:
+ virtual void bbUserConstructor();
+ };
+
+ BBTK_BEGIN_DESCRIBE_BLACK_BOX(MakeFileName,bbtk::AtomicBlackBox);
+ BBTK_NAME("MakeFileName");
+ BBTK_AUTHOR("jpr@creatis.insa-lyon.fr");
+ BBTK_CATEGORY("misc");
+ BBTK_DESCRIPTION("Makes a kosher file name");
+ BBTK_INPUT(MakeFileName,Directory,"Directory Name",std::string,"directory name");
+ BBTK_INPUT(MakeFileName,File, "File Name", std::string,"file name");
+ BBTK_INPUT(MakeFileName,Extent, "Extention", std::string,"file extension");
+
+ BBTK_OUTPUT(MakeFileName,Out,"Full File Name",std::string,"file name");
+ BBTK_END_DESCRIBE_BLACK_BOX(MakeFileName);
+
+}
+// EO namespace bbstd
+
+#endif // __bbstdMakeFileName_h_INCLUDED__
+\end{verbatim}
+\end{file}
+
+It includes \texttt{bbtkAtomicBlackBox.h}.
+The box class is \texttt{MakeFileName}.
+It inherits \texttt{bbtk::AtomicBlackBox}.
+It is in the \texttt{bbstd} namespace :
+each box of a given package, say PACK, must be inserted into
+the namespace \texttt{bbPACK}.
+
+The macro \texttt{BBTK\_BLACK\_BOX\_INTERFACE}
+declares the interface of the class : constructor, destructor,
+standard methods (e.g. New), etc.
+The following macros then declare inputs and outputs of the box,
+with their types.
+The macro \texttt{BBTK\_PROCESS} then declares which method to call
+when processing the box (the process callback).
+The callback itself is declared just below.
+
+The line \texttt{virtual void bbUserConstructor();} then
+overloads the virtual method \texttt{bbUserConstructor}
+which is used to perform specific things at construction time.
+You can also overload \texttt{bbUserCopyConstructor}
+and \texttt{bbUserDestructor} with the same signature.
+The black box interface macros are summarized in table
+\ref{CPPInterfaceBasicMacros}
+
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{CPPInterfaceBasicMacros}Black box interface \CPP macros}
+\small
+
+\begin{itemize}
+
+ \item \texttt{BBTK\_BLACK\_BOX\_INTERFACE(BOX\_NAME,BBTK\_PARENT) }
+ Yes, we know the \bbtk parent is redundant with the inheritance list... That's why we allow you to describe your class in \xml format!
+
+ \item \texttt{BBTK\_VTK\_BLACK\_BOX\_INTERFACE(CLASS,BBTK\_PARENT,VTK\_PARENT) } Black box interface for \vtk object inherited boxes
+ \dots
+ \item \texttt{BBTK\_ITK\_BLACK\_BOX\_INTERFACE(CLASS,BBTK\_PARENT,ITK\_PARENT) } Black box interface for \itk object inherited boxes
+ \dots
+ \item \texttt{BBTK\_DECLARE\_INPUT (NAME,TYPE) } Declares an input of the box
+\begin{itemize}
+\item \texttt{NAME} : the input name (as it will appear to the users of your black box)
+\item \texttt{TYPE} : \CPP type of the input (e.g. double, std::string, vtkImageData*, ...)).
+\end{itemize}
+ \item \texttt{BBTK\_DECLARE\_INHERITED\_INPUT(NAME,TYPE,GETMETHOD,SETMETHOD)} Declares an input of the box which wraps the \texttt{GETMETHOD / SETMETHOD} accessors
+
+ \item \texttt{BBTK\_DECLARE\_VTK\_INPUT(NAME,TYPE)}
+ Declares a vtk object-inherited input
+ \item \texttt{BBTK\_DECLARE\_VTK\_IMAGE\_ALGORITHM\_INPUT(NAME,TYPE)} Declares a vtkImageAlgorithm-inherited input
+ \item \texttt{BBTK\_DECLARE\_VTK\_POLY\_DATA\_ALGORITHM\_INPUT(NAME,TYPE)} Declares a vtkPolyDataAlgorithm-inherited input
+ \item \texttt{BBTK\_DECLARE\_ITK\_INPUT (NAME,TYPE)}
+ Declares a itk object-inherited input
+ \item \texttt{BBTK\_DECLARE\_OUTPUT (NAME,TYPE) }
+ Declares an output of the box
+ \item \texttt{BBTK\_DECLARE\_INHERITED\_OUTPUT(NAME,TYPE,GETMETHOD,SETMETHOD)}
+ Declares an output of the box which wraps the \texttt{GETMETHOD / SETMETHOD} accessors
+ \item \texttt{BBTK\_DECLARE\_VTK\_OUTPUT(NAME,TYPE)}
+ Declares a vtk object-inherited output
+ \item \texttt{BBTK\_DECLARE\_ITK\_OUTPUT(NAME,TYPE)}
+ Declares a itk object-inherited output
+
+ \item \texttt{BBTK\_DECLARE\_VTK\_PARAM(VTK\_PARENT,NAME,TYPE)}
+ Declares an input corresponding to an inherited vtk parameter
+ (you know, the ones that are declared by vtkSetMacro/vtkGetMacro). Its name must be the same than the vtk parameter name.
+
+ \item \texttt{BBTK\_DECLARE\_ITK\_PARAM(NAME,TYPE)}
+ Declares an input corresponding to an inherited itk parameter
+
+ \item \texttt{BBTK\_PROCESS(METHOD\_NAME)}
+ Defines the method to call when the box is processed.
+ \item \texttt{BBTK\_VTK\_PROCESS} Defines AND implements the default processing method for vtk
+ inherited black boxes (calls \texttt{vtkParent::Update})
+ \item \texttt{BBTK\_ITK\_PROCESS} Defines AND implements the default processing method for itk
+ inherited black boxes (calls \texttt{itkParent::Update})
+\end{itemize}
+\end{table}
+%================================================
+
+After the black box class declaration
+then comes a zone in which you describe your black box,
+between the macros \texttt{BBTK\_BEGIN\_DESCRIBE\_BLACK\_BOX}
+and \texttt{BBTK\_END\_DESCRIBE\_BLACK\_BOX}.
+
+The macro \texttt{BBTK\_BEGIN\_DESCRIBE\_BLACK\_BOX}
+actually starts the declaration of another class,
+called \texttt{\textless BOXNAME \textgreater Descriptor}
+(in our case \texttt{MakeFileNameDescriptor}).
+The descriptor of a black box :
+\begin{itemize}
+\item has only one instance, which is stored in the package
+\item provides information about the box type (author, description, ...)
+which is used for documentation.
+\item provides information about the box I/Os, mainly their types
+(uses RTTI : \texttt{std::type\_info} ).
+\item is responsible for creating new instances of the box it describes.
+\end{itemize}
+
+As you can see,
+the macros which are between \texttt{BBTK\_BEGIN\_DESCRIBE\_BLACK\_BOX}
+and \texttt{BBTK\_END\_DESCRIBE\_BLACK\_BOX}
+provide the box name (the string),
+its authors, description, category,
+the descriptions of its inputs and outputs.
+Black box descriptor related
+are described in table \ref{CPPDescriptorBasicMacros}.
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{CPPDescriptorBasicMacros}Black box descriptor \CPP macros}
+\small
+