1 \documentclass[a4paper,11pt]{report}
6 \title{The Black Box Tool Kit\\Developers' Guide}
11 \chapter{Introduction}
15 \section{Displaying messages}
17 \section{Types and RTTI}
21 In \bbtk the class conveying the information on a type is
25 which is simply a typedef on
29 Remember that all constructors ofthe std::type\_info class are private,
30 hence objects can only be created by the operator \texttt{typeid}
31 which returns a const reference on a type\_info.
32 Hence the \bbtk type TypeInfo conveys that const reference
33 and cannot be itself referenced.
34 Any function or method which takes or returns a TypeInfo must take
35 or return it \emph{by value} (see e.g. the TypeName function below).
36 To print the name of a type use one of the template functions
38 template <class T> std::string TypeName();
39 template <class T> std::string TypeName(const T&);
40 template <class T> std::string TypeName(bbtk::TypeInfo);
45 BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(std::string,"string");