IN2OSM  1.0.1
BasicOStreamWrapper< StreamType >

Wrapper of std::basic_ostream into RapidJSON's Stream concept. More...

#include <ostreamwrapper.h>

Collaboration diagram for BasicOStreamWrapper< StreamType >:
Collaboration graph

Public Types

typedef StreamType::char_type Ch
 

Public Member Functions

 BasicOStreamWrapper (StreamType &stream)
 
void Put (Ch c)
 
void Flush ()
 
char Peek () const
 
char Take ()
 
size_t Tell () const
 
char * PutBegin ()
 
size_t PutEnd (char *)
 

Private Member Functions

 BasicOStreamWrapper (const BasicOStreamWrapper &)
 
BasicOStreamWrapperoperator= (const BasicOStreamWrapper &)
 

Private Attributes

StreamType & stream_
 

Detailed Description

template<typename StreamType>
class BasicOStreamWrapper< StreamType >

Wrapper of std::basic_ostream into RapidJSON's Stream concept.

The classes can be wrapped including but not limited to:

  • std::ostringstream
  • std::stringstream
  • std::wpstringstream
  • std::wstringstream
  • std::ifstream
  • std::fstream
  • std::wofstream
  • std::wfstream
Template Parameters
StreamTypeClass derived from std::basic_ostream.

Definition at line 45 of file ostreamwrapper.h.

Member Typedef Documentation

◆ Ch

typedef StreamType::char_type Ch

Definition at line 47 of file ostreamwrapper.h.

Constructor & Destructor Documentation

◆ BasicOStreamWrapper() [1/2]

BasicOStreamWrapper ( StreamType &  stream)
inline

Definition at line 48 of file ostreamwrapper.h.

48 : stream_(stream) {}
StreamType & stream_
Here is the caller graph for this function:

◆ BasicOStreamWrapper() [2/2]

BasicOStreamWrapper ( const BasicOStreamWrapper< StreamType > &  )
private

Member Function Documentation

◆ Flush()

void Flush ( )
inline

Definition at line 54 of file ostreamwrapper.h.

54  {
55  stream_.flush();
56  }
StreamType & stream_

◆ operator=()

BasicOStreamWrapper& operator= ( const BasicOStreamWrapper< StreamType > &  )
private
Here is the caller graph for this function:

◆ Peek()

char Peek ( ) const
inline

Definition at line 59 of file ostreamwrapper.h.

59 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

◆ Put()

void Put ( Ch  c)
inline

Definition at line 50 of file ostreamwrapper.h.

50  {
51  stream_.put(c);
52  }
StreamType & stream_

◆ PutBegin()

char* PutBegin ( )
inline

Definition at line 62 of file ostreamwrapper.h.

62 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

◆ PutEnd()

size_t PutEnd ( char *  )
inline

Definition at line 63 of file ostreamwrapper.h.

63 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406
Here is the call graph for this function:

◆ Take()

char Take ( )
inline

Definition at line 60 of file ostreamwrapper.h.

60 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

◆ Tell()

size_t Tell ( ) const
inline

Definition at line 61 of file ostreamwrapper.h.

61 { RAPIDJSON_ASSERT(false); return 0; }
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:406

Member Data Documentation

◆ stream_

StreamType& stream_
private

Definition at line 69 of file ostreamwrapper.h.


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