Metaobject Protocol (MOP)

At the meta level, the (base-level) programs are represented by objects of a few predefined classes (and their subclasses that programmers define). These objects are called metaobjects because they are meta representation of the programs. Source-to-source translation from OpenC++ to C++ is implemented by manipulating those metaobjects.

The following several sections show details of such metaobjects. They reflect various aspects of programs that are not accessible in C++. Although most of metaobjects provide means of introspection, some metaobjects represent a behavioral aspect of the program and enables to control source-to-source translation of the program. Here is the list of metaobjects:

Distinguishing TypeInfo metaobjects and Class metaobjects might look like wrong design. But this distinction is needed to handle derived types. TypeInfo metaobjects were introduced to deal with derived types and fundamental types by using the same kind of metaobjects.


[First | Prev | Next]