Wt::WMemoryResource Class Reference

A resource which streams data from memory. More...

#include <WMemoryResource>

Inheritance diagram for Wt::WMemoryResource:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WMemoryResource (const std::string &mimeType, const std::vector< char > &data)
 Create a new resource with given mime-type and data.
void setData (const std::vector< char > &data)
 Set new data for the resource to serve.
const std::string mimeType () const
 Get the mime-type.
void setMimeType (const std::string &mimeType)
 Set the mime-type.

Protected Member Functions

virtual const std::string resourceMimeType () const
 Return the mimetype.
virtual bool streamResourceData (std::ostream &stream, const ArgumentMap &arguments)
 Stream the data for this resource.


Detailed Description

A resource which streams data from memory.

Use this resource if you want to serve resource data from memory. This is suitable for relatively small resources, which still require some computation.

If you require little computation for creating the data, then you may want to reimplement WResource and compute the data on the fly while streaming.

If you have a lot of data, you may want to use a WFileResource instead.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:01 2008 for Wt by doxygen 1.5.3