The aim of the Mirror library is to provide both compile-time and run-time meta-data describing
C++ constructs like namespaces, types
typedef-ined types, enums, classes with their
base classes, member variables, constructors, member functions, 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, a potential drawback of this library is, that namespaces, 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, a portable tool for automatic / semi-automatic registering is 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. This allows you to do reflection even on third-party code that you cannot modify.
The Mirror suite consists of the following components:
type_traitslibrary. Allows to write compile-time meta-programs which can generate efficient program code based on the meta-data provided by reflection.
object-ishlayer, with some run-time features, built on top of Mirror. Simplifies the compile-time reflective programming.
The current and the previous releases of the packaged sources of Mirror (with Puddle and Lagoon) can be downloaded from Sourceforge at the following url: http://sourceforge.net/projects/mirror-lib/files/. The latest releases can alternatively also be downloaded from here.
The current and the previous releases of the packaged sources of MAuReEn can be downloaded from here.
Git users can get anonymous read-only access to the source repository
by using the following command:
git clone git://mirror-lib.git.sourceforge.net/gitroot/mirror-lib/mirror-lib
Anonymous read-only access to the (MAuReEn's) source repository can be obtained
by using the following command:
git clone git://gitorious.org/maureen/maureen.git
Mirror does not use any compiler-specific extensions and should be usable with any compiler implementing the C++11 features. It has been tested and is currently known to work with the following compilers:
Mirror currently does not have any external dependencies besides the (C++11) 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).
wx_gui_factorygenerator plugin which can be used together with the factory generator utility to create GUI dialogs for the input of parameters necessary for the construction of instances of various types (requires wxWidgets [www.wxwidgets.org]).
libpq_factoryis dependent on the PostgreSQL C client library.
soci_factoryrequires the SOCI C++ database access library. Many backends also need a database-specific client library like libpq, etc.
rapidxml_factoryrequires the RapidXML XML parsing library.
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++11) version draws from more than one and half year of user experience with the previous version and is in development since September 2009.