Loading...
Searching...
No Matches
L4::Ipc::Str_cp_in< T > Class Template Reference

Abstraction for extracting a zero-terminated string from an Ipc::Istream. More...

`#include <ipc_stream>`

Collaboration diagram for L4::Ipc::Str_cp_in< T >:

## Public Member Functions

| Str_cp_in (T *v, unsigned long &size)
| Create a buffer for extracting an array from an Ipc::Istream.

## Detailed Description

template<typename T>
class L4::Ipc::Str_cp_in< T >

Abstraction for extracting a zero-terminated string from an Ipc::Istream.

An instance of Str_cp_in can be used to extract a zero-terminated string an Ipc::Istream. The data from the received message is thereby copied to the given buffer and size is set to the number of characters found in the stream. The string is zero terminated in any circumstances. When the given buffer is smaller than the received string the last byte in the buffer will be the zero terminator. In the case the received string is shorter than the given buffer the zero termination will be placed behind the received data. This provides a zero-terminated result even in cases where the sender did not provide proper termination or in cases of too small receiver buffers.

See also
  str_cp_in().

Definition at line 178 of file ipc_stream.

## Constructor & Destructor Documentation

## Str_cp_in()

template<typename T>

L4::Ipc::Str_cp_in< T >::Str_cp_in | ( | T * | v,
|  | unsigned long & | size )

inline

Create a buffer for extracting an array from an Ipc::Istream.

Parameters

  | v | The buffer for string.
  [in,out] | size | Input: The number of bytes available in v Output: The number of bytes received (including the terminator).

Definition at line 189 of file ipc_stream.

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

- l4/cxx/ipc_stream