L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
L4::Factory::S Class Reference

Stream class for the create() argument stream. More...

#include <factory>

+ Collaboration diagram for L4::Factory::S:

Public Member Functions

 S (S &&o) noexcept
 Move constructor.
 
 S (l4_cap_idx_t f, long obj, L4::Cap< void > target, l4_utcb_t *utcb) noexcept
 Create a stream for a specific create() call.
 
 ~S () noexcept
 Commit the create() operation if not already done explicitly via operator l4_msgtag_t().
 
 operator l4_msgtag_t () noexcept
 Explicitly commits the operation and returns the result.
 
void put (l4_mword_t i) noexcept
 Put a single l4_mword_t as next argument.
 
void put (l4_umword_t i) noexcept
 Put a single l4_umword_t as next argument.
 
void put (char const *s) &noexcept
 Add a zero-terminated string as next argument.
 
void put (Lstr const &s) &noexcept
 Add a pascal string as next argument.
 
void put (Nil) &noexcept
 Add an empty argument.
 
void put (l4_fpage_t d) &noexcept
 Add a flexpage as next argument.
 
template<typename T >
Soperator<< (T const &d) &noexcept
 Add next argument.
 
template<typename T >
S && operator<< (T const &d) &&noexcept
 Add next argument.
 

Detailed Description

Stream class for the create() argument stream.

This stream allows a variable number of arguments to be added to a create() call.

Definition at line 78 of file factory.

Constructor & Destructor Documentation

◆ S() [1/2]

L4::Factory::S::S ( S &&  o)
inlinenoexcept

Move constructor.

Parameters
oInstance of S to move.

Definition at line 97 of file factory.

References l4_msgtag_t::raw.

◆ S() [2/2]

L4::Factory::S::S ( l4_cap_idx_t  f,
long  obj,
L4::Cap< void >  target,
l4_utcb_t utcb 
)
inlinenoexcept

Create a stream for a specific create() call.

Parameters
fThe capability for the factory object (L4::Factory).
objThe protocol ID to describe the type of the object that shall be created.
[out]targetThe capability selector for the new object. The caller must allocate the capability slot. The kernel stores the new object's capability into this slot.
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.
Precondition
The capability f must have the permission L4_CAP_FPAGE_S, otherwise the later factory IPC will fail with L4_EPERM.

Definition at line 124 of file factory.

◆ ~S()

L4::Factory::S::~S ( )
inlinenoexcept

Commit the create() operation if not already done explicitly via operator l4_msgtag_t().

Warning
If the commit is deferred until destruction, potential errors are silently ignored. It is therefore recommended to commit explicitly via operator l4_msgtag_t() and check the return value.

Definition at line 138 of file factory.

References l4_msgtag_t::raw.

Member Function Documentation

◆ operator l4_msgtag_t()

L4::Factory::S::operator l4_msgtag_t ( )
inlinenoexcept

Explicitly commits the operation and returns the result.

Returns
The result of the create() operation.
Return values
L4_EOKNo error occurred.
-L4_EPERMInsufficient permissions; see precondition.
<0Error code.
Precondition
The invoked Factory capability must have the permission L4_CAP_FPAGE_S.

Definition at line 156 of file factory.

References l4_msgtag_t::raw.

◆ operator<<() [1/2]

template<typename T >
S && L4::Factory::S::operator<< ( T const &  d) &&
inlinenoexcept

Add next argument.

Template Parameters
TThe argument type. Compilation succeeds only if it is a possible argument type for S::put().
Parameters
dThe value to add as next argument.

Definition at line 251 of file factory.

References put().

+ Here is the call graph for this function:

◆ operator<<() [2/2]

template<typename T >
S & L4::Factory::S::operator<< ( T const &  d) &
inlinenoexcept

Add next argument.

Template Parameters
TThe argument type. Compilation succeeds only if it is a possible argument type for S::put().
Parameters
dThe value to add as next argument.

Definition at line 236 of file factory.

References put().

+ Here is the call graph for this function:

◆ put() [1/5]

void L4::Factory::S::put ( char const *  s) &
inlinenoexcept

Add a zero-terminated string as next argument.

Parameters
sThe string to add as next argument.

The string will be added with the zero-terminator.

Definition at line 190 of file factory.

◆ put() [2/5]

void L4::Factory::S::put ( l4_fpage_t  d) &
inlinenoexcept

Add a flexpage as next argument.

Parameters
dThe flexpage to add (there will be no map operation).

Definition at line 222 of file factory.

◆ put() [3/5]

void L4::Factory::S::put ( l4_mword_t  i)
inlinenoexcept

Put a single l4_mword_t as next argument.

Parameters
iThe value to add as next argument.

Definition at line 168 of file factory.

Referenced by operator<<(), and operator<<().

+ Here is the caller graph for this function:

◆ put() [4/5]

void L4::Factory::S::put ( l4_umword_t  i)
inlinenoexcept

Put a single l4_umword_t as next argument.

Parameters
iThe value to add as next argument.

Definition at line 178 of file factory.

◆ put() [5/5]

void L4::Factory::S::put ( Lstr const &  s) &
inlinenoexcept

Add a pascal string as next argument.

Parameters
sThe string to add as next argument.

The string will be added with the exact length given. It is the responsibility of the caller to make sure that the string is zero- terminated when that is required by the server.

Definition at line 204 of file factory.


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