L4Re - L4 Runtime Environment
L4::Ipc::Array< ELEM_TYPE, LEN_TYPE > Struct Template Reference

Array data type for dynamically sized arrays in RPCs. More...

+ Inheritance diagram for L4::Ipc::Array< ELEM_TYPE, LEN_TYPE >:
+ Collaboration diagram for L4::Ipc::Array< ELEM_TYPE, LEN_TYPE >:

Public Member Functions

 Array ()
 Make array.
 
 Array (LEN_TYPE length, ELEM_TYPE *data)
 Make array from length and data pointer.
 
 Array (typename Non_const< ELEM_TYPE >::type const &other)
 Make a const array from a non-const array.
 

Detailed Description

template<typename ELEM_TYPE, typename LEN_TYPE = Array_len_default>
struct L4::Ipc::Array< ELEM_TYPE, LEN_TYPE >

Array data type for dynamically sized arrays in RPCs.

Template Parameters
ELEM_TYPEThe data type of an array element, should be 'const' when used as input.
LEN_TYPEData type used to store the number of elements in the array.

An Array generally encapsulates a data pointer and a length (number of elements). Array does not provide any storage for the data itself. The storage is either provided by a client-side caller or in the case of Array_ref is the message itself.

Arrays can be used as input or as output arguments, when used as input ELEM_TYPE should be qualified const, when used as output a reference to an array must be used and the ELEM_TYPE must not be qualified const. It is the caller's responsibility to provide an array buffer of sufficient length. If a message from the server is too large it will be silently truncated.

If backward compatibility with Ipc::Stream is required, then LEN_TYPE must be unsigned long.

Definition at line 85 of file ipc_array.


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