cphot 0.1
A C++ tool for computing photometry from spectra.
AutoUTFOutputStream< CharType, OutputByteStream > Class Template Reference

Output stream wrapper with dynamically bound encoding and automatic encoding detection. More...

#include <encodedstream.h>

Public Types

typedef CharType Ch
 

Public Member Functions

 AutoUTFOutputStream (OutputByteStream &os, UTFType type, bool putBOM)
 Constructor. More...
 
UTFType GetType () const
 
void Put (Ch c)
 
void Flush ()
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 

Detailed Description

template<typename CharType, typename OutputByteStream>
class AutoUTFOutputStream< CharType, OutputByteStream >

Output stream wrapper with dynamically bound encoding and automatic encoding detection.

Template Parameters
CharTypeType of character for writing.
OutputByteStreamtype of output byte stream to be wrapped.

Definition at line 233 of file encodedstream.h.

Member Typedef Documentation

◆ Ch

template<typename CharType , typename OutputByteStream >
typedef CharType AutoUTFOutputStream< CharType, OutputByteStream >::Ch

Definition at line 236 of file encodedstream.h.

Constructor & Destructor Documentation

◆ AutoUTFOutputStream()

template<typename CharType , typename OutputByteStream >
AutoUTFOutputStream< CharType, OutputByteStream >::AutoUTFOutputStream ( OutputByteStream &  os,
UTFType  type,
bool  putBOM 
)
inline

Constructor.

Parameters
osoutput stream to be wrapped.
typeUTF encoding type.
putBOMWhether to write BOM at the beginning of the stream.

Definition at line 244 of file encodedstream.h.

Member Function Documentation

◆ Flush()

template<typename CharType , typename OutputByteStream >
void AutoUTFOutputStream< CharType, OutputByteStream >::Flush ( )
inline

Definition at line 261 of file encodedstream.h.

◆ GetType()

template<typename CharType , typename OutputByteStream >
UTFType AutoUTFOutputStream< CharType, OutputByteStream >::GetType ( ) const
inline

Definition at line 258 of file encodedstream.h.

◆ Peek()

template<typename CharType , typename OutputByteStream >
Ch AutoUTFOutputStream< CharType, OutputByteStream >::Peek ( ) const
inline

Definition at line 264 of file encodedstream.h.

◆ Put()

template<typename CharType , typename OutputByteStream >
void AutoUTFOutputStream< CharType, OutputByteStream >::Put ( Ch  c)
inline

Definition at line 260 of file encodedstream.h.

◆ PutBegin()

template<typename CharType , typename OutputByteStream >
Ch* AutoUTFOutputStream< CharType, OutputByteStream >::PutBegin ( )
inline

Definition at line 267 of file encodedstream.h.

◆ PutEnd()

template<typename CharType , typename OutputByteStream >
size_t AutoUTFOutputStream< CharType, OutputByteStream >::PutEnd ( Ch )
inline

Definition at line 268 of file encodedstream.h.

◆ Take()

template<typename CharType , typename OutputByteStream >
Ch AutoUTFOutputStream< CharType, OutputByteStream >::Take ( )
inline

Definition at line 265 of file encodedstream.h.

◆ Tell()

template<typename CharType , typename OutputByteStream >
size_t AutoUTFOutputStream< CharType, OutputByteStream >::Tell ( ) const
inline

Definition at line 266 of file encodedstream.h.


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