Arxx::BufferReader Class Reference

#include <BufferReader.h>

Collaboration diagram for Arxx::BufferReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements a convenient output interface for Arxx::Buffer.


Public Member Functions

 BufferReader (const Arxx::Buffer &Buffer, Arxx::Buffer::size_type stPosition=Arxx::Buffer::Marker::BEGIN)
Arxx::Buffer::size_type stRead (Arxx::Buffer::size_type stLength, Arxx::Buffer::pointer Buffer)
 This functions allows to get more than one byte at a time from the buffer.
const Arxx::BufferGetBuffer (void) const
 Returns the associated Arxx::Buffer object.
Arxx::Buffer::size_type stGetPosition (void) const
 Returns the marker's position.
void vSetPosition (Arxx::Buffer::size_type stPosition)
 Sets the marker's position.

Private Attributes

const Arxx::Bufferm_Buffer
Arxx::Buffer::Marker m_Marker


Constructor & Destructor Documentation

Arxx::BufferReader::BufferReader ( const Arxx::Buffer Buffer,
Arxx::Buffer::size_type  stPosition = Arxx::Buffer::Marker::BEGIN 
)

libarxx - Advanced Resource files in C++ Copyright (C) 2005 Hagen Möbius

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Member Function Documentation

const Arxx::Buffer & Arxx::BufferReader::GetBuffer ( void   )  const

Returns the associated Arxx::Buffer object.

Arxx::Buffer::size_type Arxx::BufferReader::stGetPosition ( void   )  const

Returns the marker's position.

Arxx::Buffer::size_type Arxx::BufferReader::stRead ( Arxx::Buffer::size_type  stLength,
Arxx::Buffer::pointer  Buffer 
)

This functions allows to get more than one byte at a time from the buffer.

Parameters:
stLength The length of the chunk of data you wish to read from the buffer.
Buffer Not a Buffer but a buffer, an address of a block of memory.
This function reads stLength bytes from this Buffer starting at the I/O position and writes them to the memory specified by Buffer.

This function does not give you access to the content of the buffer but creates of copy of it.

Note:
This function refuses to read more elements than there are from the I/O position to the end. It will throw a std::out_of_range exception in this case.

void Arxx::BufferReader::vSetPosition ( Arxx::Buffer::size_type  stPosition  ) 

Sets the marker's position.


Member Data Documentation

const Arxx::Buffer& Arxx::BufferReader::m_Buffer [private]

Arxx::Buffer::Marker Arxx::BufferReader::m_Marker [private]


The documentation for this class was generated from the following files:
Generated on Tue Oct 10 11:34:45 2006 for libarxx by  doxygen 1.4.7