diff --git a/bazaar/PolyXML/ClassFactory.cpp b/bazaar/ClassFactory/ClassFactory.cpp similarity index 100% rename from bazaar/PolyXML/ClassFactory.cpp rename to bazaar/ClassFactory/ClassFactory.cpp diff --git a/bazaar/PolyXML/ClassFactory.h b/bazaar/ClassFactory/ClassFactory.h similarity index 100% rename from bazaar/PolyXML/ClassFactory.h rename to bazaar/ClassFactory/ClassFactory.h diff --git a/bazaar/ClassFactory/ClassFactory.upp b/bazaar/ClassFactory/ClassFactory.upp new file mode 100644 index 000000000..8860e0bb8 --- /dev/null +++ b/bazaar/ClassFactory/ClassFactory.upp @@ -0,0 +1,8 @@ +description "Generic class factory - Enables some advanced RTTI\377"; + +file + ClassFactory.h, + ClassFactory.cpp, + src.tpp, + srcdoc.tpp; + diff --git a/bazaar/ClassFactory/init b/bazaar/ClassFactory/init new file mode 100644 index 000000000..f31a47952 --- /dev/null +++ b/bazaar/ClassFactory/init @@ -0,0 +1,3 @@ +#ifndef _ClassFactory_icpp_init_stub +#define _ClassFactory_icpp_init_stub +#endif diff --git a/bazaar/PolyXML/src.tpp/WithFactory$en-us.tpp b/bazaar/ClassFactory/src.tpp/WithFactory$en-us.tpp similarity index 100% rename from bazaar/PolyXML/src.tpp/WithFactory$en-us.tpp rename to bazaar/ClassFactory/src.tpp/WithFactory$en-us.tpp diff --git a/bazaar/ClassFactory/srcdoc.tpp/PolyXML$en-us.tpp b/bazaar/ClassFactory/srcdoc.tpp/PolyXML$en-us.tpp new file mode 100644 index 000000000..2e771a915 --- /dev/null +++ b/bazaar/ClassFactory/srcdoc.tpp/PolyXML$en-us.tpp @@ -0,0 +1,45 @@ +topic "WithFactory and PolyXML"; +[2 $$0,0#00000000000000000000000000000000:Default] +[l288;i1120;a17;O9;~~~.1408;2 $$1,0#10431211400427159095818037425705:param] +[a83;*R6 $$2,5#31310162474203024125188417583966:caption] +[H4;b83;*4 $$3,5#07864147445237544204411237157677:title] +[i288;O9;C2 $$4,6#40027414424643823182269349404212:item] +[b42;a42;2 $$5,5#45413000475342174754091244180557:text] +[l288;b17;a17;2 $$6,6#27521748481378242620020725143825:desc] +[l321;C@5;1 $$7,7#20902679421464641399138805415013:code] +[b2503;2 $$8,0#65142375456100023862071332075487:separator] +[*@(0.0.255)2 $$9,0#83433469410354161042741608181528:base] +[C2 $$10,0#37138531426314131251341829483380:class] +[l288;a17;*1 $$11,11#70004532496200323422659154056402:requirement] +[i417;b42;a42;O9;~~~.416;2 $$12,12#10566046415157235020018451313112:tparam] +[b167;C2 $$13,13#92430459443460461911108080531343:item1] +[i288;a42;O9;C2 $$14,14#77422149456609303542238260500223:item2] +[*@2$(0.128.128)2 $$15,15#34511555403152284025741354420178:NewsDate] +[l321;*C$7;2 $$16,16#03451589433145915344929335295360:result] +[l321;b83;a83;*C$7;2 $$17,17#07531550463529505371228428965313:result`-line] +[l160;*C+117 $$18,5#88603949442205825958800053222425:package`-title] +[2 $$19,0#53580023442335529039900623488521:gap] +[C2 $$20,20#70211524482531209251820423858195:class`-nested] +[b50;2 $$21,21#03324558446220344731010354752573:Par] +[{_}%EN-US +[s2; WithFactory template&] +[s0; &] +[s0; [^topic`:`/`/PolyXML`/src`/WithFactory`$en`-us`#WithFactory`:`:class^ WithFactory +]is a generic class`-factory template.&] +[s0; It allows registering classes derived from it and provide many +useful functions on them :&] +[s0; &] +[s0;i150;O0; Object creation by class name&] +[s0;i150;O0; Query of class name from object&] +[s0;i150;O0; Association of some fields to class types, as an icon, +a group, a description and so on&] +[s0;i150;O0; Query of above fields given any object belonging to +the class hierarchy&] +[s0;i150;O0; Get a list of registered classes belonging to hierarchy&] +[s0; &] +[s0; It`'s the base class template for PolyXML polymorphic serialization +package, but can be used for generic RTTI handling.&] +[s0; &] +[s0; Please see the PolyXMLTest application for a polymorphic serialization +application example.&] +[s0; ] \ No newline at end of file diff --git a/bazaar/PolyXML/PolyXML.h b/bazaar/PolyXML/PolyXML.h index 754cbc0ff..c49cceaa6 100644 --- a/bazaar/PolyXML/PolyXML.h +++ b/bazaar/PolyXML/PolyXML.h @@ -1,7 +1,7 @@ #ifndef _PolyXML_h_ #define _PolyXML_h_ -#include "ClassFactory.h" +#include NAMESPACE_UPP; diff --git a/bazaar/PolyXML/PolyXML.upp b/bazaar/PolyXML/PolyXML.upp index e6ce08a11..ac9a54e9b 100644 --- a/bazaar/PolyXML/PolyXML.upp +++ b/bazaar/PolyXML/PolyXML.upp @@ -1,9 +1,8 @@ uses - Core; + Core, + ClassFactory; file - ClassFactory.h, - ClassFactory.cpp, PolyXML.h, src.tpp, srcdoc.tpp; diff --git a/bazaar/PolyXML/init b/bazaar/PolyXML/init index ef1ddbad7..1d81ece6a 100644 --- a/bazaar/PolyXML/init +++ b/bazaar/PolyXML/init @@ -1,4 +1,5 @@ #ifndef _PolyXML_icpp_init_stub #define _PolyXML_icpp_init_stub #include "Core/init" +#include "ClassFactory/init" #endif diff --git a/bazaar/PolyXML/srcdoc.tpp/PolyXML$en-us.tpp b/bazaar/PolyXML/srcdoc.tpp/PolyXML$en-us.tpp index 06ce39e08..f000efc68 100644 --- a/bazaar/PolyXML/srcdoc.tpp/PolyXML$en-us.tpp +++ b/bazaar/PolyXML/srcdoc.tpp/PolyXML$en-us.tpp @@ -22,25 +22,12 @@ topic "WithFactory and PolyXML"; [C2 $$20,20#70211524482531209251820423858195:class`-nested] [b50;2 $$21,21#03324558446220344731010354752573:Par] [{_}%EN-US -[s2; WithFactory and PolyXML templates&] -[s0; &] -[s0; [^topic`:`/`/PolyXML`/src`/WithFactory`$en`-us`#WithFactory`:`:class^ WithFactory -]is a generic class`-factory template.&] -[s0; It allows registering classes derived from it and provide many -useful functions on them :&] -[s0; &] -[s0;i150;O0; Object creation by class name&] -[s0;i150;O0; Query of class name from object&] -[s0;i150;O0; Association of some fields to class types, as an icon, -a group, a description and so on&] -[s0;i150;O0; Query of above fields given any object belonging to -the class hierarchy&] -[s0;i150;O0; Get a list of registered classes belonging to hierarchy&] +[s2; WithPolyXML template&] [s0; &] [s0; [^topic`:`/`/PolyXML`/src`/WithPolyXML`$en`-us`#WithPolyXML`:`:class^ WithPolyXML ]template, derived from [^topic`:`/`/PolyXML`/src`/WithFactory`$en`-us`#WithFactory`:`:class^ W -ithFactory ]one, provides the necessary behaviour to handle XML -streaming of classes belong to hierarchy.&] +ithFactory ]one (see [* ClassFactory ]package), provides the necessary +behaviour to handle XML streaming of classes belong to hierarchy.&] [s0; All classes derived from [^topic`:`/`/PolyXML`/src`/WithPolyXML`$en`-us`#WithPolyXML`:`:class^ W ithPolyXML ]template can be inserted into any of following containers :&]