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

# OutSize Class Reference

A PhysicalOutStream that doesn't write any data. More...

`#include <OutStreams.h>`

Inheritance diagram for OutSize:

[legend]
Collaboration diagram for OutSize:

[legend]
List of all members.

## Public Member Functions
void | reset ()
| The function resets the counter to zero.
| OutSize ()
| Constructor.
unsigned | getSize () const
| The function returns the number of bytes required to store the data written so far.
## Protected Member Functions
virtual void | writeToStream (const void *p, int s)
| The function counts the number of bytes that should be written.
## Private Attributes
unsigned | size
| Accumulator of the required number of bytes.

## Detailed Description

A PhysicalOutStream that doesn't write any data.

Instead it works as a counter that determines how many bytes would be streamed into memory. It can be used to determine the size of the memory block that is required as the parameter for an instance of class OutMemoryStream.

Definition at line 688 of file OutStreams.h.

## Constructor & Destructor Documentation

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

| Constructor. Definition at line 702 of file OutStreams.h. References reset().

Here is the call graph for this function:

## Member Function Documentation

void OutSize::reset | ( | void |  | ) | `[inline]`

| The function resets the counter to zero. Definition at line 697 of file OutStreams.h. Referenced by OutSize().

unsigned OutSize::getSize | ( |  | ) | const`[inline]`

| The function returns the number of bytes required to store the data written so far. Returns: The size of the memory block required for the data written. Definition at line 709 of file OutStreams.h. Referenced by NetDebugSender::send(), and NetSender< MessageQueue >::send().

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

  | The function counts the number of bytes that should be written. Parameters:
  p | The address the data is located at.
  s | The number of bytes to be written.
Implements PhysicalOutStream. Definition at line 717 of file OutStreams.h.

## Member Data Documentation

unsigned OutSize::size`[private]`

| Accumulator of the required number of bytes. Definition at line 691 of file OutStreams.h.

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

- Tools/Streams/OutStreams.h