MetaFlex: A Flexible Metaclass Generator

Motivated to support the needs of component-based applications, we have developed a system called MetaFlex that generates metaclasses to extend the behavior of our C++ classes without inventing variants of the original classes. We make the case that a flexible metaclass generator service that allows developers to freely choose the kind and degree of detail for each metaclass is neededand present our architecturefor making this specification. We also illustrate a powerful use of this technique with a scripting extension to our application framework. With an evaluation of our current MetaFlex implementation and its use with the scripting extension, we conclude that this service is best provided by compiler vendors.