1 | \hypertarget{classCompoundUserInfo}{ |
---|
2 | \section{CompoundUserInfo$<$ T $>$ Class Template Reference} |
---|
3 | \label{classCompoundUserInfo}\index{CompoundUserInfo@{CompoundUserInfo}} |
---|
4 | } |
---|
5 | The main userinfo template class. You should derive this class whenever you need a new userinfo of a class which is compound from smaller elements (all having its own userinfo class prepared). |
---|
6 | |
---|
7 | |
---|
8 | {\tt \#include $<$userinfo.h$>$} |
---|
9 | |
---|
10 | Inheritance diagram for CompoundUserInfo$<$ T $>$:\nopagebreak |
---|
11 | \begin{figure}[H] |
---|
12 | \begin{center} |
---|
13 | \leavevmode |
---|
14 | \includegraphics[width=179pt]{classCompoundUserInfo__inherit__graph} |
---|
15 | \end{center} |
---|
16 | \end{figure} |
---|
17 | Collaboration diagram for CompoundUserInfo$<$ T $>$:\nopagebreak |
---|
18 | \begin{figure}[H] |
---|
19 | \begin{center} |
---|
20 | \leavevmode |
---|
21 | \includegraphics[width=137pt]{classCompoundUserInfo__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Static Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | {\footnotesize template$<$class T$>$ }\\static T $\ast$ \hyperlink{classUserInfo_0f090c6525a3e8fb11634a553f467ede}{Assembly} (DOMElement \&element, const string tagName) |
---|
28 | \item |
---|
29 | {\footnotesize template$<$class T$>$ }\\static bool \hyperlink{classUserInfo_1d402661b82feccb5265a70f65c242e1}{Disassembly} (T \&\hyperlink{classTypedUserInfo_c7ad10a9ff002383518155c965ade85c}{instance}, DOMElement \&element, const string tagName, const string help) |
---|
30 | \item |
---|
31 | {\footnotesize template$<$class T$>$ }\\static bool \hyperlink{classUserInfo_917b2257abc31b94c89ef3cd270e4a42}{Disassembly} (T \&\hyperlink{classTypedUserInfo_c7ad10a9ff002383518155c965ade85c}{instance}, DOMElement \&element, const string tagName) |
---|
32 | \end{CompactItemize} |
---|
33 | \subsection*{Protected Member Functions} |
---|
34 | \begin{CompactItemize} |
---|
35 | \item |
---|
36 | \hypertarget{classCompoundUserInfo_e2265e447e2f48550c5d8d479119bbb3}{ |
---|
37 | \textbf{CompoundUserInfo} (string userFriendlyTypeName)} |
---|
38 | \label{classCompoundUserInfo_e2265e447e2f48550c5d8d479119bbb3} |
---|
39 | |
---|
40 | \item |
---|
41 | \hypertarget{classBindingFrame_2244bd5181c3d1e70f3a6be2b72e9424}{ |
---|
42 | string \hyperlink{classBindingFrame_2244bd5181c3d1e70f3a6be2b72e9424}{XMLCh2str} (const XMLCh $\ast$const XMLCh\_\-str)} |
---|
43 | \label{classBindingFrame_2244bd5181c3d1e70f3a6be2b72e9424} |
---|
44 | |
---|
45 | \begin{CompactList}\small\item\em function which transcodes Xerces' XMLCh-based strings into C++ strings \item\end{CompactList}\item |
---|
46 | \hypertarget{classBindingFrame_820e4df85c0dc545e3079e407fcdbbaa}{ |
---|
47 | string \textbf{removeSpaces} (const string \&\hyperlink{classstr}{str})} |
---|
48 | \label{classBindingFrame_820e4df85c0dc545e3079e407fcdbbaa} |
---|
49 | |
---|
50 | \end{CompactItemize} |
---|
51 | \subsection*{Static Protected Attributes} |
---|
52 | \begin{CompactItemize} |
---|
53 | \item |
---|
54 | static const \hyperlink{classTypedUserInfo}{TypedUserInfo}$<$ T $>$ \& \hyperlink{classTypedUserInfo_c7ad10a9ff002383518155c965ade85c}{instance} |
---|
55 | \end{CompactItemize} |
---|
56 | \subsection*{Classes} |
---|
57 | \begin{CompactItemize} |
---|
58 | \item |
---|
59 | class \hyperlink{classCompoundUserInfo_1_1BindedElement}{BindedElement} |
---|
60 | \begin{CompactList}\small\item\em Templated class binding inner element with its XML tag and automating data transfers in both directions. \item\end{CompactList}\end{CompactItemize} |
---|
61 | |
---|
62 | |
---|
63 | \subsection{Detailed Description} |
---|
64 | \subsubsection*{template$<$typename T$>$ class CompoundUserInfo$<$ T $>$} |
---|
65 | |
---|
66 | The main userinfo template class. You should derive this class whenever you need a new userinfo of a class which is compound from smaller elements (all having its own userinfo class prepared). |
---|
67 | |
---|
68 | To bind some inner element to its own userinfo class, and also to automate its assembling and disassembling, it is necessary to create a instance of an inner templated class BindedElement$<$T$>$. Those attributes have to be initialized in constructor of a new compound userinfo this way: |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | \begin{Code}\begin{verbatim}class BikeUI: public CompoundUserInfo<Bike> |
---|
73 | { |
---|
74 | private: |
---|
75 | BindedElement<int> year; |
---|
76 | BindedElement<bool> lights; |
---|
77 | BindedElement<string> manufacturer; |
---|
78 | public: |
---|
79 | BikeUI() |
---|
80 | :CompoundUserInfo<Bike>("bike"), |
---|
81 | year( this, "year", 0 ), |
---|
82 | lights( this, "electric lights", false ), |
---|
83 | manufacturer( this, "manufacturer", "unknown") |
---|
84 | { |
---|
85 | } |
---|
86 | |
---|
87 | ... |
---|
88 | } |
---|
89 | \end{verbatim} |
---|
90 | \end{Code} |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | \subsection{Member Function Documentation} |
---|
95 | \hypertarget{classUserInfo_0f090c6525a3e8fb11634a553f467ede}{ |
---|
96 | \index{CompoundUserInfo@{CompoundUserInfo}!Assembly@{Assembly}} |
---|
97 | \index{Assembly@{Assembly}!CompoundUserInfo@{CompoundUserInfo}} |
---|
98 | \subsubsection[Assembly]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ static T$\ast$ UserInfo::Assembly (DOMElement \& {\em element}, \/ const string {\em tagName})\hspace{0.3cm}{\tt \mbox{[}inline, static, inherited\mbox{]}}}} |
---|
99 | \label{classUserInfo_0f090c6525a3e8fb11634a553f467ede} |
---|
100 | |
---|
101 | |
---|
102 | This methods tries to assembly a new instance of type T (or some of its descendant types) according to a data stored in a DOMNode named tagName within a child nodes of the passed element. If an error occurs, it returns a NULL pointer. |
---|
103 | |
---|
104 | References Attribute::Get(), and Attribute::type.\hypertarget{classUserInfo_1d402661b82feccb5265a70f65c242e1}{ |
---|
105 | \index{CompoundUserInfo@{CompoundUserInfo}!Disassembly@{Disassembly}} |
---|
106 | \index{Disassembly@{Disassembly}!CompoundUserInfo@{CompoundUserInfo}} |
---|
107 | \subsubsection[Disassembly]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ static bool UserInfo::Disassembly (T \& {\em instance}, \/ DOMElement \& {\em element}, \/ const string {\em tagName}, \/ const string {\em help})\hspace{0.3cm}{\tt \mbox{[}inline, static, inherited\mbox{]}}}} |
---|
108 | \label{classUserInfo_1d402661b82feccb5265a70f65c242e1} |
---|
109 | |
---|
110 | |
---|
111 | This methods tries to disassembly an instance of type T (or some of its descendant types) and build DOM tree accordingly. Then, it creates a new DOMNode named according tagName and connecti it to the passed DOMElement as a new child node (with a help attribute filled). |
---|
112 | |
---|
113 | References Attribute::help, Attribute::Set(), and Attribute::type. |
---|
114 | |
---|
115 | Referenced by UserInfo::Disassembly(), and CompoundUserInfo$<$ T $>$::BindedElement$<$ U $>$::DisassemblyComponentsToXML().\hypertarget{classUserInfo_917b2257abc31b94c89ef3cd270e4a42}{ |
---|
116 | \index{CompoundUserInfo@{CompoundUserInfo}!Disassembly@{Disassembly}} |
---|
117 | \index{Disassembly@{Disassembly}!CompoundUserInfo@{CompoundUserInfo}} |
---|
118 | \subsubsection[Disassembly]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ static bool UserInfo::Disassembly (T \& {\em instance}, \/ DOMElement \& {\em element}, \/ const string {\em tagName})\hspace{0.3cm}{\tt \mbox{[}inline, static, inherited\mbox{]}}}} |
---|
119 | \label{classUserInfo_917b2257abc31b94c89ef3cd270e4a42} |
---|
120 | |
---|
121 | |
---|
122 | This methods tries to disassembly an instance of type T (or some of its descendant types) and build DOM tree accordingly. Then, it creates a new DOMNode named according tagName and connecti it to the passed DOMElement as a new child node. |
---|
123 | |
---|
124 | References UserInfo::Disassembly(). |
---|
125 | |
---|
126 | \subsection{Member Data Documentation} |
---|
127 | \hypertarget{classTypedUserInfo_c7ad10a9ff002383518155c965ade85c}{ |
---|
128 | \index{CompoundUserInfo@{CompoundUserInfo}!instance@{instance}} |
---|
129 | \index{instance@{instance}!CompoundUserInfo@{CompoundUserInfo}} |
---|
130 | \subsubsection[instance]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ const {\bf TypedUserInfo}$<$T$>$\& {\bf TypedUserInfo}$<$ T $>$::{\bf instance}\hspace{0.3cm}{\tt \mbox{[}static, protected, inherited\mbox{]}}}} |
---|
131 | \label{classTypedUserInfo_c7ad10a9ff002383518155c965ade85c} |
---|
132 | |
---|
133 | |
---|
134 | the only instance of this class (each type T has its own instance) which is used as a factory for processing related userinfos |
---|
135 | |
---|
136 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
137 | \item |
---|
138 | work/git/mixpp/bdm/userinfo.h\end{CompactItemize} |
---|