\documentclass[a4paper,11pt]{report}
\input{config.tex}


\def\todo{\scriptsize\fbox{\bf TODO !!}\normalsize}
\def\x{\bm{x}}
\def\BBTK{{\xspace}The {\bf Black Box Toolkit} }
\def\bbtk{{\xspace}$\texttt{bbtk}$ }
\def\bbi{{\xspace}$\texttt{bbi}$ }
\def\bbStudio{{\xspace}$\texttt{bbStudio}$ }
\def\bbfy{{\xspace}$\texttt{bbfy}$ }
\def\bbdoc{{\xspace}$\texttt{bbdoc}$ }
\def\bbCreatePackage{{\xspace}$\texttt{bbCreatePackage}$ }

\def\bb{{\xspace}$\texttt{bb}$ }
%\def\bbp{{\xspace}$\texttt{bbp}$\xspace}

\def\cmake{{\xspace}$\texttt{cmake}$ }

\def\C{{\xspace}$\texttt{C}$ }
\def\CPP{{\xspace}$\texttt{C++}$ }

\def\xml{{\xspace}$\texttt{xml}$ }

\def\itk{{\xspace}$\texttt{itk}$ }
\def\vtk{{\xspace}$\texttt{vtk}$ }
\def\gdcm{{\xspace}$\texttt{gdcm}$ }
\def\gsmis{{\xspace}$\texttt{gsmis}$ }
\def\wx{{\xspace}$\texttt{wxWidgets}$ }

\def\lin{{\xspace}\textit{Linux} }
\def\win{{\xspace}\textit{Windows} }

% the same macros with no space at the end

\def\BBTKns{{\xspace}The {\bf Black Box Toolkit}}
\def\bbtkns{{\xspace}$\texttt{bbtk}$}
\def\bbins{{\xspace}$\texttt{bbi}$}
\def\bbfyns{{\xspace}$\texttt{bbfy}$}
\def\bbdocns{{\xspace}$\texttt{bbdoc}$}
\def\bbCreatePackagens{{\xspace}$\texttt{bbCreatePackage}$}

\def\bbns{{\xspace}$\texttt{bb}$}
%\def\bbp{{\xspace}$\texttt{bbp}$\xspace}

\def\cmakens{{\xspace}$\texttt{cmake}$}

\def\Cns{{\xspace}$\texttt{C}$}
\def\CPPns{{\xspace}$\texttt{C++}$}

\def\xmlns{{\xspace}$\texttt{xml}$}

\def\itkns{{\xspace}$\texttt{itk}$}
\def\vtkns{{\xspace}$\texttt{vtk}$}
\def\gdcmns{{\xspace}$\texttt{gdcm}$}
\def\gsmisns{{\xspace}$\texttt{gsmis}$}
\def\wxns{{\xspace}$\texttt{wxWidgets}$}

\def\linns{{\xspace}\textit{Linux}}
\def\winns{{\xspace}\textit{Windows}}

\author{L. Guigues}
\title{The Black Box Tool Kit\\Developers' Guide}

\begin{document}
\maketitle
\tableofcontents
\chapter{Introduction}


\chapter{Misc}
\section{Displaying messages}

\section{Types and RTTI}



In \bbtk the class conveying the information on a type is 
\begin{verbatim}
bbtk::TypeInfo
\end{verbatim}
which is simply a typedef on 
\begin{verbatim}
const std::type_info&
\end{verbatim}
Remember that all constructors ofthe std::type\_info class are private, 
hence objects can only be created by the operator \texttt{typeid} 
which returns a const reference on a type\_info. 
Hence the \bbtk type TypeInfo conveys that const reference 
and cannot be itself referenced. 
Any function or method which takes or returns a TypeInfo must take 
or return it \emph{by value} (see e.g. the TypeName function below).
To print the name of a type use one of the template functions 
\begin{verbatim}
template <class T> std::string TypeName();
template <class T> std::string TypeName(const T&);
template <class T> std::string TypeName(bbtk::TypeInfo);
\end{verbatim}


\begin{verbatim}
BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(std::string,"string");
\end{verbatim}

\end{document} 
