Loading...
Searching...
No Matches
L4::Ipc::Varg Class Reference

Variably sized RPC argument. More...

`#include <ipc_varg>`

Collaboration diagram for L4::Ipc::Varg:

## Public Types

typedef l4_umword_t | Tag
| The data type for the tag.

## Public Member Functions

L4_varg_type | type () const
unsigned | length () const
| Get the size of the RPC argument.
Tag | tag () const
void | tag (Tag tag)
| Set Varg tag (usually from message).
void | data (char const *d)
| Set Varg to indirect data value (usually in UTCB).
char const * | data () const
| Varg ()=default
| Make uninitialized Varg.
| Varg (L4_varg_type t, void const *v, int len)
| Make an indirect varg.
template<typename V>
Va_type< V >::Ret_value | value () const
template<typename T>
bool | is_of () const
bool | is_nil () const
bool | is_of_int () const
template<typename T>
bool | get_value (typename Va_type< T >::Value *v) const
| Get the value of the Varg as type T.
template<typename T>
void | set_value (void const *d)
| Set to indirect value of type T.
template<typename T>
void | set_direct_value (T val, typename L4::Types::Enable_if< sizeof(T)<=sizeof(char const *), bool >::type=true)
| Set to directly stored value of type T.
template<typename T>
| Varg (T const *data)
| Make Varg from indirect value (pointer).
| Varg (char const *data)
| Make Varg from null-terminated string.
template<typename T>
| Varg (T data, typename L4::Types::Enable_if< sizeof(T)<=sizeof(char const *), bool >::type=true)
| Make Varg from direct value.

## Detailed Description

Variably sized RPC argument.

Definition at line 96 of file ipc_varg.

## Member Function Documentation

## data()

char const * L4::Ipc::Varg::data | ( |  | ) | const

inline

Returns
  pointer to the data, also safe for direct data

Definition at line 123 of file ipc_varg.

## get_value()

template<typename T>

bool L4::Ipc::Varg::get_value | ( | typename Va_type< T >::Value * | v | ) | const

inline

Get the value of the Varg as type T.

Template Parameters

  T | The expected type of the Varg.

Parameters

  v | Pointer to store the value

Returns
  true when the Varg is of type T, false if not

Definition at line 185 of file ipc_varg.

References is_of(), and value().

Here is the call graph for this function:

## is_nil()

bool L4::Ipc::Varg::is_nil | ( |  | ) | const

inline

Returns
  true if the Varg is of nil type.

Definition at line 172 of file ipc_varg.

References is_of().

Referenced by L4::Ipc::Varg_list_ref::Iterator::equals().

Here is the call graph for this function:
Here is the caller graph for this function:

## is_of()

template<typename T>

bool L4::Ipc::Varg::is_of | ( |  | ) | const

inline

Returns
  true if the Varg is of type T

Definition at line 169 of file ipc_varg.

References type().

Referenced by get_value(), and is_nil().

Here is the call graph for this function:
Here is the caller graph for this function:

## is_of_int()

bool L4::Ipc::Varg::is_of_int | ( |  | ) | const

inline

Returns
  true if the Varg is an integer type (signed or unsigned).

Definition at line 175 of file ipc_varg.

References type().

Here is the call graph for this function:

## length()

unsigned L4::Ipc::Varg::length | ( |  | ) | const

inline

Get the size of the RPC argument.

Returns
  The size of the RPC argument

Definition at line 114 of file ipc_varg.

## tag()

Tag L4::Ipc::Varg::tag | ( |  | ) | const

inline

Returns
  the tag value (the Direct_data bit masked)

Definition at line 116 of file ipc_varg.

Referenced by tag().

Here is the caller graph for this function:

## type()

L4_varg_type L4::Ipc::Varg::type | ( |  | ) | const

inline

Returns
  the type field of the tag

Definition at line 109 of file ipc_varg.

Referenced by is_of(), is_of_int(), set_direct_value(), and Varg().

Here is the caller graph for this function:

## value()

template<typename V>

Va_type< V >::Ret_value L4::Ipc::Varg::value | ( |  | ) | const

inline

Template Parameters

  V | The data type of the value to retrieve.

Precondition
  The Varg must be of type V (otherwise the result is unpredictable).

Returns
  The value of the Varg as type V.

Definition at line 155 of file ipc_varg.

Referenced by get_value().

Here is the caller graph for this function:

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

- l4/sys/cxx/ipc_varg