ClearSilver::basic_UploadIstream< _CharT, _Traits > Class Template Reference

Encapsulate a std::basic_istream for file upload. More...

#include <UploadIstream.h>

Inheritance diagram for ClearSilver::basic_UploadIstream< _CharT, _Traits >:

std::basic_istream< _CharT, _Traits > std::basic_ios< _CharT, _Traits > std::ios_base List of all members.

Public Types

typedef __gnu_cxx::stdio_filebuf<
_CharT, _Traits > 
__filebuf_type
typedef _CharT char_type
typedef _Traits::int_type int_type
typedef _Traits::pos_type pos_type
typedef _Traits::off_type off_type
typedef _Traits traits_type
typedef basic_streambuf< _CharT,
_Traits > 
__streambuf_type
typedef basic_ios< _CharT,
_Traits > 
__ios_type
typedef basic_istream< _CharT,
_Traits > 
__istream_type
typedef istreambuf_iterator<
_CharT, _Traits > 
__istreambuf_iter
typedef num_get< _CharT, __istreambuf_iter__numget_type
typedef ctype< _CharT > __ctype_type
typedef ostreambuf_iterator<
_CharT, _Traits > 
__ostreambuf_iter
typedef num_put< _CharT, __ostreambuf_iter__numput_type
typedef _Ios_Fmtflags fmtflags
typedef _Ios_Iostate iostate
typedef _Ios_Openmode openmode
typedef _Ios_Seekdir seekdir
typedef void(* event_callback )(event, ios_base &, int)
enum  event

Public Member Functions

 basic_UploadIstream (std::FILE *)
 ~basic_UploadIstream ()
__filebuf_typerdbuf () const
 Accessing the underlying buffer.
streamsize gcount () const
__istream_typeoperator>> (__istream_type &(*__pf)(__istream_type &))
__istream_typeoperator>> (__ios_type &(*__pf)(__ios_type &))
__istream_typeoperator>> (ios_base &(*__pf)(ios_base &))
__istream_typeoperator>> (bool &__n)
__istream_typeoperator>> (short &__n)
__istream_typeoperator>> (unsigned short &__n)
__istream_typeoperator>> (int &__n)
__istream_typeoperator>> (unsigned int &__n)
__istream_typeoperator>> (long &__n)
__istream_typeoperator>> (unsigned long &__n)
__istream_typeoperator>> (float &__f)
__istream_typeoperator>> (double &__f)
__istream_typeoperator>> (long double &__f)
__istream_typeoperator>> (void *&__p)
__istream_typeoperator>> (__streambuf_type *__sb)
int_type get ()
__istream_typeget (char_type &__c)
__istream_typeget (char_type *__s, streamsize __n, char_type __delim)
__istream_typeget (char_type *__s, streamsize __n)
__istream_typeget (__streambuf_type &__sb, char_type __delim)
__istream_typeget (__streambuf_type &__sb)
__istream_typegetline (char_type *__s, streamsize __n, char_type __delim)
__istream_typegetline (char_type *__s, streamsize __n)
__istream_typeignore (streamsize __n=1, int_type __delim=traits_type::eof())
int_type peek ()
__istream_typeread (char_type *__s, streamsize __n)
streamsize readsome (char_type *__s, streamsize __n)
__istream_typeputback (char_type __c)
__istream_typeunget ()
int sync ()
pos_type tellg ()
__istream_typeseekg (pos_type)
__istream_typeseekg (off_type, ios_base::seekdir)
iostate rdstate () const
void clear (iostate __state=goodbit)
void setstate (iostate __state)
void _M_setstate (iostate __state)
bool good () const
bool eof () const
bool fail () const
bool bad () const
iostate exceptions () const
void exceptions (iostate __except)
basic_ostream< _CharT, _Traits > * tie () const
basic_ostream< _CharT, _Traits > * tie (basic_ostream< _CharT, _Traits > *__tiestr)
basic_streambuf< _CharT, _Traits > * rdbuf (basic_streambuf< _CharT, _Traits > *__sb)
basic_ioscopyfmt (const basic_ios &__rhs)
char_type fill () const
char_type fill (char_type __ch)
locale imbue (const locale &__loc)
char narrow (char_type __c, char __dfault) const
char_type widen (char __c) const
 operator void * () const
