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


\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} 
