Sunday, Afternoon
Metaclasses in C++ – Reflection for Existing Classes
Convention Ctr – 202A
Detlef Vollmann, Vollmann Engineering GmbH

Reflection is a programming technique for object-oriented architectures to provide better extensibility of a system (especially at run-time) and means for uniform generic behavior (such as persistency).

While languages like Smalltalk and Java provide built-in mechanisms for reflection, C++ lacks such a provision. Though several well-known patterns exist for implementing reflection through a metaobject protocol in C++, they typically require the usage of this protocol for all access to the real (non-meta) classes, forcing an unnatural style of programming.

This tutorial presents some lesser-known C++ constructs that can be used to provide metaclass facilities to existing normal C++ classes, enabling both normal direct access and reflective access to these classes. Participants will acquire a thorough understanding of the potentials of reflective programming techniques and some patterns to implement them effectively in C++. One major application of the presented techniques will be shown in the tutorial “XML Dynamically with C++.”

Presentation Format: Presentation based.

Attendee Background: Participants should have a good working knowledge of ISO C++. Advanced features of the language used in this tutorial will be explained.

Detlef Vollmann has a background of 15 years in software engineering and more than 10 years with object technology. As an independent consultant he supports several Swiss companies with the design of object-oriented systems. Since 1991 he has authored and taught courses in C++, Object-Oriented Technologies, Software Architecture, and Distributed Computing for Swiss Digicomp AG.

Tutorials
at a Glance
Tutorials by Track
Full Description
of all Tutorials
Final Program

 OOPSLA'98 Home