forb
Classes | Typedefs | Functions
forb Namespace Reference

This function implements a memcpy abstract that is valid also for volatile data. More...

Classes

class  base_skeleton
 The class from which any automatically generated skeleton will inherit. More...
 
class  base_stub
 The class from which any automatically generated stub will inherit. More...
 
class  exception
 Custom exception type used in FORB library. More...
 
class  remote_registry
 Emulates a complete registry of all active remote objects that use this framework. More...
 

Typedefs

using remote_ptr = std::shared_ptr< base_stub >
 Shared pointer to a base_class object (or a derived class).
 
using remote_var = std::unique_ptr< base_stub >
 Unique pointer to a base_class object (or a derived class).
 
using call_id_t = uint16_t
 The type that will be used to transmit the call_id.
 
using res_code_t = uint16_t
 The type that will be used to exchange the res_code.
 

Functions

template<typename T >
bool is_nil (const std::shared_ptr< T > &ptr)
 Returns true if the given pointer to a base_stub (or derived class) is null.
 
template<typename T >
bool is_nil (const std::unique_ptr< T > &ptr)
 Returns true if the given pointer to a base_stub (or derived class) is null.
 
template<typename T >
constexpr forb::call_id_t call_id_t_cast (T &&v)
 Casts any integer type to call_id_t. More...
 

Detailed Description

This function implements a memcpy abstract that is valid also for volatile data.

The standard memcpy function is not suitable for volatile arrays because the volatile attribute is dropped when the function is called, while this one keeps the volatile attributes of either dest or src. It may however not be as efficient as standard memcpy though.

Function Documentation

§ call_id_t_cast()

template<typename T >
constexpr forb::call_id_t forb::call_id_t_cast ( T &&  v)

Casts any integer type to call_id_t.

Used to send as call_id_t enumerators that use call_id_t as underlying type.