1 \documentclass[a4paper,11pt]{report}
5 \def\todo{\scriptsize\fbox{\bf TODO !!}\normalsize}
7 \def\BBTK{{\xspace}The {\bf Black Box Toolkit} }
8 \def\bbtk{{\xspace}$\texttt{bbtk}$ }
9 \def\bbi{{\xspace}$\texttt{bbi}$ }
10 \def\bbStudio{{\xspace}$\texttt{bbStudio}$ }
11 \def\bbfy{{\xspace}$\texttt{bbfy}$ }
12 \def\bbdoc{{\xspace}$\texttt{bbdoc}$ }
13 \def\bbCreatePackage{{\xspace}$\texttt{bbCreatePackage}$ }
15 \def\bb{{\xspace}$\texttt{bb}$ }
16 %\def\bbp{{\xspace}$\texttt{bbp}$\xspace}
18 \def\cmake{{\xspace}$\texttt{cmake}$ }
20 \def\C{{\xspace}$\texttt{C}$ }
21 \def\CPP{{\xspace}$\texttt{C++}$ }
23 \def\xml{{\xspace}$\texttt{xml}$ }
25 \def\itk{{\xspace}$\texttt{itk}$ }
26 \def\vtk{{\xspace}$\texttt{vtk}$ }
27 \def\gdcm{{\xspace}$\texttt{gdcm}$ }
28 \def\gsmis{{\xspace}$\texttt{gsmis}$ }
29 \def\wx{{\xspace}$\texttt{wxWidgets}$ }
31 \def\lin{{\xspace}\textit{Linux} }
32 \def\win{{\xspace}\textit{Windows} }
34 % the same macros with no space at the end
36 \def\BBTKns{{\xspace}The {\bf Black Box Toolkit}}
37 \def\bbtkns{{\xspace}$\texttt{bbtk}$}
38 \def\bbins{{\xspace}$\texttt{bbi}$}
39 \def\bbfyns{{\xspace}$\texttt{bbfy}$}
40 \def\bbdocns{{\xspace}$\texttt{bbdoc}$}
41 \def\bbCreatePackagens{{\xspace}$\texttt{bbCreatePackage}$}
43 \def\bbns{{\xspace}$\texttt{bb}$}
44 %\def\bbp{{\xspace}$\texttt{bbp}$\xspace}
46 \def\cmakens{{\xspace}$\texttt{cmake}$}
48 \def\Cns{{\xspace}$\texttt{C}$}
49 \def\CPPns{{\xspace}$\texttt{C++}$}
51 \def\xmlns{{\xspace}$\texttt{xml}$}
53 \def\itkns{{\xspace}$\texttt{itk}$}
54 \def\vtkns{{\xspace}$\texttt{vtk}$}
55 \def\gdcmns{{\xspace}$\texttt{gdcm}$}
56 \def\gsmisns{{\xspace}$\texttt{gsmis}$}
57 \def\wxns{{\xspace}$\texttt{wxWidgets}$}
59 \def\linns{{\xspace}\textit{Linux}}
60 \def\winns{{\xspace}\textit{Windows}}
63 \title{The Black Box Tool Kit\\Developers' Guide}
68 \chapter{Introduction}
72 \section{Displaying messages}
74 \section{Types and RTTI}
78 In \bbtk the class conveying the information on a type is
82 which is simply a typedef on
86 Remember that all constructors ofthe std::type\_info class are private,
87 hence objects can only be created by the operator \texttt{typeid}
88 which returns a const reference on a type\_info.
89 Hence the \bbtk type TypeInfo conveys that const reference
90 and cannot be itself referenced.
91 Any function or method which takes or returns a TypeInfo must take
92 or return it \emph{by value} (see e.g. the TypeName function below).
93 To print the name of a type use one of the template functions
95 template <class T> std::string TypeName();
96 template <class T> std::string TypeName(const T&);
97 template <class T> std::string TypeName(bbtk::TypeInfo);
102 BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(std::string,"string");