Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_OutputSource_Memory

Outputsource writing to memory.
Contained in: global
Derived from: CL_OutputSource
Derived by: none
Group: Core (I/O Data)

#include <ClanLib/core.h>

### public function member index:

### Construction:

`` | `CL_OutputSource_Memory` | `()`;
``virtual`` | `~CL_OutputSource_Memory` | `()`;

### Attributes:

``virtual` `int`` | `tell` | `() `const``;
``virtual` `int`` | `size` | `() `const``;
``std::string`` | `get_data` | `() `const``;

### Operations:

``virtual` `int`` | `write` | `(`const` `void`* `data`, `int` `size`)`;
``virtual` `void`` | `open` | `()`;
``virtual` `void`` | `close` | `()`;
``virtual` `CL_OutputSource`*` | `clone` | `()`;

## Description:

## Function Member Descriptions:

CL_OutputSource_Memory::CL_OutputSource_Memory - Output Source Memory Constructor
`` `CL_OutputSource_Memory` `()`;

CL_OutputSource_Memory::clone - Make a copy of the current outputsource, standing at the same position.
``virtual` `CL_OutputSource`*` `clone` `()`;

> Returns - The copy of the output source.

CL_OutputSource_Memory::close - Closes the output source.
``virtual` `void`` `close` `()`;

CL_OutputSource_Memory::get_data - Get the pointer to the internal data array in the memory source.
Used to extract the data after usage.
``std::string`` `get_data` `() `const``;

> Returns - Pointer to the data written.

CL_OutputSource_Memory::open - Opens the output source. By default, it is open.
``virtual` `void`` `open` `()`;

CL_OutputSource_Memory::size - Returns the size of the output source
``virtual` `int`` `size` `() `const``;

> Returns - Size of the output source.

CL_OutputSource_Memory::tell - Returns current position in output source.
``virtual` `int`` `tell` `() `const``;

> Returns - Current position in source.

CL_OutputSource_Memory::write - Writes larger amounts of data (no endian and 64 bit conversion):
``virtual` `int`` `write` `(`const` `void`* `data`, `int` `size`)`;

> data - Points to the array from which to write.
> size - Number of bytes to write.
> Returns - Num bytes actually written.

CL_OutputSource_Memory::~CL_OutputSource_Memory - Output Source Memory Destructor
``virtual`` `~CL_OutputSource_Memory` `()`;

## Variable Member Descriptions: