mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.PolyXML: Some small fixes in doc
git-svn-id: svn://ultimatepp.org/upp/trunk@5005 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e956bcffee
commit
894ea8c3e1
2 changed files with 12 additions and 12 deletions
|
|
@ -15,9 +15,9 @@ topic "WithFactory";
|
|||
[s4; [*C@4 T]-|Type of base class of polymorphic hyerarchy.&]
|
||||
[s5; This template class adds some RTTI (Run Time Type Identification)
|
||||
to your classes, and implements a so called `'class factory`',
|
||||
bringing the ability to register class hyerarchies, construct
|
||||
bringing the ability to register class hierarchies, construct
|
||||
them by name, check their type at runtime, list all classes in
|
||||
hyerarchy and so on. &]
|
||||
hierarchy and so on. &]
|
||||
[s5; It`'s a base behaviour for most polymorphic class usage.&]
|
||||
[s2; &]
|
||||
[s3;%- &]
|
||||
|
|
@ -31,7 +31,7 @@ derive from WithFactory :&]
|
|||
[s2; [* `{]&]
|
||||
[s2; [* -|-|.........]&]
|
||||
[s2; [* `};]&]
|
||||
[s5; Then you can derive your class hyerarchy from base, as usual
|
||||
[s5; Then you can derive your class hierarchy from base, as usual
|
||||
:&]
|
||||
[s0; &]
|
||||
[s2; [* class MyDerivedClass : public MyBaseClass]&]
|
||||
|
|
@ -71,7 +71,7 @@ member function `::&]
|
|||
[s2; [* MyBaseClass `*ptr `= new MyDerivedClass;]&]
|
||||
[s2; [* String classType `= ptr`->IsA(); ]returns the string `"MyDerivedClass`"&]
|
||||
[s0; &]
|
||||
[s5; You can also list at runtime your class hyerarchy by mean of
|
||||
[s5; You can also list at runtime your class hierarchy by mean of
|
||||
static member [* Classes()]:&]
|
||||
[s5; &]
|
||||
[s2; [* Vector<String> const `&classList `= MyBaseClass`::Classes();]&]
|
||||
|
|
@ -125,20 +125,20 @@ of class grouping. [%-*@3 Index] can be any integer number [%-*@3 icon
|
|||
[s7;:WithFactory`:`:Create`(const String`&`):%- [@(0.0.255) static]
|
||||
[_^One^ One]<[*@4 T]>_[* CreateInstance]([@(0.0.255) const]_[_^String^ String]_`&[*@3 classNa
|
||||
me])&]
|
||||
[s2; Creates a class derived from hyerarchy base T by its [%-*@3 className].&]
|
||||
[s2; Creates a class derived from hierarchy base T by its [%-*@3 className].&]
|
||||
[s2; Returns a smart pointer to the base class T&]
|
||||
[s3; &]
|
||||
[s6;%- &]
|
||||
[s7;:WithFactory`:`:CreatePtr`(String const`&`):%- [@(0.0.255) static]
|
||||
[*@4 T]_`*[* CreatePtr]([_^String^ String]_[@(0.0.255) const]_`&[*@3 className])&]
|
||||
[s2; Creates a class derived from hyerarchy base T by its [%-*@3 className].&]
|
||||
[s2; Creates a class derived from hierarchy base T by its [%-*@3 className].&]
|
||||
[s2; Returns a traditional pointer to the base class T&]
|
||||
[s3; &]
|
||||
[s6;%- &]
|
||||
[s7;:WithFactory`:`:Classes`(void`):%- [@(0.0.255) static] [_^Vector^ Vector]<[_^String^ St
|
||||
ring]>_[@(0.0.255) const]_`&[* Classes]([@(0.0.255) void])&]
|
||||
[s2; Returns Vector of strings containing all registered class names
|
||||
in hyerarchy.&]
|
||||
in hierarchy.&]
|
||||
[s3;%- &]
|
||||
[s6;%- &]
|
||||
[s7;:WithFactory`:`:GetClassDescription`(const String`&`):%- [@(0.0.255) static]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ topic "WithPolyXML";
|
|||
[s1;:noref: [@(0.0.255)3 template][3 _<][@(0.0.255)3 class][3 _][*@4;3 T][3 >]&]
|
||||
[s1;:WithPolyXML`:`:class: [@(0.0.255) class]_[* WithPolyXML]_:_[@(0.0.255) public]_[*@3 WithF
|
||||
actory]<[*@4 T]>_&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hyerarchy.&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hierarchy.&]
|
||||
[s0;%% This template class implements the base behaviour of polymorphic
|
||||
classes that needs to be streamed in XML format.&]
|
||||
[s3;%% &]
|
||||
|
|
@ -23,7 +23,7 @@ classes that needs to be streamed in XML format.&]
|
|||
[s1;:noref: [@(0.0.255)3 template][3 _<][@(0.0.255)3 class][3 _][*@4;3 T][3 >]&]
|
||||
[s1;:PolyXMLArray`:`:class: [@(0.0.255) class]_[* PolyXMLArray]_:_[@(0.0.255) public]_[*@3 Arr
|
||||
ay]<[*@4 T]>_&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hyerarchy.&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hierarchy.&]
|
||||
[s0;%% This template class implements the base behaviour of an XML`-streamable
|
||||
polymorphic Array container.&]
|
||||
[s2;%% &]
|
||||
|
|
@ -32,7 +32,7 @@ polymorphic Array container.&]
|
|||
class][3 _][*@4;3 T][3 >]&]
|
||||
[s1;:PolyXMLArrayMap`:`:class: [@(0.0.255) class]_[* PolyXMLArrayMap]_:_[@(0.0.255) public]_
|
||||
[*@3 ArrayMap]<[*@4 K ][* , ][*@4 T]>_&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hyerarchy.&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hierarchy.&]
|
||||
[s0;%% This template class implements the base behaviour of an XML`-streamable
|
||||
polymorphic ArrayMap container.&]
|
||||
[s2;%% &]
|
||||
|
|
@ -41,7 +41,7 @@ polymorphic ArrayMap container.&]
|
|||
class][3 _][*@4;3 T][3 >]&]
|
||||
[s1;:PolyXMLArrayMapOne`:`:class: [@(0.0.255) class]_[* PolyXMLArrayMapOne]_:_[@(0.0.255) pu
|
||||
blic]_[*@3 ArrayMap]<[*@4 K ][* , One<][*@4 T]> >_&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hyerarchy.&]
|
||||
[s8;%% [*C@4 T]-|Type of base class of polymorphic hierarchy.&]
|
||||
[s0;%% This template class implements the base behaviour of an XML`-streamable
|
||||
polymorphic ArrayMap container, where Value type is of type [%-* One<][%-*@4 T][%- >].&]
|
||||
[s2;%% &]
|
||||
|
|
@ -67,7 +67,7 @@ just derive from [* WithPolyXML ]template :&]
|
|||
[s2;%% [* `};]&]
|
||||
[s9;%% &]
|
||||
[s9;%% The [* Xmlize()] virtual member function must be defined in
|
||||
each class in the hyerarchy; its purpose is to XML`-ize [* ONLY
|
||||
each class in the hierarchy; its purpose is to XML`-ize [* ONLY
|
||||
]the direct members of the class. Because of that, in each derived
|
||||
class you must call [* AT FIRST] the parent`'s class [* Xmlize()]
|
||||
from inside it; here an example:&]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue