OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Attributes | List of all members
ossimBufferedInputStream Class Reference

Alows one to create a buffered input stream. More...

#include <ossimIoStream.h>

Inheritance diagram for ossimBufferedInputStream:

Public Member Functions

 ossimBufferedInputStream (std::shared_ptr< ossim::istream > in, ossim_uint32 bufferSize=1024)
 will use the read buffer of the passed in input stream and will set the buffer based on the buffer size passed in More...
 
virtual ~ossimBufferedInputStream ()
 

Protected Attributes

std::vector< char > m_buffer
 We have a buffer that we allocate so it does not loose scope through the life of this stream. More...
 
std::shared_ptr< ossim::istreamm_inputStream
 We will save the input stream we set the buffer to. More...
 

Detailed Description

Alows one to create a buffered input stream.

Definition at line 184 of file ossimIoStream.h.

Constructor & Destructor Documentation

◆ ossimBufferedInputStream()

ossimBufferedInputStream::ossimBufferedInputStream ( std::shared_ptr< ossim::istream in,
ossim_uint32  bufferSize = 1024 
)
inline

will use the read buffer of the passed in input stream and will set the buffer based on the buffer size passed in

Definition at line 191 of file ossimIoStream.h.

192  :ossim::istream(in->rdbuf()),
193  m_inputStream(in)
194  {
195  if(bufferSize > 0)
196  {
197  m_buffer.resize(bufferSize);
198  rdbuf()->pubsetbuf(&m_buffer.front(), m_buffer.size());
199  }
200  }
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
std::vector< char > m_buffer
We have a buffer that we allocate so it does not loose scope through the life of this stream...
std::shared_ptr< ossim::istream > m_inputStream
We will save the input stream we set the buffer to.

◆ ~ossimBufferedInputStream()

virtual ossimBufferedInputStream::~ossimBufferedInputStream ( )
inlinevirtual

Definition at line 201 of file ossimIoStream.h.

202  {
203  m_inputStream = 0;
204  }
std::shared_ptr< ossim::istream > m_inputStream
We will save the input stream we set the buffer to.

Member Data Documentation

◆ m_buffer

std::vector<char> ossimBufferedInputStream::m_buffer
protected

We have a buffer that we allocate so it does not loose scope through the life of this stream.

Definition at line 210 of file ossimIoStream.h.

◆ m_inputStream

std::shared_ptr<ossim::istream> ossimBufferedInputStream::m_inputStream
protected

We will save the input stream we set the buffer to.

Definition at line 215 of file ossimIoStream.h.


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