]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/tti/doc/tti_introduction.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / tti / doc / tti_introduction.qbk
CommitLineData
7c673cae
FG
1[/
2 (C) Copyright Edward Diener 2011,2012
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[section:tti_intro Introduction]
9
10Welcome to the Boost Type Traits Introspection library, abbreviated TTI.
11
12TTI is a library which provides the ability to introspect by name the elements
13of a type at compile time.
14
15TTI works through macros generating metafunctions. Metafunctions are class
16templates of a particular syntax, having a nested 'type' member. So wherever
17in C++ class templates can occur, TTI macros can be used. The metafunctions
18generated by TTI are no different from any other metafunction as defined by
19the Boost MPL library.
20
21The metafunctions generated by TTI are used to introspect elements of a type
22at compile time, always passing at minimum to each metafunction the enclosing
23type being introspected.
24
25The name of the library has been chosen because the library offers
26compile time functionality on a type, similar to the Boost Type Traits library,
27and because the functionality the library offers is the ability to introspect
28a type about the existence of a specific element within that type.
29
30I use the word "introspect" in a very broad sense here. Normally computer
31language introspection means initially asking for information to be returned
32by name, which can then further be used to introspect for more specific
33information. In the TTI library one must always know and supply the name, and
34use the functionality provided for the correct type of inner element to find
35out if that particular named entity exists.
36
37You may prefer the term "query" instead of "introspection" to denote what this
38library does, but I use terminology based on the word "introspect" throughout
39this documentation.
40
41The functionality of the library may be summed up as:
42
43* Provide the means to introspect a type at compile time
44 using a set of macros. Each macro takes the name of the
45 type's element and generates a metafunction which can be
46 subsequently invoked to determine whether or not the
47 element exists within the type. These generated metafunctions
48 will be called "macro metafunctions" in the documentation.
49
50* Provide the means to create a typedef for a type which may
51 not exist. This typedef type can be used as a type in the
52 metafunctions of the library without producing compile-time
53 errors.
54
55The library is dependent on Boost PP, Boost MPL,
56Boost Type Traits, and Boost Function Types.
57
58The library is also dependent on the variadic macro support
59of the Boost PP library if the variadic macros in the library
60are used.
61
62The library is a header only library.
63
64Since the dependencies of the library are all header only
65libraries, there is no need to build a library in order to use
66the TTI library.
67
68[section:tti_headers Header Files]
69
70There are is a single header file, `boost/tti/tti.hpp`,
71which includes all the header files in the library.
72
73There are also separate specific header files for each of the elements
74to be introspected by the library. This allows for finer-grained inclusion
75of the nested elements to be introspected. These header files are:
76
77[table:tbhfiles TTI Header Files
78 [
79 [Introspected Element]
80 [Specific Header File]
81 ]
82 [
83 [Type]
84 [[headerref boost/tti/has_type.hpp `has_type.hpp`]]
85 ]
86 [
87 [Class Template]
88 [[headerref boost/tti/has_template.hpp `has_template.hpp`]]
89 ]
90 [
91 [Member data]
92 [[headerref boost/tti/has_member_data.hpp `has_member_data.hpp`]]
93 ]
94 [
95 [Member function]
96 [[headerref boost/tti/has_member_function.hpp `has_member_function.hpp`]]
97 ]
98 [
99 [Static member data]
100 [[headerref boost/tti/has_static_member_data.hpp `has_static_member_data.hpp`]]
101 ]
102 [
103 [Static member function]
104 [[headerref boost/tti/has_static_member_function.hpp `has_static_member_function.hpp`]]
105 ]
106 [
107 [Data]
108 [[headerref boost/tti/has_data.hpp `has_data.hpp`]]
109 ]
110 [
111 [Function]
112 [[headerref boost/tti/has_function.hpp `has_function.hpp`]]
113 ]
114 [
115 [Member Type Creation]
116 [[headerref boost/tti/member_type.hpp `member_type.hpp`]]
117 ]
118]
119
120[endsect]
121
122[endsect]