Table of Contents
As mentioned in previous chapters, the Massiv Core needs information about classes and objects that are not provided by the C++ language itself to implement object serialization, replication, migration, RPC and other features. All managed objects must be described in IDL files, which are processed by the factgen.pl utility, that generates (besides others) source code of metaobjects - objects that provide all necessary information about managed classes, their inheritance, properties and methods.
While metaobjects are used extensively by the Core, a large part of their API is public and can be used by the programmer to perform object introspection (obtaining information about objects and their classes at run-time).
For each managed class defined in the IDL, also the two following C++ classes are generated:
A class that implements MetaObject interface. It provides the object introspection.
A class that implements ObjectFactory interface. It allows you to create object instances.
Metaobjects are singletons - single instance of MetaObject and ObjectFactory is created for each managed class known to the node during the node startup.
Both MetaObject and ObjectFactory are briefly described in this chapter. However, only an overview of metaobject structures and methods is provided. Please refer to the Massiv Core Reference Guide for in-depth information about the interfaces.