From 0234b0ae9ba19a37771a8e7d519137fa811c206c Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sat, 02 Apr 2005 17:12:01 +0000 Subject: 1. minor changes to CSS 2. arrows added to walkthrough navigation 3. added new files to the list of sources 4. extra div-s added to metasytnax for the sake of validity 5. hyperlink added to the reference index page 6. changed the note about fastcgi being the only supported inface 7. flushing added to calendar for a bit of performance analysis. --- (limited to 'htdocs/quickref') diff --git a/htdocs/quickref/index.chtml b/htdocs/quickref/index.chtml index 20ef217..d139190 100644 --- a/htdocs/quickref/index.chtml +++ b/htdocs/quickref/index.chtml @@ -11,6 +11,7 @@

site-C-ing quick reference

I am hoping to put together some quick reference documentation here. For now, - I am adding the component meta-syntax quick reference. + I am adding the component meta-syntax quick + reference.

diff --git a/htdocs/quickref/metasyntax.chtml b/htdocs/quickref/metasyntax.chtml index a63f596..4efc37c 100644 --- a/htdocs/quickref/metasyntax.chtml +++ b/htdocs/quickref/metasyntax.chtml @@ -43,12 +43,14 @@ Break out into the code mode for just one line.

-  <body>
- % for(int t=0;t<10;t++) {
-    Here is the way we count.<br/>
-    Just saying out loud: <% t %><br/>
- % }
-  </body> +
+  <body>
+   Here is the way we count.<br/>
+ % for(int t=0;t<10;t++) {
+    Just saying out loud: <% t %><br/>
+ % }
+  </body> +
@@ -63,10 +65,12 @@ << expression into output stream (think c++).

- % for(int t=0;t<10;t++) {
-    Here is the way we count.<br/>
-    Just saying out loud: <% t %><br/>
- % } +
+   Here is the way we count.<br/>
+ % for(int t=0;t<10;t++) {
+    Just saying out loud: <% t %><br/>
+ % } +
@@ -79,18 +83,21 @@
- Escape from the output mode to code mode. Opposite to <%output>. Roughly the same as </%output> ... <%output> (note the reverse order), but more self-explanatory and applies to more cases. +

+ Escape from the output mode to code mode. Opposite to <%output>. Roughly the same as </%output> ... <%output> (note the reverse order), but more self-explanatory and applies to more cases.

