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