Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
cgicc
FormFile.h
Go to the documentation of this file.
1
/* -*-mode:c++; c-file-style: "gnu";-*- */
2
/*
3
* $Id: FormFile.h,v 1.11 2007/07/02 18:48:18 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 _FORMFILE_H_
25
#define _FORMFILE_H_ 1
26
27
#ifdef __GNUG__
28
# pragma interface
29
#endif
30
40
#include <iostream>
41
#include <string>
42
43
#include "
cgicc/CgiDefs.h
"
44
45
namespace
cgicc {
46
47
// ============================================================
48
// Class FormFile
49
// ============================================================
50
64
class
CGICC_API
FormFile
65
{
66
public
:
67
68
// ============================================================
69
72
78
inline
79
FormFile
()
80
{}
81
91
FormFile
(
const
std::string& name,
92
const
std::string& filename,
93
const
std::string& dataType,
94
const
std::string& data);
95
102
inline
103
FormFile
(
const
FormFile
& file)
104
{ operator=(file); }
105
111
inline
112
~
FormFile
()
113
{}
115
116
// ============================================================
117
120
128
bool
129
operator== (
const
FormFile
& file)
const
;
130
138
inline
bool
139
operator!= (
const
FormFile
& file)
const
140
{
return
! operator==(file); }
141
142
#ifdef WIN32
143
/* Dummy operator for MSVC++ */
144
inline
bool
145
operator< (
const
FormFile
& file)
const
146
{
return
false
; }
147
#endif
148
156
FormFile&
157
operator= (
const
FormFile& file);
159
160
// ============================================================
161
166
173
void
174
writeToStream(std::ostream& out)
const
;
175
183
inline
std::string
184
getName()
const
185
{
return
fName; }
186
193
inline
std::string
194
getFilename()
const
195
{
return
fFilename; }
196
203
inline
std::string
204
getDataType()
const
205
{
return
fDataType; }
206
213
inline
std::string
214
getData()
const
215
{
return
fData; }
216
223
inline
std::string::size_type
224
getDataLength()
const
225
{
return
fData.length(); }
227
228
private
:
229
std::string fName;
230
std::string fFilename;
231
std::string fDataType;
232
std::string fData;
233
};
234
235
}
// namespace cgicc
236
237
#endif
/* ! _FORMFILE_H_ */
GNU cgicc
- A C++ class library for writing CGI applications
Copyright © 1996 - 2004
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 Fri Jul 12 2013 14:34:55 for cgicc by
doxygen
1.8.3.1