8 #include <boost/python.hpp>
9 #include <boost/type_index.hpp>
18 typedef std::type_index Self;
19 if (register_symbolic_link_to_registered_type<Self>())
return;
23 "The class type_index holds implementation-specific information about a "
24 "type, including the name of the type and means to compare two types for "
25 "equality or collating order.",
27 .def(bp::self == bp::self)
28 .def(bp::self >= bp::self)
29 .def(bp::self > bp::self)
30 .def(bp::self < bp::self)
31 .def(bp::self <= bp::self)
32 .def(
"hash_code", &Self::hash_code, bp::arg(
"self"),
33 "Returns an unspecified value (here denoted by hash code) such that "
34 "for all std::type_info objects referring to the same type, their "
35 "hash code is the same.")
37 "Returns an implementation defined null-terminated character string "
38 "containing the name of the type. No guarantees are given; in "
39 "particular, the returned string can be identical for several types "
40 "and change between invocations of the same program.")
43 +[](
const Self &
value) -> std::string {
44 return boost::core::demangle(
value.name());
46 bp::arg(
"self"),
"Human readible name.");
50 typedef boost::typeindex::type_index Self;
51 if (register_symbolic_link_to_registered_type<Self>())
return;
55 "The class type_index holds implementation-specific information about a "
56 "type, including the name of the type and means to compare two types for "
57 "equality or collating order.",
59 .def(bp::self == bp::self)
60 .def(bp::self >= bp::self)
61 .def(bp::self > bp::self)
62 .def(bp::self < bp::self)
63 .def(bp::self <= bp::self)
64 .def(
"hash_code", &Self::hash_code, bp::arg(
"self"),
65 "Returns an unspecified value (here denoted by hash code) such that "
66 "for all std::type_info objects referring to the same type, their "
67 "hash code is the same.")
69 "Returns an implementation defined null-terminated character string "
70 "containing the name of the type. No guarantees are given; in "
71 "particular, the returned string can be identical for several types "
72 "and change between invocations of the same program.")
73 .def(
"pretty_name", &Self::pretty_name, bp::arg(
"self"),
74 "Human readible name.");