Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Library Overview

The GNU cgicc library contains classes divided into two broad groups:

  1. CGI classes
    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.

  2. Response generation classes
    Response generation classes 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:

    1. HTTP header classes
      HTTP header classes are used to indicate to the client information on the data being returned as a result of the CGI request. For example, standard HTTP headers indicate the type, size, and modification date of the transmitted data.

      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.

      cgicc::HTTPHeader is the base class for all HTTP headers. It is rarely used directly; instead, use one of the provided subclasses.

      cgicc::HTTPContentHeader is a subclass of cgicc::HTTPHeader used to indicate the type of data returned to the client by the CGI application.

      cgicc::HTTPRedirectHeader is a subclass of cgicc::HTTPHeader used to redirect the client to a different URL.

      cgicc::HTTPStatusHeader is a subclass of cgicc::HTTPHeader used to return a 3-digit HTTP status code and the associated message.

      cgicc::HTTPNPHeader is a subclass of cgicc::HTTPHeader used to indicate to the HTTP server that it should not parse the data returned by the CGI application. Normally, the HTTP server parses the data returned by the CGI application and fills in certain headers, such as the data size.

      cgicc::HTTPHTMLHeader is a subclass of cgicc::HTTPContentHeader used for data of MIME type text/html.

      cgicc::HTTPPlainHeader is a subclass of cgicc::HTTPContentHeader used for data of MIME type text/plain.

      cgicc::HTTPGIFHeader is a subclass of cgicc::HTTPContentHeader used for data of MIME type image/gif.

      cgicc::HTTPJPEGHeader is a subclass of cgicc::HTTPContentHeader used for data of MIME type image/jpeg.

      cgicc::HTTPXBMHeader is a subclass of cgicc::HTTPContentHeader used for data of MIME type image/x-xbitmap.

      cgicc::HTTPAudioHeader is a subclass of cgicc::HTTPContentHeader used for data of MIME type audio/basic.</li>

    2. HTML generation classes
      HTML generation classes used to generate an HTML response following any HTTP headers. To be compliant with the HTML 4.0 standard, the response must consist of three parts (For a complete description see the HTML 4.0 specification at http://www.w3.org/TR/REC-html40/):

      • A line containing the HTML version information
      • A declarative header section (delimited by the head element)
      • A body, which contains the document's actual content. The body may be implemented by the body element or the frameset element

        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 <br />.

        The HTML classes defined by cgicc are:

        cgicc::HTMLDoctype1, cgicc::comment, cgicc::a, cgicc::abbr, cgicc::acronym, cgicc::address, cgicc::area, cgicc::b2, cgicc::base, cgicc::bdo, cgicc::big 2, cgicc::blockquote, cgicc::body, cgicc::br, cgicc::button, cgicc::caption, cgicc::cite, cgicc::code, cgicc::col, cgicc::colgroup, cgicc::dd, cgicc::del, cgicc::dfn, cgicc::div, cgicc::dl, cgicc::dt, cgicc::em, cgicc::fieldset, cgicc::form, cgicc::frame 3, cgicc::frameset 3, cgicc::h1, cgicc::h2, cgicc::h3, cgicc::h4, cgicc::h5, cgicc::h6, cgicc::head, cgicc::hr, cgicc::html, cgicc::i 2, cgicc::iframe 3, cgicc::img, cgicc::input, cgicc::ins, cgicc::kbd, cgicc::label, cgicc::legend, cgicc::li, cgicc::link, cgicc::map, cgicc::meta, cgicc::noframes 3, cgicc::noscript, cgicc::object, cgicc::ol, cgicc::optgroup, cgicc::option, cgicc::p, cgicc::param, cgicc::pre, cgicc::q, cgicc::samp, cgicc::script, cgicc::select, cgicc::small 2, cgicc::span, cgicc::strong, cgicc::style, cgicc::sub, cgicc::sup, cgicc::table, cgicc::tbody, cgicc::td, cgicc::textarea, cgicc::tfoot, cgicc::th, cgicc::thead, cgicc::title, cgicc::tr, cgicc::tt 2, cgicc::ul, cgicc::var

        1 Used to specify the HTML version information as required by the HTML 4.0 standard
        2 It is preferable to use stylesheets instead of this element
        3 This element is not part of the strict DTD

[ Previous: Overview of the Common Gateway Interface | Current: Library Overview | Next: A Tutorial Example ]


GNU cgicc - A C++ class library for writing CGI applications
Copyright © 1996, 1997, 1998, 1999, 2000, 2001, 2002 Stephen F. Booth
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front Cover Texts, and with no Back-Cover Texts.
Documentation generated Wed Jan 9 12:31:26 2002 for cgicc by doxygen 1.2.13.1