CPPSERV


Home Projects Jobs Clientele Contact
CPPSERV Documentation Download TODO Mailing lists Bug tracker News RSS Feed Browse source

servlet::UploadedFile Class Reference

#include <UploadedFile.h>

Inheritance diagram for servlet::UploadedFile:
Collaboration diagram for servlet::UploadedFile:

List of all members.


Public Member Functions

 UploadedFile ()
virtual ~UploadedFile ()
virtual std::iostream & getStream ()=0 throw (IOError)
virtual bool isEmpty () const =0
virtual const std::string & getName () const =0
void moveTo (const std::string &path) throw (IOError)
virtual const std::string & mimeType () const =0

Protected Member Functions

virtual void doMoveTo (const std::string &path)=0 throw (IOError)

Protected Attributes

bool m_moved

Detailed Description

Represents file uploaded with request. The way it is implemented is similar to what PHP does.
  • File is uploaded to some (configurable) directory and saved with temporary name.
  • Programmer can get to file data as C++ stream
  • Unless moveTo() method is called, file is destroyed at the end of request.

Author:
Ilya A. Volynets-Evenbakh

Definition at line 37 of file UploadedFile.h.


Constructor & Destructor Documentation

servlet::UploadedFile::UploadedFile (  ) 

Definition at line 24 of file UploadedFile.cpp.

servlet::UploadedFile::~UploadedFile (  )  [virtual]

Definition at line 30 of file UploadedFile.cpp.


Member Function Documentation

virtual void servlet::UploadedFile::doMoveTo ( const std::string &  path  )  throw (IOError) [protected, pure virtual]

Implemented in container::UploadedFileImpl.

virtual const std::string& servlet::UploadedFile::getName (  )  const [pure virtual]

Implemented in container::UploadedFileImpl.

std::iostream & servlet::UploadedFile::getStream (  )  throw (IOError) [pure virtual]

Returns iostream refering to data in downloaded file. it may not actually refer to file - it could be implemented as std::stringstream for example.

Implemented in container::UploadedFileImpl.

virtual bool servlet::UploadedFile::isEmpty (  )  const [pure virtual]

Implemented in container::UploadedFileImpl.

virtual const std::string& servlet::UploadedFile::mimeType (  )  const [pure virtual]

Implemented in container::UploadedFileImpl.

void servlet::UploadedFile::moveTo ( const std::string &  path  )  throw (IOError)

Definition at line 34 of file UploadedFile.cpp.


Member Data Documentation

Definition at line 41 of file UploadedFile.h.

Referenced by container::UploadedFileImpl::~UploadedFileImpl().


The documentation for this class was generated from the following files:

SourceForge.net Logo