Portable reflection for C++ with the Mirror library

Matus Chochlik

Abstract


Reflection and reflective programming can be used for a wide range of tasks such as implementation
of serialization-like operations, remote procedure calls, scripting, automated GUIgeneration,
implementation of several software design patterns, etc. C++ as one of the most
prevalent programming languages however, for various reasons, lacks a standardized reflection
facility. In this paper we present Mirror - a portable library adding reflection to C++ with a
command-line utility automating its usage. This library supports functional style static compiletime
reflection and metaprogramming and also provides two different object-oriented run-time
polymorphic layers for dynamic reflection.

Keywords


reflection; reflective programming; metaprogramming; design-pattern implementation

Full Text:

PDF


Journal of Information and Organizational Sciences (Online)
ISSN 1846-9418 (online)
ISSN 1846-3312 (print)