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

# Class CL_OutputSource_File

Outputsource writing to file.
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_File` | `(`const` `std::string`& `file`)`;
`` | `CL_OutputSource_File` | `()`;
``virtual`` | `~CL_OutputSource_File` | `()`;
### 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_File::CL_OutputSource_File - Output Source File Constructor
`` `CL_OutputSource_File``(`const` `std::string`& `file`)`;

CL_OutputSource_File::CL_OutputSource_File - Output Source File Constructor
`` `CL_OutputSource_File``()`;

CL_OutputSource_File::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_File::close - Closes the output source.
``virtual` `void`` `close``()`;

CL_OutputSource_File::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_File::open - Opens the output source. By default, it is open.
``virtual` `void`` `open``()`;

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

> Returns - Current size of output source.

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

> Returns - Current position in source.

CL_OutputSource_File::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 written.
> size - Number of bytes to write.
> Returns - Num bytes actually written.

CL_OutputSource_File::~CL_OutputSource_File - Output Source File Destructor
``virtual`` `~CL_OutputSource_File``()`;

## Variable Member Descriptions: