What's big and green, and if it falls out of a tree it'll kill you? A pool table. | ||
--Gary Larson |
DynamicClassMaster is a class that handles loading and managing of "plugin" (rappresented in AFC with the DynamicClass).
DynamicClasses cannot be used by their own: you need a DynamicClassMaster to load them and make them avaible to your applications.
Main features of DynamicClassMaster are:
It automatically enlarges array size when new space is needed
It offers some APIs to handle the array like it was a double linked list, infact you can browse throught the array with calls like afc_array_master_first() afc_array_master_succ() afc_array_master_prev() and so on.
It offers a customizable, lightspeed fast sort routine. See afc_array_master_sort() for more info
To load a DynamicClass inside your DynamicClassMaster, simply call the afc_dynamic_class_master_load() method. This will load the "plugin" in memory.
Once a "plugin" definition is in memory, you can create an instance of it by calling the afc_dynamic_class_master_new_instance() method. Remember to free all instances by calling the afc_dynamic_class_master_delete_instance() method once you have done with them. Anyway, they'll all be freed automatically by DynamicClassMaster before exiting.