Planet
navihomeaboutscreenshotsdownloaddevelopmentforum

ClassFactory

Description

The ClassFactory is a template, creating objects of the specified template argument. Every class calling the CreateFactory(classname) macro from CoreIncludes has a ClassFactory in its Identifier to create new objects with the fabricate() function.

Additionally the ClassFactory helps creating the class hierarchy. To generate the class tree, instances of the leaves of the tree have to be created. But only classes with an existing ClassFactory can be created. Of course the class tree can be created on the fly, but the earlier an object gets created, the earlier informations like the name of the class are available in the Identifier. That's why the ClassFactory plays an important role.