Class that abstracts a data source. More...
#include <cgicc/CgiInput.h>
Public Member Functions | |
Constructor and Destructor | |
CgiInput () | |
Constructor. | |
CgiInput (const CgiInput &input) | |
Copy constructor. | |
virtual | ~CgiInput () |
Destructor. | |
Overloaded Operators | |
bool | operator== (const CgiInput &) const |
Compare two CgiInput objects for equality. | |
bool | operator!= (const CgiInput &input) const |
Compare two CgiInput objects for inequality. | |
CgiInput & | operator= (const CgiInput &) |
Assign one CgiInput to another. | |
Data Sources | |
virtual size_t | read (char *data, size_t length) |
Read data from a data source. | |
virtual std::string | getenv (const char *varName) |
Query the value of an environment variable. | |
Class that abstracts a data source.
The CgiInput
class is an abstraction for all input data to the CGI application. This allows input data to come from something other than standard input (cin). This is useful, in fact necessary, when using cgicc with FastCgi. Library users wishing to exploit this functionality should create a subclass and override the read
and getenv
methods.
Definition at line 58 of file CgiInput.h.
|
inline |
|
inline |
Copy constructor.
If you subclass CgiInput, you must overload operator=
input | The CgiInput object to copy |
Definition at line 84 of file CgiInput.h.
|
virtual |
Destructor.
Delete this CgiInput object
|
virtual |
Query the value of an environment variable.
In the default implementation, this is a wrapper for std::getenv()
varName | The name of an environment variable |
|
inline |
Compare two CgiInput objects for inequality.
In the default implementation all CgiInput objects are equal
input | The CgiInput object to compare to this one |
false
Definition at line 120 of file CgiInput.h.
Assign one CgiInput to another.
Does nothing in the default implementation
input | The CgiInput object to copy |
Definition at line 131 of file CgiInput.h.
|
inline |
Compare two CgiInput objects for equality.
In the default implementation all CgiInput objects are equal
input | The CgiInput object to compare to this one |
true
Definition at line 109 of file CgiInput.h.
|
virtual |
Read data from a data source.
In the default implementation, this is a wrapper for cin.read()
data | The target buffer |
length | The number of characters to read |