CGI classes are used to query and manipulate CGI data, including information on the HTTP server, the current request, and the submitted form data.
cgicc::Cgicc is the main class of the cgicc library. It is used to retrieve information on specific HTML form elements (such as checkboxes, radio buttons, and text fields), on uploaded files, and to save, restore, and retrieve information on the CGI environment.
cgicc::CgiEnvironment encapsulates the data passed from the HTTP server to the CGI application. This includes all environment variables set by the HTTP server specified in the CGI standard.
cgicc::FormEntry is an immutable class representing a single user entry in an HTML form element such as a text field, a radio button, or a checkbox. A FormEntry is essentially a name/value pair, where the name is the name of the form element as specified in the HTML form itself, and the value is user-entered or user-selected value. FormEntry provides methods allowing access to the value as a string, integer, or double.
cgicc::FormFile is an immutable class representing a file uploaded via the HTTP file upload mechanism. A FormFile is very similar to a FormEntry, but does not provide the numerous methods for accessing the value as different types.
Response generation classes are used to generate responses to a CGI query. Generally, the response will consist of one or more HTTP headers followed by HTML text, but the CGI application may return data of any type. The response generation classes are subdivided into two groups:
An cgicc::HTTPCookie is a name/value pair used to store a piece of information about the caller using the caller's own machine. Cookies are often used as a means to identify users. Any of cgicc's header classes may contain an arbitrary number of cookies.
cgicc::HTTPHeader is the base class for all simple HTTP headers. It is rarely used directly; instead, use one of the provided subclasses.
cgicc::HTTPResponseHeader is a more powerful, generic HTTP header class used to construct a full HTTP response.
The cgicc library provides one class for each HTML element defined in the HTML 4.0 specification. In all cases, the name of the class corresponds to the name of the HTML element. cgicc tries to produce SGML (and therefore XML) compliant output- thus, atomic elements such as
br as rendered as
There are two special HTML classes defined by cgicc:
cgicc::HTMLDoctype is used to specify the HTML version information as required by the HTML 4.0 standard
cgicc::comment is used to indicate an HTML comment