L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Ipc::Varg Class Reference

Variably sized RPC argument. More...

#include <ipc_varg>

Inherited by L4::Ipc::Varg_t< T >.

+ 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 107 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 134 of file ipc_varg.

Referenced by Varg(), Varg(), and Varg().

+ Here is the caller graph for this function:

◆ 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
TThe expected type of the Varg.
Parameters
vPointer to store the value
Returns
true when the Varg is of type T, false if not

Definition at line 196 of file ipc_varg.

◆ is_nil()

bool L4::Ipc::Varg::is_nil ( ) const
inline
Returns
true if the Varg is of nil type.

Definition at line 183 of file ipc_varg.

Referenced by L4::Ipc::Varg_list_ref::Iterator::equals(), L4::Ipc::Varg_list_ref::Iterator::operator bool(), and L4::Ipc::Varg_list_ref::Iterator::operator++().

+ 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 180 of file ipc_varg.

References type().

+ Here is the call 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 186 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 125 of file ipc_varg.

◆ tag()

Tag L4::Ipc::Varg::tag ( ) const
inline
Returns
the tag value (the Direct_data bit masked)

Definition at line 127 of file ipc_varg.

◆ type()

L4_varg_type L4::Ipc::Varg::type ( ) const
inline
Returns
the type field of the tag

Definition at line 120 of file ipc_varg.

Referenced by is_of(), and is_of_int().

+ 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
VThe 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 166 of file ipc_varg.


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