Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# OutMemory Class Reference

A PhysicalOutStream that writes the data to a memory block. More...

`#include <OutStreams.h>`

Inheritance diagram for OutMemory:

[legend]
Collaboration diagram for OutMemory:

[legend]
List of all members.

## Public Member Functions
| OutMemory ()
| Default constructor.
int | getLength ()
| Returns the number of written bytes.
void * | getMemory ()
| Returns the address of the first byte.
## Protected Member Functions
void | open (void *mem)
| opens the stream.
virtual void | writeToStream (const void *p, int size)
| The function writes a number of bytes into memory.
## Private Attributes
char * | memory
| Points to the next byte to write at.
int | length
| The number of stored bytes.
void * | start
| Points to the first byte.

## Detailed Description

A PhysicalOutStream that writes the data to a memory block.

Definition at line 642 of file OutStreams.h.

## Constructor & Destructor Documentation

OutMemory::OutMemory | ( |  | ) | `[inline]`

| Default constructor. Definition at line 651 of file OutStreams.h. References start.

## Member Function Documentation

int OutMemory::getLength | ( |  | ) | `[inline]`

| Returns the number of written bytes. Definition at line 656 of file OutStreams.h.

void* OutMemory::getMemory | ( |  | ) | `[inline]`

| Returns the address of the first byte. Definition at line 661 of file OutStreams.h. References start.

void OutMemory::open | ( | void * | mem | ) | `[inline, protected]`

  | opens the stream. Parameters:
  mem | The address of the memory block into which is written.
Definition at line 668 of file OutStreams.h. References start. Referenced by OutBinaryMemory::OutBinaryMemory(), OutTextMemory::OutTextMemory(), and OutTextRawMemory::OutTextRawMemory().

virtual void OutMemory::writeToStream | ( | const void * | p,
|  | int | size
| ) | `[inline, protected, virtual]`

  | The function writes a number of bytes into memory. Parameters:
  p | The address the data is located at.
  size | The number of bytes to be written.
Implements PhysicalOutStream. Definition at line 676 of file OutStreams.h.

## Member Data Documentation

char* OutMemory::memory`[private]`

| Points to the next byte to write at. Definition at line 645 of file OutStreams.h.

int OutMemory::length`[private]`

| The number of stored bytes. Definition at line 646 of file OutStreams.h.

void* OutMemory::start`[private]`

| Points to the first byte. Definition at line 647 of file OutStreams.h. Referenced by getMemory(), open(), and OutMemory().

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

- Tools/Streams/OutStreams.h