-rw-r--r-- | htdocs/quickref/index.chtml | 3 | ||||
-rw-r--r-- | htdocs/quickref/metasyntax.chtml | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/htdocs/quickref/index.chtml b/htdocs/quickref/index.chtml index d139190..5119723 100644 --- a/htdocs/quickref/index.chtml +++ b/htdocs/quickref/index.chtml | |||
@@ -1,17 +1,18 @@ | |||
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("/exceptions/runtime","runtime","runtime exceptions"); | 5 | PN_PREV("/exceptions/runtime","runtime","runtime exceptions"); |
5 | PN_NEXT("/quickref/metasyntax","syntax","meta syntax"); | 6 | PN_NEXT("/quickref/metasyntax","syntax","meta syntax"); |
6 | </%constructor> | 7 | </%constructor> |
7 | <%codemethod string title() %> | 8 | <%codemethod string title() %> |
8 | return "quick reference"; | 9 | return "quick reference"; |
9 | </%codemethod> | 10 | </%codemethod> |
10 | <%method void content() %> | 11 | <%method void content() %> |
11 | <h1>site-C-ing quick reference</h1> | 12 | <h1>site-C-ing quick reference</h1> |
12 | <p> | 13 | <p> |
13 | I am hoping to put together some quick reference documentation here. For now, | 14 | I am hoping to put together some quick reference documentation here. For now, |
14 | I am adding the <a href="/quickref/metasyntax">component meta-syntax quick | 15 | I am adding the <a href="/quickref/metasyntax">component meta-syntax quick |
15 | reference</a>. | 16 | reference</a>. |
16 | </p> | 17 | </p> |
17 | </%method> | 18 | </%method> |
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,194 +1,195 @@ | |||
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"><% ... %></a></li> | 18 | <li><a href="#qr__inline"><% ... %></a></li> |
18 | <li><a href="#qr__code"><%code></a></li> | 19 | <li><a href="#qr__code"><%code></a></li> |
19 | <li><a href="#qr__codemethod"><%codemethod ... ></a></li> | 20 | <li><a href="#qr__codemethod"><%codemethod ... ></a></li> |
20 | <li><a href="#qr__constructor"><%constructor></a></li> | 21 | <li><a href="#qr__constructor"><%constructor></a></li> |
21 | <li><a href="#qr__decl"><%decl></a></li> | 22 | <li><a href="#qr__decl"><%decl></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"><%destructor></a></li> | 25 | <li><a href="#qr__destructor"><%destructor></a></li> |
25 | <li><a href="#qr__impl"><%impl></a></li> | 26 | <li><a href="#qr__impl"><%impl></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"><%method ... ></a></li> | 28 | <li><a href="#qr__method"><%method ... ></a></li> |
28 | <li><a href="#qr__output"><%output></a></li> | 29 | <li><a href="#qr__output"><%output></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 | <body><br/> | 48 | <body><br/> |
48 | Here is the way we count.<br/><br/> | 49 | Here is the way we count.<br/><br/> |
49 | <em><a href="#qr__line" title="% description">%</a> for(int t=0;t<10;t++) {<br/></em> | 50 | <em><a href="#qr__line" title="% description">%</a> for(int t=0;t<10;t++) {<br/></em> |
50 | Just saying out loud: <a href="#qr__inline" title="<% ... %> description"><%</a> t <a href="#qr__inline" title="<% ... %> description">%></a><br/><br/> | 51 | Just saying out loud: <a href="#qr__inline" title="<% ... %> description"><%</a> t <a href="#qr__inline" title="<% ... %> description">%></a><br/><br/> |
51 | <em><a href="#qr__line" title="% description">%</a> }<br/></em> | 52 | <em><a href="#qr__line" title="% description">%</a> }<br/></em> |
52 | </body> | 53 | </body> |
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><% <kbd>expression</kbd> %></code> | 61 | <code><% <kbd>expression</kbd> %></code> |
61 | </a> | 62 | </a> |
62 | </dt> | 63 | </dt> |
63 | <dd> | 64 | <dd> |
64 | <p> | 65 | <p> |
65 | << <kbd>expression</kbd> into output stream (think c++). | 66 | << <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 | Here is the way we count.<br/><br/> | 70 | Here is the way we count.<br/><br/> |
70 | <a href="#qr__line" title="% description">%</a> for(int t=0;t<10;t++) {<br/> | 71 | <a href="#qr__line" title="% description">%</a> for(int t=0;t<10;t++) {<br/> |
71 | <em> Just saying out loud: <a href="#qr__inline" title="<% ... %> description"><%</a> t <a href="#qr__inline" title="<% ... %> description">%></a><br/><br/></em> | 72 | <em> Just saying out loud: <a href="#qr__inline" title="<% ... %> description"><%</a> t <a href="#qr__inline" title="<% ... %> description">%></a><br/><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 | <%code> <kbd>...</kbd> </%code> | 82 | <%code> <kbd>...</kbd> </%code> |
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="<%output> description"><%output></a></code>. Roughly the same as <code><a href="#qr__output" title="<%output> description"></%output></a> <kbd>...</kbd> <a href="#qr__output" title="<%output> description"><%output></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="<%output> description"><%output></a></code>. Roughly the same as <code><a href="#qr__output" title="<%output> description"></%output></a> <kbd>...</kbd> <a href="#qr__output" title="<%output> description"><%output></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 | <body><br/> | 92 | <body><br/> |
92 | <em> <a href="#qr__code" title="<%code> descrption"><%code></a><br/></em> | 93 | <em> <a href="#qr__code" title="<%code> descrption"><%code></a><br/></em> |
93 | for(int t=0;t<10;t++) {<br/> | 94 | for(int t=0;t<10;t++) {<br/> |
94 | <a href="#qr__output" title="<%output> descrption"><%output></a><br/> | 95 | <a href="#qr__output" title="<%output> descrption"><%output></a><br/> |
95 | Here is the way we count.<br/><br/> | 96 | Here is the way we count.<br/><br/> |
96 | Just saying out loud: <a href="#qr__inline" title="<% ... %> description"><%</a> t <a href="#qr__inline" title="<% ... %> description">%></a><br/><br/> | 97 | Just saying out loud: <a href="#qr__inline" title="<% ... %> description"><%</a> t <a href="#qr__inline" title="<% ... %> description">%></a><br/><br/> |
97 | <a href="#qr__output" title="<%output> descrption"></%output></a><br/> | 98 | <a href="#qr__output" title="<%output> descrption"></%output></a><br/> |
98 | <em> <a href="#qr__code" title="<%code> descrption"></%code></a><br/></em> | 99 | <em> <a href="#qr__code" title="<%code> descrption"></%code></a><br/></em> |
99 | </body> | 100 | </body> |
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 | <%codemethod <kbd>return_type_t</kbd> <kbd>member_name</kbd>(<kbd>args,...</kbd>) %><br/> | 109 | <%codemethod <kbd>return_type_t</kbd> <kbd>member_name</kbd>(<kbd>args,...</kbd>) %><br/> |
109 | <kbd>code</kbd><br/> | 110 | <kbd>code</kbd><br/> |
110 | </%codemethod> | 111 | </%codemethod> |
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="<%method ... %> description" class="internal"><%method</a> <kbd>...</kbd> <a href="#qr__method" title="<%method ... %> description" class="internal">%></a><a href="#qr__code" title="<%code> description" class="internal"><%code></a> <kbd>...</kbd> <a href="#qr__code" title="<%code> description" class="internal"></%code></a><a href="#qr__method" title="<%method ... %> description" class="internal"></%method></a></code>. | 117 | Define the member function. Essentially equivalent to <code><a href="#qr__method" title="<%method ... %> description" class="internal"><%method</a> <kbd>...</kbd> <a href="#qr__method" title="<%method ... %> description" class="internal">%></a><a href="#qr__code" title="<%code> description" class="internal"><%code></a> <kbd>...</kbd> <a href="#qr__code" title="<%code> description" class="internal"></%code></a><a href="#qr__method" title="<%method ... %> description" class="internal"></%method></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="<%codemethod ... %> description"><%codemethod</a> std::string ua() <a href="#qr__codemethod" title="<%codemethod ... %> description">%></a><br/> | 121 | <em><a href="#qr__codemethod" title="<%codemethod ... %> description"><%codemethod</a> std::string ua() <a href="#qr__codemethod" title="<%codemethod ... %> description">%></a><br/> |
121 | return __CGI->get_meta("USER_AGENT");<br/> | 122 | return __CGI->get_meta("USER_AGENT");<br/> |
122 | <a href="#qr__codemethod" title="<%codemethod ... %> description"></%codemethod></a><br/></em> | 123 | <a href="#qr__codemethod" title="<%codemethod ... %> description"></%codemethod></a><br/></em> |
123 | The user agent is: <a href="#qr__inline" title="<% ... %> description"><%</a> ua() <a href="#qr__inline" title="<% ... %> description">%></a><br/> | 124 | The user agent is: <a href="#qr__inline" title="<% ... %> description"><%</a> ua() <a href="#qr__inline" title="<% ... %> description">%></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 | <%constructor><br/> | 133 | <%constructor><br/> |
133 | <kbd>code</kbd><br/> | 134 | <kbd>code</kbd><br/> |
134 | </%constructor> | 135 | </%constructor> |
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="<%constructor> description"><%constructor></a><br/> | 146 | <em><a href="#qr__constructor" title="<%constructor> description"><%constructor></a><br/> |
146 | is_msie = (__CGI->get_meta("USER_AGENT").find("MSIE")!=string::npos);<br/> | 147 | is_msie = (__CGI->get_meta("USER_AGENT").find("MSIE")!=string::npos);<br/> |
147 | <a href="#qr__constructor" title="<%constructor> description"></%constructor></a><br/></em> | 148 | <a href="#qr__constructor" title="<%constructor> description"></%constructor></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 | <%decl><br/> | 162 | <%decl><br/> |
162 | <kbd>lines of code</kbd><br/> | 163 | <kbd>lines of code</kbd><br/> |
163 | </%decl> | 164 | </%decl> |
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 <string><br/></em> | 175 | <em><a href="#qr___decl" title="%%decl description">%%decl</a> #include <string><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="<%decl> description"><%decl></a><br/> | 177 | <em><a href="#qr__decl" title="<%decl> description"><%decl></a><br/> |
177 | typedef int integer_t;<br/> | 178 | typedef int integer_t;<br/> |
178 | <a href="#qr__decl" title="<%decl> description"></%decl></a><br/></em> | 179 | <a href="#qr__decl" title="<%decl> description"></%decl></a><br/></em> |
179 | <a href="#qr__method" title="<%method ... %> description"><%method</a> void do_nothing(integer_t input) <a href="#qr__method" title="<%method ... %> description">%></a><br/> | 180 | <a href="#qr__method" title="<%method ... %> description"><%method</a> void do_nothing(integer_t input) <a href="#qr__method" title="<%method ... %> description">%></a><br/> |
180 | nothing is done<br/> | 181 | nothing is done<br/> |
181 | <a href="#qr__method" title="<%method ... %> description"></%method></a> | 182 | <a href="#qr__method" title="<%method ... %> description"></%method></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. |