lib-overview.tmpl
1/* -*-html-*- */
2/*
3 * $Id: lib-overview.tmpl,v 1.10 2004/06/29 15:13:15 sbooth Exp $
4 *
5 * Copyright (C) 1996 - 2004 Stephen F. Booth <sbooth@gnu.org>
6 * Part of the GNU cgicc library, http://www.cgicc.org
7 *
8 * Permission is granted to copy, distribute and/or modify this document
9 * under the terms of the GNU Free Documentation License, Version 1.1
10 * or any later version published by the Free Software Foundation;
11 * with no Invariant Sections, with no Front-Cover Texts, and with
12 * no Back-Cover Texts.
13 * A copy of the license is included in the section entitled "GNU
14 * Free Documentation License".
15 */
16
17/*! \page lib_overview Library Overview
18
19The GNU %cgicc library contains classes divided into two broad groups, CGI
20classes and response generation classes.
21
22\htmlonly
23<div class="header">CGI classes</div>
24<div class="subsection">
25\endhtmlonly
26
27CGI classes are used to query and manipulate CGI data, including
28information on the HTTP server, the current request, and the submitted
29form data.
30
31cgicc::Cgicc is the main class of the %cgicc library. It is used to
32retrieve information on specific HTML form elements (such as checkboxes,
33radio buttons, and text fields), on uploaded files, and to save,
34restore, and retrieve information on the CGI environment.
35
36cgicc::CgiEnvironment encapsulates the data passed from the HTTP server
37to the CGI application. This includes all environment variables set by
38the HTTP server specified in the CGI standard.
39
40cgicc::FormEntry is an immutable class representing a single user entry
41in an HTML form element such as a text field, a radio button, or a
42checkbox. A FormEntry is essentially a name/value pair, where
43the name is the name of the form element as specified in the HTML form
44itself, and the value is user-entered or user-selected
45value. FormEntry provides methods allowing access to the value as
46a string, integer, or double.
47
48cgicc::FormFile is an immutable class representing a file uploaded via
49the HTTP file upload mechanism. A FormFile is very similar to a
50FormEntry, but does not provide the numerous methods for
51accessing the value as different types.
52
53\htmlonly
54</div>
55\endhtmlonly
56
57\htmlonly
58<div class="header">Response generation classes</div>
59<div class="subsection">
60\endhtmlonly
61
62Response generation classes are used to generate responses to a CGI
63query. Generally, the response will consist of one or more HTTP
64headers followed by HTML text, but the CGI application may return data
65of any type. The response generation classes are subdivided into two
66groups:
67
68<ol>
69<li><em>HTTP header classes</em><br>
70HTTP header classes are used to indicate to the client information on
71the data being returned as a result of the CGI request. For example,
72standard HTTP headers indicate the type, size, and modification date of
73the transmitted data.<br>
74
75An cgicc::HTTPCookie is a name/value pair used to store a piece of
76information about the caller using the caller's own machine. Cookies
77are often used as a means to identify users. Any of %cgicc's header
78classes may contain an arbitrary number of cookies.
79
80cgicc::HTTPHeader is the base class for all simple HTTP headers. It
81is rarely used directly; instead, use one of the provided subclasses.
82
83cgicc::HTTPContentHeader is a subclass of cgicc::HTTPHeader used to
84indicate the type of data returned to the client by the CGI application.
85
86cgicc::HTTPRedirectHeader is a subclass of cgicc::HTTPHeader used to
87redirect the client to a different URL.
88
89cgicc::HTTPStatusHeader is a subclass of cgicc::HTTPHeader used to
90return a 3-digit HTTP status code and the associated message.
91
92cgicc::HTTPHTMLHeader is a subclass of cgicc::HTTPContentHeader used for
93data of MIME type \c text/html.
94
95cgicc::HTTPPlainHeader is a subclass of cgicc::HTTPContentHeader used
96for data of MIME type \c text/plain.
97
98cgicc::HTTPResponseHeader is a more powerful, generic HTTP header
99class used to construct a full HTTP response.
100</li>
101
102<li><em>HTML generation classes</em><br>
103HTML generation classes are used to generate an HTML response
104following any HTTP headers. To be compliant with the HTML 4.0 standard,
105the response must consist of three parts (For a complete
106description see the HTML 4.0 specification at
107http://www.w3.org/TR/REC-html40/):
108
109<ul>
110<li>A line containing the HTML version information</li>
111<li>A declarative header section (delimited by the \c head element)</li>
112<li>A body, which contains the document's actual content</li>
113
114The %cgicc library provides one class for each HTML element defined in
115the HTML 4.0 specification. In all cases, the name of the class
116corresponds to the name of the HTML element. %cgicc tries to produce
117SGML (and therefore XML) compliant output- thus, atomic elements such
118as \c br as rendered as \c <br />.
119
120There are two special HTML classes defined by %cgicc:
121
122cgicc::HTMLDoctype is used to specify the HTML version information as
123required by the HTML 4.0 standard
124
125cgicc::comment is used to indicate an HTML comment
126</ul></li></ol>
127\htmlonly
128</div>
129\endhtmlonly
130
131\htmlonly
132<div class="nav">
133\endhtmlonly
134Previous: \ref cgi_overview |
135Current: \ref lib_overview |
136Next: \ref cgicc_tutorial
137\htmlonly
138</div>
139\endhtmlonly
140*/