Copyright © 2006-2010 Matus Chochlik
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)
This manual is divided into the following sections:
The aim of the Mirror library is to provide both compile-time and run-time meta-data describing common C++ constructs like namespaces, types (and as an important special case typedef-ined types), classes and their base classes and member variables, constructors, etc. and to provide uniform and generic interfaces for their introspection.
Because standard C++ provides only a very limited set of meta-information to build upon, the main drawback of this library is, that namespace, types, classes, etc. need to be registered before they can be reflected. However Mirror tries to make the process of registering simple by providing a set of user-friendly registering macros and has the native and many of the other common types, classes, templates and namespaces pre-registered.
Furthermore several tools for automatic / semi-automatic registering are being worked on.
Once registered the meta-data can be reused in a large number of situations.
Mirror is designed with the principle of stratification in mind and tries to be as less intrusive as possible. New or existing classes do not need to be designed to directly support Mirror and no Mirror-related code is necessary in the class' definition, as far as some general guidelines are followed.
Mirror provides a compile-time reflection layer which can be used in compile-time meta-programs and a run-time layer with a similar, but dynamic interface based on the compile-time meta-data.
The current and the previous releases of the packaged sources can be downloaded from Sourceforge at the following url: http://sourceforge.net/projects/mirror-lib/files/, or from the Boost Vault [www.boostpro.com] by using this download link.
Subversion users can get anonymous read-only access to the source repository. To access the current development code one would check out from the main trunk (located at https://mirror-lib.svn.sourceforge.net/svnroot/mirror-lib/trunk) using the following svn command:
svn co https://mirror-lib.svn.sourceforge.net/svnroot/mirror-lib/trunk mirror-trunk
To check out the whole repository including the branches and tags one might do:
svn co https://mirror-lib.svn.sourceforge.net/svnroot/mirror-lib mirror
The previous (non C++1x) version of Mirror can be downloaded from the Boost Vault (direct link [www.boostpro.com]) or checked out from the Boost Sandbox subversion repository at the following url: http://svn.boost.org/svn/boost/sandbox/mirror/ the documentation for this version is located here [svn.boost.org].
Mirror is a header-only library which means that you don't need build nor link to any separate library to use it. All that is needed to use Mirror is to include the $MIRROR_ROOT/mirror.hpp header. To use Mirror without the pre-registered namespaces, types, classes, templates, include the $MIRROR_ROOT/mirror_no_prereg.hpp header.
Mirror currently does not have any external dependencies besides the (C++1x) standard library (with the exception of several tools listed below, which are however, not required for the use of the main features of the library).
The Mirror library is currently known to work with the following compilers:
Mirror does not use any compiler-specific extensions and should be usable with any C++1x ready compiler.
This version of the Mirror library is a major rewrite of a previous version which has been developed in C++98 since April 2008 (available in the Boost Sandbox [svn.boost.org]).
The new (C++1x) version draws from more than one and half year of user experience with the previous version and is in development since September 2009.