A system for reflection in C++
Abstract
Object-oriented programming languages such as Java and Objective C have become popular for implementing agent-based and other object-based simulations since objects in those languages can {\em reflect} (i.e. make runtime queries of an object's structure). This allows, for example, a fairly trivial {\em serialisation} routine (conversion of an object into a binary representation that can be stored or passed over a network) to be written. However C++ does not offer this ability, as type information is thrown away at compile time. Yet C++ is often a preferred development environment, whether for performance reasons or for its expressive features such as operator overloading. In this paper, we present the {\em Classdesc} system which brings many of the benefits of object reflection to C++.
- Publication:
-
arXiv e-prints
- Pub Date:
- January 2004
- DOI:
- 10.48550/arXiv.cs/0401024
- arXiv:
- arXiv:cs/0401024
- Bibcode:
- 2004cs........1024M
- Keywords:
-
- Computer Science - Programming Languages;
- D.1.5;
- D.2.3
- E-Print:
- Proceedings AUUG 2001: Always on and Everywhere, 207. ISBN 0957753225