Next

cpp-reflection

Matúš Chochlík

Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt


Table of Contents

I. Basic C++ reflection facility
1. Introduction
2. Quick reference
3. Examples
II. Mirror template metaprogramming layer
4. Introduction
5. Quick reference
6. Examples
III. Puddle constexpr metaprogramming layer
7. Introduction
8. Quick reference
9. Examples
IV. Lagoon run-time reflection library
10. Introduction
11. Quick reference
V. High-level reflection-based tools
12. Introduction
13. Quick reference
14. Examples
VI. Papers
15. Standard C++ reflection proposals
VII. Implementation
16. Introduction
17. Clang

This is the documentation for the C++ reflection factility proposed for standardization by a series of papers, its implementation(s) and a set of external libraries build on top of the basic reflection facility showing, that it can be used as the foundation for reflection-based utilities and applications using various programming paradigms.

The source code repository for the Mirror reflection utilities can be found at https://github.com/matus-chochlik/mirror.

[Note] Note

The external libraries are at the moment and in the current form not part of the proposal for standard C++ reflection.

[Warning] Warning

This documentation is work-in progress and currently does not cover many of the implemented features.

In order to use the Mirror reflection utilities you need a compiler with reflection support. Mirror is a header-only library, but to build the examples and tests it uses a cmake-based build system with a user-friendly configure Python script. You also need to specify the path to the directory where the reflexpr header file implementing metaobject operations is located by passing the --reflexpr-include-dir option to configure.py.

For example on a Linux system with a bash shell you need to do the following:

$> cd /path/to/mirror/source
$> export CXX=/path/to/modified/clang++
$> ./configure.py --reflexpr-include-dir /path/to/reflexpr/include/ --build-dir _build
$> cd _build
$> make

To configure and build in the default build directory do:

$> cd /path/to/mirror/source
$> export CXX=/path/to/modified/clang++
$> ./configure.py --reflexpr-include-dir /path/to/reflexpr/include/ --build

Invoke configure.py with the --help argument to see the list of all available command-line options.

Users with the bash shell can also use the command-line completion feature for the configuration script by including the config/bash-complete file and using the mirror-config forwarding script:

$> cd /path/to/mirror/source
$> source config/bash-complete
$> ./mirror-config 1

1

Pressing the TAB key here activates the command-line option completion

Last revised: April 19, 2017 at 17:55:01 GMT


Next