Author: anthony_pajot
Date: Tue Oct 23 21:21:42 2007
New Revision: 38

URL: http://svn.gna.org/viewcvs/pflex-framework?rev=38&view=rev
Log:
completely reviewed the plugin instancing process. Introduced PFlex_Instancer 
to manage all this, gaining better flexibility and a better type safety.
Above all, permit to dynamically create instances of plugin, even if the 
instances are not declared in the XML file. 
So to come : the construction <dynamic-plugin name="..." 
plugin-name="...."....>...</dynamic-plugin>, that will permit to specify 
special kind of slots,especially when the number of instances is not known in 
advance. for instance, one could have :
<plugin-init name="tree" instance-name="my tree">
        <dynamic-plugin name="node type" plugin-name="n_way_nodes" n="32" />
        .... (the datas to put in the tree, or the file from which to take the 
datas, etc)
</plugin-init>

here, no one can know how many nodes it will take, it is the role of the tree 
plugin to compute it. And if the tree is modified during runtime, the type of 
node will always be the one specified in "node type". The "n" is an example of 
parameters that are owned by the plugin "n_way_nodes" and that will be read by 
the instancer and taken into account when the tree plugin will call for the 
creation of a new node (the node plugin author will have to create a instancer 
class inheriting PFlex_Instancer_Base<N_Way_Node_Plugin> and implement the 
"configure_for_dynamic_instancing" function).

Added:
    trunk/pflex_framework/include/plugins/pflex_instancer.hpp
Modified:
    trunk/pflex_framework/include/plugins/plugin_itf.hpp
    trunk/pflex_framework/include/plugins/plugin_repository.hpp
    trunk/pflex_framework/src/plugins/plugin_repository.cpp


_______________________________________________
Pflex-framework-commits mailing list
[email protected]
https://mail.gna.org/listinfo/pflex-framework-commits

Reply via email to