- <body>
-  <%code>
-   for(int t=0;t<10;t++) {
-    <%output>
-     Here is the way we count.<br/>
-     Just saying out loud: <% t %><br/>
-    </%output>
-  </%code>
- </body> +
+ <body>
+  <%code>
+   for(int t=0;t<10;t++) {
+    <%output>
+     Here is the way we count.<br/>
+     Just saying out loud: <% t %><br/>
+    </%output>
+  </%code>
+ </body> +
@@ -109,10 +116,12 @@ Define the member function. Essentially equivalent to <%method ... %><%code> ... </%code></%method>.

- <%codemethod std::string ua() %>
-  return __CGI->get_meta("USER_AGENT");
- </%codemethod>
- The user agent is: <% ua() %>
+
+ <%codemethod std::string ua() %>
+  return __CGI->get_meta("USER_AGENT");
+ </%codemethod>
+ The user agent is: <% ua() %>
+
@@ -131,10 +140,12 @@ Provide the code for constructor.

- %%var bool is_msie;
- <%constructor>
-  is_msie = (__CGI->get_meta("USER_AGENT").find("MSIE")!=string::npos);
- </%constructor>
+
+ %%var bool is_msie;
+ <%constructor>
+  is_msie = (__CGI->get_meta("USER_AGENT").find("MSIE")!=string::npos);
+ </%constructor>
+
@@ -159,14 +170,16 @@ class declaration.

- %%decl #include <string>
- %%var std::string str = "default"
- <%decl>
-  typedef int integer_t;
- </%decl>
- <%method void do_nothing(integer_t input) %>
-  nothing is done
- </%method> +
+ %%decl #include <string>
+ %%var std::string str = "default"
+ <%decl>
+  typedef int integer_t;
+ </%decl>
+ <%method void do_nothing(integer_t input) %>
+  nothing is done
+ </%method> +
@@ -181,8 +194,10 @@ Inherit what is there to be inherited from the base component specified.

- %%derive pagelayout = "/ancestry/page_layout.chtml";
- % pagelayout::member_function(); +
+ %%derive pagelayout = "/ancestry/page_layout.chtml";
+ % pagelayout::member_function(); +
@@ -201,13 +216,15 @@ Provide the code for destructor.

- %%var type_t *tmp = 0;
- <%constructor>
-  tmp = new type_t(type_t::option_1);
- </%constructor>
- <%destructor>
-  delete tmp;
- </%destructor>
+
+ %%var type_t *tmp = 0;
+ <%constructor>
+  tmp = new type_t(type_t::option_1);
+ </%constructor>
+ <%destructor>
+  delete tmp;
+ </%destructor>
+
@@ -232,25 +249,27 @@ before any members definitions.

- %%impl #include <string.h>
- <%method void output_if_contains(const char *haystack,const char *needle) %>
- % if(strstr(haystack,needle)) {
-    <% haystack %>
- % }
- </%method>
- <%impl>
-  #include <konforka/exception.h> -  static const char *tokens[] = {
-   "token 1", "token 2", "token 3"
-  };
- </%impl>
- <%method void output_token(int toknum) %>
-  <%code>
-   if(toknum<0 || toknum>=(sizeof(tokens)/sizeof(*tokens)))
-    throw konforka::exception(CODEPOINT,"out of bounds");
-  </%code>
-  <% tokens[toknum] %>
- </%method>
+
+ %%impl #include <string.h>
+ <%method void output_if_contains(const char *haystack,const char *needle) %>
+ % if(strstr(haystack,needle)) {
+    <% haystack %>
+ % }
+ </%method>
+ <%impl>
+  #include <konforka/exception.h> +  static const char *tokens[] = {
+   "token 1", "token 2", "token 3"
+  };
+ </%impl>
+ <%method void output_token(int toknum) %>
+  <%code>
+   if(toknum<0 || toknum>=(sizeof(tokens)/sizeof(*tokens)))
+    throw konforka::exception(CODEPOINT,"out of bounds");
+  </%code>
+  <% tokens[toknum] %>
+ </%method>
+
@@ -269,10 +288,12 @@ Define the member function. Essentially equivalent to <%codemethod ... %><%output> ... </%output></%codemethod>.

- <%method void emphasized(const char *t) %>
-  <em><% t %></em>
- </%method>
- % emphasized("emphasized text"); +
+ <%method void emphasized(const char *t) %>
+  <em><% t %></em>
+ </%method>
+ % emphasized("emphasized text"); +
@@ -289,14 +310,16 @@ Escape from the code mode to output mode. Opposite to <%code>. Roughly the same as </%code> ... <%code> (note the reverse order), but more self-explanatory and applies to more cases.

- <%codemethod void count() %>
-  for(int t=0;t<10;t++) {
-   <%output>
-    Here is the way we count.<br/>
-    Just saying out loud: <% t %><br/>
-   </%output>
- </%codemethod>
- % count(); +
+ <%codemethod void count() %>
+  for(int t=0;t<10;t++) {
+   <%output>
+    Here is the way we count.<br/>
+    Just saying out loud: <% t %><br/>
+   </%output>
+ </%codemethod>
+ % count(); +
@@ -315,16 +338,18 @@ the 'main' member that would be generated for the component and call the main member of the named base class.

- %%derive pagelayout = "/ancestry/page_layout.chtml";
- %%pragma main=pagelayout +
+ %%derive pagelayout = "/ancestry/page_layout.chtml";
+ %%pragma main=pagelayout +
% /* %%var */
- %%var type_t varname;
- %%var type_t varname = initalizer;
+ %%var type_t varname;
+ %%var type_t varname = initalizer;
@@ -334,9 +359,11 @@ part of the c++ constructor.

- %%var std::string strval = "default value";
- %%var int usecount = 0;
- %%var int whatnot;
+
+ %%var std::string strval = "default value";
+ %%var int usecount = 0;
+ %%var int whatnot;
+
-- cgit v0.9.0.2