---
name: "CL_OutputSource_Memory"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_OutputSource_Memory"
---

# CL\_OutputSource\_Memory(3)

Outputsource writing to memory.

## NAME

CL\_OutputSource\_Memory - Outputsource writing to memory.

## CLASS MEMBERS

- **CL\_OutputSource\_Memory**()

  - virtual **~CL\_OutputSource\_Memory**()

  - std::string **get\_data**()

  - virtual void **set\_system\_mode**()

  - virtual void **set\_big\_endian\_mode**()

  - virtual void **set\_little\_endian\_mode**()

  - virtual void **write\_int32**(

  ```
  int data)
  ```

- virtual void **write\_uint32**(

  ```
  unsigned int data)
  ```

- virtual void **write\_short16**(

  ```
  short data)
  ```

- virtual void **write\_ushort16**(

  ```
  unsigned short data)
  ```

- virtual void **write\_char8**(

  ```
  char data)
  ```

- virtual void **write\_uchar8**(

  ```
  unsigned char data)
  ```

- virtual void **write\_float32**(

  ```
  float data)
  ```

- virtual void **write\_bool**(

  ```
  bool data)
  ```

- virtual int **write**(

  ```
  const void *data,
  int size)
  ```

- virtual void **open**()

  - virtual void **close**()

  - virtual CL\_OutputSource \***clone**()

  - virtual int **tell**()

  - virtual int **size**()

  - virtual void **write\_string**(

  ```
  const char *string)
  ```

## MEMBERS WITH DESCRIPTIONS

- **CL\_OutputSource\_Memory**()

  ```
  Description:
  ```

- virtual **~CL\_OutputSource\_Memory**()

  ```
  Description:
  ```

- std::string **get\_data**()

  ```
  Description:
  ```

  Get the pointer to the internal data array in the memory source.Used to extract the data after usage.

  ```
  Return value:
  ```

  Pointer to the data written.

- virtual void **set\_system\_mode**()

  ```
  Description:
  ```

  Changes output data endianess to the local systems mode.

- virtual void **set\_big\_endian\_mode**()

  ```
  Description:
  ```

  Changes output data endianess to big endian mode.

- virtual void **set\_little\_endian\_mode**()

  ```
  Description:
  ```

  Changes output data endianess to little endian mode. This is the default setting.

- virtual void **write\_int32**(

  ```
  int data)
  ```

  ```
  Description:
  ```

  Writes a signed 32 bit integer to output source.

- virtual void **write\_uint32**(

  ```
  unsigned int data)
  ```

  ```
  Description:
  ```

  Writes a unsigned 32 bit integer to output source.

- virtual void **write\_short16**(

  ```
  short data)
  ```

  ```
  Description:
  ```

  Writes a signed 16 bit integer (short) to output source.

- virtual void **write\_ushort16**(

  ```
  unsigned short data)
  ```

  ```
  Description:
  ```

  Writes a unsigned 16 bit integer (short) to output source.

- virtual void **write\_char8**(

  ```
  char data)
  ```

  ```
  Description:
  ```

  Writes a signed 8 bit integer (char) to output source.

- virtual void **write\_uchar8**(

  ```
  unsigned char data)
  ```

  ```
  Description:
  ```

  Writes a unsigned 8 bit integer (char) to output source.

- virtual void **write\_float32**(

  ```
  float data)
  ```

  ```
  Description:
  ```

  Writes a ieee format floating point to output source.

- virtual void **write\_bool**(

  ```
  bool data)
  ```

  ```
  Description:
  ```

  Writes a bool to output source.

- virtual int **write**(

  ```
  const void *data,
  int size)
  ```

  ```
  Parameters:
  data - Points to the array written.
  size - Number of bytes to write.
  ```

  ```
  Description:
  ```

  Writes larger amounts of data (no endian and 64 bit conversion):

  ```
  Return value:
  ```

  Num bytes actually written.

- virtual void **open**()

  ```
  Description:
  ```

  Opens the output source. By default, it is open.

- virtual void **close**()

  ```
  Description:
  ```

  Closes the output source.

- virtual CL\_OutputSource \***clone**()

  ```
  Description:
  ```

  Make a copy of the current OutputSource, standing at the same position.

  ```
  Return value:
  ```

  The copy of the output source.

- virtual int **tell**()

  ```
  Description:
  ```

  Returns current position in output source.

  ```
  Return value:
  ```

  Current position in source.

- virtual int **size**()

  ```
  Description:
  ```

  Returns the size of the output source

  ```
  Return value:
  ```

  Current size of output source.

- virtual void **write\_string**(

  ```
  const char *string)
  ```

  ```
  Description:
  ```

  Writes a string to the output source.

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
