Journal of Information and Organizational Sciences (Jun 2012)

Portable reflection for C++ with the Mirror library

  • Matus Chochlik

Journal volume & issue
Vol. 36, no. 1

Abstract

Read online

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

Keywords