bool operator! () const
void register_callback (event_callback __fn, int __index)
fmtflags flags () const
fmtflags flags (fmtflags __fmtfl)
fmtflags setf (fmtflags __fmtfl)
fmtflags setf (fmtflags __fmtfl, fmtflags __mask)
void unsetf (fmtflags __mask)
streamsize precision () const
streamsize precision (streamsize __prec)
streamsize width () const
streamsize width (streamsize __wide)
locale getloc () const
const locale & _M_getloc () const
long & iword (int __ix)
void *& pword (int __ix)

Static Public Member Functions

static bool sync_with_stdio (bool __sync=true)
static int xalloc ()

Static Public Attributes

static const fmtflags boolalpha
static const fmtflags dec
static const fmtflags fixed
static const fmtflags hex
static const fmtflags internal
static const fmtflags left
static const fmtflags oct
static const fmtflags right
static const fmtflags scientific
static const fmtflags showbase
static const fmtflags showpoint
static const fmtflags showpos
static const fmtflags skipws
static const fmtflags unitbuf
static const fmtflags uppercase
static const fmtflags adjustfield
static const fmtflags basefield
static const fmtflags floatfield
static const iostate badbit
static const iostate eofbit
static const iostate failbit
static const iostate goodbit
static const openmode app
static const openmode ate
static const openmode binary
static const openmode in
static const openmode out
static const openmode trunc
static const seekdir beg
static const seekdir cur
static const seekdir end

Protected Member Functions

void init (basic_streambuf< _CharT, _Traits > *__sb)
bool _M_check_facet (const locale::facet *__f) const
void _M_cache_locale (const locale &__loc)
void _M_cache_facets (const locale &__loc)
void _M_call_callbacks (event __ev)
void _M_dispose_callbacks (void)
_Words & _M_grow_words (int __index)
void _M_init ()

Protected Attributes

streamsize _M_gcount
basic_ostream< _CharT, _Traits > * _M_tie
char_type _M_fill
bool _M_fill_init
basic_streambuf< _CharT, _Traits > * _M_streambuf
const __ctype_type_M_fctype
const __numput_type_M_fnumput
const __numget_type_M_fnumget
_Callback_list * _M_callbacks
_Words _M_word_zero
_Words _M_local_word [_S_local_word_size]
int _M_word_size
_Words * _M_word
locale _M_ios_locale
streamsize _M_precision
streamsize _M_width
fmtflags _M_flags
iostate _M_exception
iostate _M_streambuf_state

Static Protected Attributes

static const int _S_local_word_size

Friends

friend basic_istream< _CharT2,
_Traits2 > & 
operator>> (basic_istream< _CharT2, _Traits2 > &, _CharT2 &)
friend basic_istream< _CharT2,
_Traits2 > & 
operator>> (basic_istream< _CharT2, _Traits2 > &, _CharT2 *)
friend class sentry
friend void ios_base::Init::_S_ios_create (bool)

Detailed Description

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
class ClearSilver::basic_UploadIstream< _CharT, _Traits >

Encapsulate a std::basic_istream for file upload.

This class converts a std::FILE* to a std::basic_istream, thereby enabling the file to be managed through the standard C++ istream API. Within ClearSilver++, this is intended for managing files uploaded as multipart/form-data.

Bug:
The underlying standard C++ library apparently does not support creating a std::istream from a FILE* object. A Gnu extension for g++ v3 supports this however. Consequently, this class will not compile with earlier versions of g++, and may not compile with other compilers.

Definition at line 68 of file UploadIstream.h.


Member Function Documentation

template<typename _CharT, typename _Traits = std::char_traits<_CharT>>
__filebuf_type* ClearSilver::basic_UploadIstream< _CharT, _Traits >::rdbuf  )  const [inline]
 

Accessing the underlying buffer.

Returns:
The current __gnu_cxx::stdio_filebuf buffer.
This hides the signatures of std::basic_istream::rdbuf() and std::basic_ios::rdbuf().

Reimplemented from std::basic_ios< _CharT, _Traits >.

Definition at line 88 of file UploadIstream.h.


The documentation for this class was generated from the following file:
Generated on Tue May 16 14:50:55 2006 for ClearSilver C++ Library by  doxygen 1.4.5