summaryrefslogtreecommitdiffabout
path: root/htdocs/quickref/metasyntax.chtml
Unidiff
Diffstat (limited to 'htdocs/quickref/metasyntax.chtml') (more/less context) (ignore whitespace changes)
-rw-r--r--htdocs/quickref/metasyntax.chtml3
1 files changed, 2 insertions, 1 deletions
diff --git a/htdocs/quickref/metasyntax.chtml b/htdocs/quickref/metasyntax.chtml
index 4efc37c..67186f9 100644
--- a/htdocs/quickref/metasyntax.chtml
+++ b/htdocs/quickref/metasyntax.chtml
@@ -1,371 +1,372 @@
1% html(); return; /* vim:set ft=sitecing: */ 1% /* vim:set ft=sitecing: */
2%%derive layout = "/ancestry/layout.chtml"; 2%%derive layout = "/ancestry/layout.chtml";
3%%pragma main=page
3<%constructor> 4<%constructor>
4 PN_PREV("/quickref/","quick reference","quick reference"); 5 PN_PREV("/quickref/","quick reference","quick reference");
5 PN_NEXT("/sources","sources","source browser"); 6 PN_NEXT("/sources","sources","source browser");
6</%constructor> 7</%constructor>
7<%codemethod string title() %> 8<%codemethod string title() %>
8 return "meta syntax quick reference"; 9 return "meta syntax quick reference";
9</%codemethod> 10</%codemethod>
10<%method void content() %> 11<%method void content() %>
11 <h1>site-C-ing meta syntax quick reference</h1> 12 <h1>site-C-ing meta syntax quick reference</h1>
12 13
13 <h2>Table of Contents</h2> 14 <h2>Table of Contents</h2>
14 15
15 <ul class="quickref toc"> 16 <ul class="quickref toc">
16 <li><a href="#qr__line">% ...</a></li> 17 <li><a href="#qr__line">% ...</a></li>
17 <li><a href="#qr__inline">&lt;% ... %&gt;</a></li> 18 <li><a href="#qr__inline">&lt;% ... %&gt;</a></li>
18 <li><a href="#qr__code">&lt;%code&gt;</a></li> 19 <li><a href="#qr__code">&lt;%code&gt;</a></li>
19 <li><a href="#qr__codemethod">&lt;%codemethod ... &gt;</a></li> 20 <li><a href="#qr__codemethod">&lt;%codemethod ... &gt;</a></li>
20 <li><a href="#qr__constructor">&lt;%constructor&gt;</a></li> 21 <li><a href="#qr__constructor">&lt;%constructor&gt;</a></li>
21 <li><a href="#qr__decl">&lt;%decl&gt;</a></li> 22 <li><a href="#qr__decl">&lt;%decl&gt;</a></li>
22 <li><a href="#qr___decl">%%decl</a></li> 23 <li><a href="#qr___decl">%%decl</a></li>
23 <li><a href="#qr___derive">%%derive</a></li> 24 <li><a href="#qr___derive">%%derive</a></li>
24 <li><a href="#qr__destructor">&lt;%destructor&gt;</a></li> 25 <li><a href="#qr__destructor">&lt;%destructor&gt;</a></li>
25 <li><a href="#qr__impl">&lt;%impl&gt;</a></li> 26 <li><a href="#qr__impl">&lt;%impl&gt;</a></li>
26 <li><a href="#qr___impl">%%impl</a></li> 27 <li><a href="#qr___impl">%%impl</a></li>
27 <li><a href="#qr__method">&lt;%method ... &gt;</a></li> 28 <li><a href="#qr__method">&lt;%method ... &gt;</a></li>
28 <li><a href="#qr__output">&lt;%output&gt;</a></li> 29 <li><a href="#qr__output">&lt;%output&gt;</a></li>
29 <li><a href="#qr___pragma">%%pragma</a></li> 30 <li><a href="#qr___pragma">%%pragma</a></li>
30 <li><a href="#qr___var">%%var</a></li> 31 <li><a href="#qr___var">%%var</a></li>
31 </ul> 32 </ul>
32 33
33 <dl class="metasyntax quickref"> 34 <dl class="metasyntax quickref">
34 35
35% /* % */ 36% /* % */
36 <dt> 37 <dt>
37 <a id="qr__line" name="qr__line" title="line of code"> 38 <a id="qr__line" name="qr__line" title="line of code">
38 <code>% <kbd>line of code</kbd></code> 39 <code>% <kbd>line of code</kbd></code>
39 </a> 40 </a>
40 </dt> 41 </dt>
41 <dd> 42 <dd>
42 <p> 43 <p>
43 Break out into the code mode for just one line. 44 Break out into the code mode for just one line.
44 </p> 45 </p>
45 <blockquote class="qr_sample"> 46 <blockquote class="qr_sample">
46 <div> 47 <div>
47 &nbsp;&lt;body&gt;<br/> 48 &nbsp;&lt;body&gt;<br/>
48 &nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/> 49 &nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/>
49 <em><a href="#qr__line" title="% description">%</a> for(int t=0;t&lt;10;t++) {<br/></em> 50 <em><a href="#qr__line" title="% description">%</a> for(int t=0;t&lt;10;t++) {<br/></em>
50 &nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/> 51 &nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/>
51 <em><a href="#qr__line" title="% description">%</a> }<br/></em> 52 <em><a href="#qr__line" title="% description">%</a> }<br/></em>
52 &nbsp;&lt;/body&gt; 53 &nbsp;&lt;/body&gt;
53 </div> 54 </div>
54 </blockquote> 55 </blockquote>
55 </dd> 56 </dd>
56 57
57% /* <% %> */ 58% /* <% %> */
58 <dt> 59 <dt>
59 <a id="qr__inline" name="qr__inline" title="output expression"> 60 <a id="qr__inline" name="qr__inline" title="output expression">
60 <code>&lt;% <kbd>expression</kbd> %&gt;</code> 61 <code>&lt;% <kbd>expression</kbd> %&gt;</code>
61 </a> 62 </a>
62 </dt> 63 </dt>
63 <dd> 64 <dd>
64 <p> 65 <p>
65 &lt;&lt; <kbd>expression</kbd> into output stream (think c++). 66 &lt;&lt; <kbd>expression</kbd> into output stream (think c++).
66 </p> 67 </p>
67 <blockquote class="qr_sample"> 68 <blockquote class="qr_sample">
68 <div> 69 <div>
69 &nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/> 70 &nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/>
70 <a href="#qr__line" title="% description">%</a> for(int t=0;t&lt;10;t++) {<br/> 71 <a href="#qr__line" title="% description">%</a> for(int t=0;t&lt;10;t++) {<br/>
71 <em>&nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/></em> 72 <em>&nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/></em>
72 <a href="#qr__line" title="% description">%</a> } 73 <a href="#qr__line" title="% description">%</a> }
73 </div> 74 </div>
74 </blockquote> 75 </blockquote>
75 </dd> 76 </dd>
76 77
77% /* %code */ 78% /* %code */
78 <dt> 79 <dt>
79 <a id="qr__code" name="qr__code" title="switching to code mode"> 80 <a id="qr__code" name="qr__code" title="switching to code mode">
80 <code> 81 <code>
81 &lt;%code&gt; <kbd>...</kbd> &lt;/%code&gt; 82 &lt;%code&gt; <kbd>...</kbd> &lt;/%code&gt;
82 </code> 83 </code>
83 </a> 84 </a>
84 </dt> 85 </dt>
85 <dd> 86 <dd>
86 <p> 87 <p>
87 Escape from the output mode to code mode. Opposite to <code><a href="#qr__output" title="&lt;%output&gt; description">&lt;%output&gt;</a></code>. Roughly the same as <code><a href="#qr__output" title="&lt;%output&gt; description">&lt;/%output&gt;</a> <kbd>...</kbd> <a href="#qr__output" title="&lt;%output&gt; description">&lt;%output&gt;</a></code> (note the reverse order), but more self-explanatory and applies to more cases. 88 Escape from the output mode to code mode. Opposite to <code><a href="#qr__output" title="&lt;%output&gt; description">&lt;%output&gt;</a></code>. Roughly the same as <code><a href="#qr__output" title="&lt;%output&gt; description">&lt;/%output&gt;</a> <kbd>...</kbd> <a href="#qr__output" title="&lt;%output&gt; description">&lt;%output&gt;</a></code> (note the reverse order), but more self-explanatory and applies to more cases.
88 </p> 89 </p>
89 <blockquote class="qr_sample"> 90 <blockquote class="qr_sample">
90 <div> 91 <div>
91 &lt;body&gt;<br/> 92 &lt;body&gt;<br/>
92 <em>&nbsp;<a href="#qr__code" title="&lt;%code&gt; descrption">&lt;%code&gt;</a><br/></em> 93 <em>&nbsp;<a href="#qr__code" title="&lt;%code&gt; descrption">&lt;%code&gt;</a><br/></em>
93 &nbsp;&nbsp;for(int t=0;t&lt;10;t++) {<br/> 94 &nbsp;&nbsp;for(int t=0;t&lt;10;t++) {<br/>
94 &nbsp;&nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;%output&gt;</a><br/> 95 &nbsp;&nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;%output&gt;</a><br/>
95 &nbsp;&nbsp;&nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/> 96 &nbsp;&nbsp;&nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/>
96 &nbsp;&nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/> 97 &nbsp;&nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/>
97 &nbsp;&nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;/%output&gt;</a><br/> 98 &nbsp;&nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;/%output&gt;</a><br/>
98 <em>&nbsp;<a href="#qr__code" title="&lt;%code&gt; descrption">&lt;/%code&gt;</a><br/></em> 99 <em>&nbsp;<a href="#qr__code" title="&lt;%code&gt; descrption">&lt;/%code&gt;</a><br/></em>
99 &lt;/body&gt; 100 &lt;/body&gt;
100 </div> 101 </div>
101 </blockquote> 102 </blockquote>
102 </dd> 103 </dd>
103 104
104% /* %codemethod */ 105% /* %codemethod */
105 <dt> 106 <dt>
106 <a id="qr__codemethod" name="qr__codemethod" title="member function definition"> 107 <a id="qr__codemethod" name="qr__codemethod" title="member function definition">
107 <code> 108 <code>
108 &lt;%codemethod <kbd>return_type_t</kbd> <kbd>member_name</kbd>(<kbd>args,...</kbd>) %&gt;<br/> 109 &lt;%codemethod <kbd>return_type_t</kbd> <kbd>member_name</kbd>(<kbd>args,...</kbd>) %&gt;<br/>
109 &nbsp;<kbd>code</kbd><br/> 110 &nbsp;<kbd>code</kbd><br/>
110 &lt;/%codemethod&gt; 111 &lt;/%codemethod&gt;
111 </code> 112 </code>
112 </a> 113 </a>
113 </dt> 114 </dt>
114 <dd> 115 <dd>
115 <p> 116 <p>
116 Define the member function. Essentially equivalent to <code><a href="#qr__method" title="&lt;%method ... %&gt; description" class="internal">&lt;%method</a> <kbd>...</kbd> <a href="#qr__method" title="&lt;%method ... %&gt; description" class="internal">%&gt;</a><a href="#qr__code" title="&lt;%code&gt; description" class="internal">&lt;%code&gt;</a> <kbd>...</kbd> <a href="#qr__code" title="&lt;%code&gt; description" class="internal">&lt;/%code&gt;</a><a href="#qr__method" title="&lt;%method ... %&gt; description" class="internal">&lt;/%method&gt;</a></code>. 117 Define the member function. Essentially equivalent to <code><a href="#qr__method" title="&lt;%method ... %&gt; description" class="internal">&lt;%method</a> <kbd>...</kbd> <a href="#qr__method" title="&lt;%method ... %&gt; description" class="internal">%&gt;</a><a href="#qr__code" title="&lt;%code&gt; description" class="internal">&lt;%code&gt;</a> <kbd>...</kbd> <a href="#qr__code" title="&lt;%code&gt; description" class="internal">&lt;/%code&gt;</a><a href="#qr__method" title="&lt;%method ... %&gt; description" class="internal">&lt;/%method&gt;</a></code>.
117 </p> 118 </p>
118 <blockquote class="qr_sample"> 119 <blockquote class="qr_sample">
119 <div> 120 <div>
120 <em><a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;%codemethod</a> std::string ua() <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">%&gt;</a><br/> 121 <em><a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;%codemethod</a> std::string ua() <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">%&gt;</a><br/>
121 &nbsp;return __CGI-&gt;get_meta("USER_AGENT");<br/> 122 &nbsp;return __CGI-&gt;get_meta("USER_AGENT");<br/>
122 <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;/%codemethod&gt;</a><br/></em> 123 <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;/%codemethod&gt;</a><br/></em>
123 The user agent is: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> ua() <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a><br/> 124 The user agent is: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> ua() <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a><br/>
124 </div> 125 </div>
125 </blockquote> 126 </blockquote>
126 </dd> 127 </dd>
127 128
128% /* %constructor */ 129% /* %constructor */
129 <dt> 130 <dt>
130 <a id="qr__constructor" name="qr__constructor" title="constructor code"> 131 <a id="qr__constructor" name="qr__constructor" title="constructor code">
131 <code> 132 <code>
132 &lt;%constructor&gt;<br/> 133 &lt;%constructor&gt;<br/>
133 &nbsp;<kbd>code</kbd><br/> 134 &nbsp;<kbd>code</kbd><br/>
134 &lt;/%constructor&gt; 135 &lt;/%constructor&gt;
135 </code> 136 </code>
136 </a> 137 </a>
137 </dt> 138 </dt>
138 <dd> 139 <dd>
139 <p> 140 <p>
140 Provide the code for constructor. 141 Provide the code for constructor.
141 </p> 142 </p>
142 <blockquote class="qr_sample"> 143 <blockquote class="qr_sample">
143 <div> 144 <div>
144 <a href="#qr___var" title="%%var description">%%var</a> bool is_msie;<br/> 145 <a href="#qr___var" title="%%var description">%%var</a> bool is_msie;<br/>
145 <em><a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;%constructor&gt;</a><br/> 146 <em><a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;%constructor&gt;</a><br/>
146 &nbsp;is_msie = (__CGI-&gt;get_meta("USER_AGENT").find("MSIE")!=string::npos);<br/> 147 &nbsp;is_msie = (__CGI-&gt;get_meta("USER_AGENT").find("MSIE")!=string::npos);<br/>
147 <a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;/%constructor&gt;</a><br/></em> 148 <a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;/%constructor&gt;</a><br/></em>
148 </div> 149 </div>
149 </blockquote> 150 </blockquote>
150 </dd> 151 </dd>
151 152
152% /* %decl / %%decl */ 153% /* %decl / %%decl */
153 <dt> 154 <dt>
154 <a id="qr___decl" name="qr___decl" title="verbatim declaration"> 155 <a id="qr___decl" name="qr___decl" title="verbatim declaration">
155 <code>%%decl <kbd>line of code</kbd></code> 156 <code>%%decl <kbd>line of code</kbd></code>
156 </a> 157 </a>
157 </dt> 158 </dt>
158 <dt> 159 <dt>
159 <a id="qr__decl" name="qr__decl" title="verbatim declaration"> 160 <a id="qr__decl" name="qr__decl" title="verbatim declaration">
160 <code> 161 <code>
161 &lt;%decl&gt;<br/> 162 &lt;%decl&gt;<br/>
162 &nbsp;<kbd>lines of code</kbd><br/> 163 &nbsp;<kbd>lines of code</kbd><br/>
163 &lt;/%decl&gt; 164 &lt;/%decl&gt;
164 </code> 165 </code>
165 </a> 166 </a>
166 </dt> 167 </dt>
167 <dd> 168 <dd>
168 <p> 169 <p>
169 Put the line(s) of code into the resulting <em>.h</em> file before the 170 Put the line(s) of code into the resulting <em>.h</em> file before the
170 class declaration. 171 class declaration.
171 </p> 172 </p>
172 <blockquote class="qr_sample"> 173 <blockquote class="qr_sample">
173 <div> 174 <div>
174 <em><a href="#qr___decl" title="%%decl description">%%decl</a> #include &lt;string&gt;<br/></em> 175 <em><a href="#qr___decl" title="%%decl description">%%decl</a> #include &lt;string&gt;<br/></em>
175 <a href="#qr___var" title="%%var description">%%var</a> std::string str = "default"<br/> 176 <a href="#qr___var" title="%%var description">%%var</a> std::string str = "default"<br/>
176 <em><a href="#qr__decl" title="&lt;%decl&gt; description">&lt;%decl&gt;</a><br/> 177 <em><a href="#qr__decl" title="&lt;%decl&gt; description">&lt;%decl&gt;</a><br/>
177 &nbsp;typedef int integer_t;<br/> 178 &nbsp;typedef int integer_t;<br/>
178 <a href="#qr__decl" title="&lt;%decl&gt; description">&lt;/%decl&gt;</a><br/></em> 179 <a href="#qr__decl" title="&lt;%decl&gt; description">&lt;/%decl&gt;</a><br/></em>
179 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;%method</a> void do_nothing(integer_t input) <a href="#qr__method" title="&lt;%method ... %&gt; description">%&gt;</a><br/> 180 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;%method</a> void do_nothing(integer_t input) <a href="#qr__method" title="&lt;%method ... %&gt; description">%&gt;</a><br/>
180 &nbsp;nothing is done<br/> 181 &nbsp;nothing is done<br/>
181 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;/%method&gt;</a> 182 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;/%method&gt;</a>
182 </div> 183 </div>
183 </blockquote> 184 </blockquote>
184 </dd> 185 </dd>
185 186
186% /* %%derive */ 187% /* %%derive */
187 <dt> 188 <dt>
188 <a id="qr___derive" name="qr___derive" title="base class(es) specification"> 189 <a id="qr___derive" name="qr___derive" title="base class(es) specification">
189 <code>%%derive <kbd>name</kbd> = "<kbd>base-component</kbd>";</code> 190 <code>%%derive <kbd>name</kbd> = "<kbd>base-component</kbd>";</code>
190 </a> 191 </a>
191 </dt> 192 </dt>
192 <dd> 193 <dd>
193 <p> 194 <p>
194 Inherit what is there to be inherited from the base component specified. 195 Inherit what is there to be inherited from the base component specified.
195 </p> 196 </p>
196 <blockquote class="qr_sample"> 197 <blockquote class="qr_sample">
197 <div> 198 <div>
198 <em><a href="#qr___derive" title="%%derive description">%%derive</a> pagelayout = "/ancestry/page_layout.chtml";<br/></em> 199 <em><a href="#qr___derive" title="%%derive description">%%derive</a> pagelayout = "/ancestry/page_layout.chtml";<br/></em>
199 <a href="#qr__line" title="% description">%</a> pagelayout::member_function(); 200 <a href="#qr__line" title="% description">%</a> pagelayout::member_function();
200 </div> 201 </div>
201 </blockquote> 202 </blockquote>
202 </dd> 203 </dd>
203 204
204% /* %destructor */ 205% /* %destructor */
205 <dt> 206 <dt>
206 <a id="qr__destructor" name="qr__destructor" title="destructor code"> 207 <a id="qr__destructor" name="qr__destructor" title="destructor code">
207 <code> 208 <code>
208 &lt;%destructor&gt;<br/> 209 &lt;%destructor&gt;<br/>
209 &nbsp;<kbd>code</kbd><br/> 210 &nbsp;<kbd>code</kbd><br/>
210 &lt;/%destructor&gt; 211 &lt;/%destructor&gt;
211 </code> 212 </code>
212 </a> 213 </a>
213 </dt> 214 </dt>
214 <dd> 215 <dd>
215 <p> 216 <p>
216 Provide the code for destructor. 217 Provide the code for destructor.
217 </p> 218 </p>
218 <blockquote class="qr_sample"> 219 <blockquote class="qr_sample">
219 <div> 220 <div>
220 <a href="#qr___var" title="%%var description">%%var</a> type_t *tmp = 0;<br/> 221 <a href="#qr___var" title="%%var description">%%var</a> type_t *tmp = 0;<br/>
221 <a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;%constructor&gt;</a><br/> 222 <a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;%constructor&gt;</a><br/>
222 &nbsp;tmp = new type_t(type_t::option_1);<br/> 223 &nbsp;tmp = new type_t(type_t::option_1);<br/>
223 <a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;/%constructor&gt;</a><br/> 224 <a href="#qr__constructor" title="&lt;%constructor&gt; description">&lt;/%constructor&gt;</a><br/>
224 <em><a href="#qr__destructor" title="&lt;%destructor&gt; description">&lt;%destructor&gt;</a><br/> 225 <em><a href="#qr__destructor" title="&lt;%destructor&gt; description">&lt;%destructor&gt;</a><br/>
225 &nbsp;delete tmp;<br/> 226 &nbsp;delete tmp;<br/>
226 <a href="#qr__destructor" title="&lt;%destructor&gt; description">&lt;/%destructor&gt;</a><br/></em> 227 <a href="#qr__destructor" title="&lt;%destructor&gt; description">&lt;/%destructor&gt;</a><br/></em>
227 </div> 228 </div>
228 </blockquote> 229 </blockquote>
229 </dd> 230 </dd>
230 231
231% /* %impl / %%impl */ 232% /* %impl / %%impl */
232 <dt> 233 <dt>
233 <a id="qr___impl" name="qr__impl" title="verbatim definition"> 234 <a id="qr___impl" name="qr__impl" title="verbatim definition">
234 <code>%%impl <kbd>line of code</kbd></code> 235 <code>%%impl <kbd>line of code</kbd></code>
235 </a> 236 </a>
236 </dt> 237 </dt>
237 <dt> 238 <dt>
238 <a id="qr__impl" name="qr__impl" title="verbatim definition"> 239 <a id="qr__impl" name="qr__impl" title="verbatim definition">
239 <code> 240 <code>
240 &lt;%impl&gt;<br/> 241 &lt;%impl&gt;<br/>
241 &nbsp;<kbd>lines of code</kbd><br/> 242 &nbsp;<kbd>lines of code</kbd><br/>
242 &lt;/%impl&gt; 243 &lt;/%impl&gt;
243 </code> 244 </code>
244 </a> 245 </a>
245 </dt> 246 </dt>
246 <dd> 247 <dd>
247 <p> 248 <p>
248 Put the line(s) of code into the resulting <em>.cc</em> implementation file 249 Put the line(s) of code into the resulting <em>.cc</em> implementation file
249 before any members definitions. 250 before any members definitions.
250 </p> 251 </p>
251 <blockquote class="qr_sample"> 252 <blockquote class="qr_sample">
252 <div> 253 <div>
253 <em><a href="#qr___impl" title="%%impl description">%%impl</a> #include &lt;string.h&gt;<br/></em> 254 <em><a href="#qr___impl" title="%%impl description">%%impl</a> #include &lt;string.h&gt;<br/></em>
254 <a href="#qr__method" title="&lt;%method ... %gt; description">&lt;%method</a> void output_if_contains(const char *haystack,const char *needle) <a href="#qr__method" title="&lt;%method ... %gt; description">%&gt;</a><br/> 255 <a href="#qr__method" title="&lt;%method ... %gt; description">&lt;%method</a> void output_if_contains(const char *haystack,const char *needle) <a href="#qr__method" title="&lt;%method ... %gt; description">%&gt;</a><br/>
255 <a href="#qr__line" title="% description">%</a> if(strstr(haystack,needle)) {<br/> 256 <a href="#qr__line" title="% description">%</a> if(strstr(haystack,needle)) {<br/>
256 &nbsp;&nbsp;&nbsp;<a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> haystack <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a><br/> 257 &nbsp;&nbsp;&nbsp;<a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> haystack <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a><br/>
257 <a href="#qr__line" title="% description">%</a> }<br/> 258 <a href="#qr__line" title="% description">%</a> }<br/>
258 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;/%method&gt;</a><br/> 259 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;/%method&gt;</a><br/>
259 <em><a href="#qr__impl" title="&lt;%impl&gt; description">&lt;%impl&gt;</a><br/> 260 <em><a href="#qr__impl" title="&lt;%impl&gt; description">&lt;%impl&gt;</a><br/>
260 &nbsp;#include &lt;konforka/exception.h&gt; 261 &nbsp;#include &lt;konforka/exception.h&gt;
261 &nbsp;static const char *tokens[] = {<br/> 262 &nbsp;static const char *tokens[] = {<br/>
262 &nbsp;&nbsp;"token 1", "token 2", "token 3"<br/> 263 &nbsp;&nbsp;"token 1", "token 2", "token 3"<br/>
263 &nbsp;};<br/> 264 &nbsp;};<br/>
264 <a href="#qr__impl" title="&lt;%impl&gt; description">&lt;/%impl&gt;</a><br/></em> 265 <a href="#qr__impl" title="&lt;%impl&gt; description">&lt;/%impl&gt;</a><br/></em>
265 <a href="#qr__method" title="&lt;%method ... %gt; description">&lt;%method</a> void output_token(int toknum) <a href="#qr__method" title="&lt;%method ... %gt; description">%&gt;</a><br/> 266 <a href="#qr__method" title="&lt;%method ... %gt; description">&lt;%method</a> void output_token(int toknum) <a href="#qr__method" title="&lt;%method ... %gt; description">%&gt;</a><br/>
266 &nbsp;<a href="#qr__code" title="&lt;%code&gt; description">&lt;%code&gt;</a><br/> 267 &nbsp;<a href="#qr__code" title="&lt;%code&gt; description">&lt;%code&gt;</a><br/>
267 &nbsp;&nbsp;if(toknum&lt;0 || toknum&gt;=(sizeof(tokens)/sizeof(*tokens)))<br/> 268 &nbsp;&nbsp;if(toknum&lt;0 || toknum&gt;=(sizeof(tokens)/sizeof(*tokens)))<br/>
268 &nbsp;&nbsp;&nbsp;throw konforka::exception(CODEPOINT,"out of bounds");<br/> 269 &nbsp;&nbsp;&nbsp;throw konforka::exception(CODEPOINT,"out of bounds");<br/>
269 &nbsp;<a href="#qr__code" title="&lt;%code&gt; description">&lt;/%code&gt;</a><br/> 270 &nbsp;<a href="#qr__code" title="&lt;%code&gt; description">&lt;/%code&gt;</a><br/>
270 &nbsp;<a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> tokens[toknum] <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a><br/> 271 &nbsp;<a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> tokens[toknum] <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a><br/>
271 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;/%method&gt;</a><br/> 272 <a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;/%method&gt;</a><br/>
272 </div> 273 </div>
273 </blockquote> 274 </blockquote>
274 </dd> 275 </dd>
275 276
276% /* %method */ 277% /* %method */
277 <dt> 278 <dt>
278 <a id="qr__method" name="qr__method" title="member function definition"> 279 <a id="qr__method" name="qr__method" title="member function definition">
279 <code> 280 <code>
280 &lt;%method <kbd>return_type_t</kbd> <kbd>member_name</kbd>(<kbd>args,...</kbd>) %&gt;<br/> 281 &lt;%method <kbd>return_type_t</kbd> <kbd>member_name</kbd>(<kbd>args,...</kbd>) %&gt;<br/>
281 &nbsp;<kbd>code</kbd><br/> 282 &nbsp;<kbd>code</kbd><br/>
282 &lt;/%method&gt; 283 &lt;/%method&gt;
283 </code> 284 </code>
284 </a> 285 </a>
285 </dt> 286 </dt>
286 <dd> 287 <dd>
287 <p> 288 <p>
288 Define the member function. Essentially equivalent to <code><a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description" class="internal">&lt;%codemethod</a> <kbd>...</kbd> <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description" class="internal">%&gt;</a><a href="#qr__output" title="&lt;%output&gt; description" class="internal">&lt;%output&gt;</a> <kbd>...</kbd> <a href="#qr__output" title="&lt;%output&gt; description" class="internal">&lt;/%output&gt;</a><a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description" class="internal">&lt;/%codemethod&gt;</a></code>. 289 Define the member function. Essentially equivalent to <code><a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description" class="internal">&lt;%codemethod</a> <kbd>...</kbd> <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description" class="internal">%&gt;</a><a href="#qr__output" title="&lt;%output&gt; description" class="internal">&lt;%output&gt;</a> <kbd>...</kbd> <a href="#qr__output" title="&lt;%output&gt; description" class="internal">&lt;/%output&gt;</a><a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description" class="internal">&lt;/%codemethod&gt;</a></code>.
289 </p> 290 </p>
290 <blockquote class="qr_sample"> 291 <blockquote class="qr_sample">
291 <div> 292 <div>
292 <em><a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;%method</a> void emphasized(const char *t) <a href="#qr__method" title="&lt;%method ... %&gt; description">%&gt;</a><br/> 293 <em><a href="#qr__method" title="&lt;%method ... %&gt; description">&lt;%method</a> void emphasized(const char *t) <a href="#qr__method" title="&lt;%method ... %&gt; description">%&gt;</a><br/>
293 &nbsp;&lt;em&gt;<a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;/em&gt;<br/> 294 &nbsp;&lt;em&gt;<a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;/em&gt;<br/>
294 <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;/%method&gt;</a><br/></em> 295 <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;/%method&gt;</a><br/></em>
295 <a href="#qr__line" title="% description">%</a> emphasized("emphasized text"); 296 <a href="#qr__line" title="% description">%</a> emphasized("emphasized text");
296 </div> 297 </div>
297 </blockquote> 298 </blockquote>
298 </dd> 299 </dd>
299 300
300% /* %output */ 301% /* %output */
301 <dt> 302 <dt>
302 <a id="qr__output" name="qr__output" title="switching to output mode"> 303 <a id="qr__output" name="qr__output" title="switching to output mode">
303 <code> 304 <code>
304 &lt;%output&gt; <kbd>...</kbd> &lt;/%output&gt; 305 &lt;%output&gt; <kbd>...</kbd> &lt;/%output&gt;
305 </code> 306 </code>
306 </a> 307 </a>
307 </dt> 308 </dt>
308 <dd> 309 <dd>
309 <p> 310 <p>
310 Escape from the code mode to output mode. Opposite to <code><a href="#qr__code" title="&lt;%code&gt; description">&lt;%code&gt;</a></code>. Roughly the same as <code><a href="#qr__code" title="&lt;%code&gt; description">&lt;/%code&gt;</a> <kbd>...</kbd> <a href="#qr__code" title="&lt;%code&gt; description">&lt;%code&gt;</a></code> (note the reverse order), but more self-explanatory and applies to more cases. 311 Escape from the code mode to output mode. Opposite to <code><a href="#qr__code" title="&lt;%code&gt; description">&lt;%code&gt;</a></code>. Roughly the same as <code><a href="#qr__code" title="&lt;%code&gt; description">&lt;/%code&gt;</a> <kbd>...</kbd> <a href="#qr__code" title="&lt;%code&gt; description">&lt;%code&gt;</a></code> (note the reverse order), but more self-explanatory and applies to more cases.
311 </p> 312 </p>
312 <blockquote class="qr_sample"> 313 <blockquote class="qr_sample">
313 <div> 314 <div>
314 <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;%codemethod</a> void count() <a href="#qr__codemethod" title="&lt;%codemethod ... &gt; description">%&gt;</a><br/> 315 <a href="#qr__codemethod" title="&lt;%codemethod ... %&gt; description">&lt;%codemethod</a> void count() <a href="#qr__codemethod" title="&lt;%codemethod ... &gt; description">%&gt;</a><br/>
315 &nbsp;for(int t=0;t&lt;10;t++) {<br/> 316 &nbsp;for(int t=0;t&lt;10;t++) {<br/>
316 <em>&nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;%output&gt;</a><br/> 317 <em>&nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;%output&gt;</a><br/>
317 &nbsp;&nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/> 318 &nbsp;&nbsp;&nbsp;Here is the way we count.&lt;br/&gt;<br/>
318 &nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/> 319 &nbsp;&nbsp;&nbsp;Just saying out loud: <a href="#qr__inline" title="&lt;% ... %&gt; description">&lt;%</a> t <a href="#qr__inline" title="&lt;% ... %&gt; description">%&gt;</a>&lt;br/&gt;<br/>
319 &nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;/%output&gt;</a><br/></em> 320 &nbsp;&nbsp;<a href="#qr__output" title="&lt;%output&gt; descrption">&lt;/%output&gt;</a><br/></em>
320 <a href="#qr__codemethod" title="&lt;/%codemethod ... %&gt; description">&lt;/%codemethod&gt;</a><br/> 321 <a href="#qr__codemethod" title="&lt;/%codemethod ... %&gt; description">&lt;/%codemethod&gt;</a><br/>
321 <a href="#qr__line" title="% description">%</a> count(); 322 <a href="#qr__line" title="% description">%</a> count();
322 </div> 323 </div>
323 </blockquote> 324 </blockquote>
324 </dd> 325 </dd>
325 326
326% /* %%pragma */ 327% /* %%pragma */
327 <dt> 328 <dt>
328 <a id="qr___pragma" name="qr___pragma" title="pragma"> 329 <a id="qr___pragma" name="qr___pragma" title="pragma">
329 <code> 330 <code>
330 %%pragma <kbd>pragma_name</kbd><br/> 331 %%pragma <kbd>pragma_name</kbd><br/>
331 %%pragma <kbd>pragma_name</kbd>=<kbd>pragma_value</kbd> 332 %%pragma <kbd>pragma_name</kbd>=<kbd>pragma_value</kbd>
332 </code> 333 </code>
333 </a> 334 </a>
334 </dt> 335 </dt>
335 <dd> 336 <dd>
336 <p>provide pseudo instructions to the preprocessor. At this time only pragma 337 <p>provide pseudo instructions to the preprocessor. At this time only pragma
337 named <code>main</code> is defined, which instructs preprocessor to discard 338 named <code>main</code> is defined, which instructs preprocessor to discard
338 the 'main' member that would be generated for the component and call the 339 the 'main' member that would be generated for the component and call the
339 <code>main</code> member of the named base class.</p> 340 <code>main</code> member of the named base class.</p>
340 <blockquote class="qr_sample"> 341 <blockquote class="qr_sample">
341 <div> 342 <div>
342 <a href="#qr___derive" title="%%derive description">%%derive</a> pagelayout = "/ancestry/page_layout.chtml";<br/> 343 <a href="#qr___derive" title="%%derive description">%%derive</a> pagelayout = "/ancestry/page_layout.chtml";<br/>
343 <em><a href="#qr___pragma" title="%%pragma description">%%pragma</a> main=pagelayout</em> 344 <em><a href="#qr___pragma" title="%%pragma description">%%pragma</a> main=pagelayout</em>
344 </div> 345 </div>
345 </blockquote> 346 </blockquote>
346 </dd> 347 </dd>
347 348
348% /* %%var */ 349% /* %%var */
349 <dt> 350 <dt>
350 <a id="qr___var" name="qr___var" title="member variable declaration"> 351 <a id="qr___var" name="qr___var" title="member variable declaration">
351 <code>%%var <kbd>type_t</kbd> <kbd>varname</kbd>;</code><br/> 352 <code>%%var <kbd>type_t</kbd> <kbd>varname</kbd>;</code><br/>
352 <code>%%var <kbd>type_t</kbd> <kbd>varname</kbd> = <kbd>initalizer</kbd>;</code><br/> 353 <code>%%var <kbd>type_t</kbd> <kbd>varname</kbd> = <kbd>initalizer</kbd>;</code><br/>
353 </a> 354 </a>
354 </dt> 355 </dt>
355 <dd> 356 <dd>
356 <p> 357 <p>
357 Define the member variable with optional default value (suitable for 358 Define the member variable with optional default value (suitable for
358 putting into the <code>: <kbd>varname</kbd>(<kbd>initializer</kbd>)</code> 359 putting into the <code>: <kbd>varname</kbd>(<kbd>initializer</kbd>)</code>
359 part of the c++ constructor. 360 part of the c++ constructor.
360 </p> 361 </p>
361 <blockquote class="qr_sample"> 362 <blockquote class="qr_sample">
362 <div> 363 <div>
363 <em><a href="#qr___var" title="%%var description">%%var</a> std::string strval = "default value";<br/> 364 <em><a href="#qr___var" title="%%var description">%%var</a> std::string strval = "default value";<br/>
364 <a href="#qr___var" title="%%var description">%%var</a> int usecount = 0;<br/> 365 <a href="#qr___var" title="%%var description">%%var</a> int usecount = 0;<br/>
365 <a href="#qr___var" title="%%var description">%%var</a> int whatnot;</em> 366 <a href="#qr___var" title="%%var description">%%var</a> int whatnot;</em>
366 </div> 367 </div>
367 </blockquote> 368 </blockquote>
368 </dd> 369 </dd>
369 370
370 </dl> 371 </dl>
371</%method> 372</%method>