Public Member Functions | List of all members
ecl::StringStream Class Reference

Convenience wrapper for string device based textstreams. More...

#include <string_stream.hpp>

Inheritance diagram for ecl::StringStream:
Inheritance graph
[legend]

Public Member Functions

const char * c_str ()
 Character string representation of the underlying device's contents. More...
 
void clear ()
 Clears the underlying device's internal buffers. More...
 
std::string str ()
 String representation of the underlying device's contents. More...
 
virtual ~StringStream ()
 
- Public Member Functions inherited from ecl::TextStream< String >
virtual ~TextStream ()
 

Detailed Description

Convenience wrapper for string device based textstreams.

This is a wrapper around what could also be used as a TextStream<String> object. It provides a more convenient handle and direct interfaces to some of the string device functions (otherwise you would normally be required to use TextStream's device() method).

Definition at line 44 of file string_stream.hpp.

Constructor & Destructor Documentation

virtual ecl::StringStream::~StringStream ( )
inlinevirtual

Definition at line 76 of file string_stream.hpp.

Member Function Documentation

const char* ecl::StringStream::c_str ( )
inline

Character string representation of the underlying device's contents.

This returns a null terminates string representing the contents of the underlying device's internal buffer. Note that this returns the full buffer, not just the unread parts.

Returns
const char* : pointer to the device's internal buffer.

Definition at line 55 of file string_stream.hpp.

void ecl::StringStream::clear ( )
inline

Clears the underlying device's internal buffers.

Clears the underlying device's internal character buffer and resets read/write location pointers.

Definition at line 74 of file string_stream.hpp.

std::string ecl::StringStream::str ( )
inline

String representation of the underlying device's contents.

This generates a c++ style string representing the contents of the underlying device's internal buffer. Note that this returns the full buffer, not just the unread parts.

Returns
string : string representation of the underlying device's internal buffer.

Definition at line 66 of file string_stream.hpp.


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


ecl_streams
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:50