CgiInput.h
Go to the documentation of this file.
1/* -*-mode:c++; c-file-style: "gnu";-*- */
2/*
3 * $Id: CgiInput.h,v 1.8 2014/04/23 20:55:03 sebdiaz Exp $
4 *
5 * Copyright (C) 1996 - 2004 Stephen F. Booth <sbooth@gnu.org>
6 * 2007 Sebastien DIAZ <sebastien.diaz@gmail.com>
7 * Part of the GNU cgicc library, http://www.gnu.org/software/cgicc
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 3 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
22 */
23
24#ifndef _CGIINPUT_H_
25#define _CGIINPUT_H_ 1
26
27#ifdef __GNUG__
28# pragma interface
29#endif
30
38#include <string>
39
40#include "CgiDefs.h"
41
42 namespace cgicc {
43
44 // ============================================================
45 // Class CgiInput
46 // ============================================================
47
58 class CGICC_API CgiInput
59 {
60 public:
61
62 // ============================================================
63
66
72 inline
73 CgiInput()
74 {}
75
83 inline
84 CgiInput(const CgiInput& input)
85 { operator=(input); }
86
92 virtual ~CgiInput();
94
95
96 // ============================================================
97
100
108 inline bool
109 operator== (const CgiInput& /*input*/) const
110 { return true; }
111
119 inline bool
120 operator!= (const CgiInput& input) const
121 { return ! operator==(input); }
122
130 inline CgiInput&
131 operator= (const CgiInput& /*input*/)
132 { return *this; }
134
135 // ============================================================
136
139
148 virtual size_t read(char *data, size_t length);
149
158 virtual std::string getenv(const char *varName);
160 };
161
162} // namespace cgicc
163
164#endif /* ! _CGIINPUT_H_ */
CgiDefs.h
Platform and operating system specific macro definitions.
cgicc::CgiInput
Class that abstracts a data source.
Definition: CgiInput.h:59
cgicc::CgiInput::CgiInput
CgiInput(const CgiInput &input)
Copy constructor.
Definition: CgiInput.h:84
cgicc::CgiInput::read
virtual size_t read(char *data, size_t length)
Read data from a data source.
cgicc::CgiInput::~CgiInput
virtual ~CgiInput()
Destructor.
cgicc::CgiInput::getenv
virtual std::string getenv(const char *varName)
Query the value of an environment variable.
cgicc::CgiInput::CgiInput
CgiInput()
Constructor.
Definition: CgiInput.h:73
cgicc
The namespace containing the cgicc library.
Definition: Cgicc.h:52