L4Re Operating System Framework
Interface and Usage Documentation
|
Abstraction for extracting a zero-terminated string from an Ipc::Istream. More...
#include <ipc_stream>
Public Member Functions | |
Str_cp_in (T *v, unsigned long &size) | |
Create a buffer for extracting an array from an Ipc::Istream. | |
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.
Definition at line 189 of file ipc_stream.
|
inline |
Create a buffer for extracting an array from an Ipc::Istream.
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 200 of file ipc_stream.