Ocean
Ocean::FunctionParameterAccessor< tIsReference > Class Template Reference

This class implements a simple helper class allowing to access the value of an arbitrary data type. More...

Public Member Functions

void assign (typename std::add_lvalue_reference< T >::type, const void *)
 
void assign (NullClass &, const void *)
 
void assign (NullClass &, const void *)
 
void * address (typename std::add_lvalue_reference< T >::type)
 
void * address (NullClass &)
 
void * address (NullClass &)
 

Static Public Member Functions

template<typename T >
static void assign (typename std::add_lvalue_reference< T >::type target, const void *source)
 Assigns the value of a source parameter to a target parameter. More...
 
template<typename T >
static void * address (typename std::add_lvalue_reference< T >::type parameter)
 Receives the address of a specified parameter. More...
 

Detailed Description

template<bool tIsReference>
class Ocean::FunctionParameterAccessor< tIsReference >

This class implements a simple helper class allowing to access the value of an arbitrary data type.

The assignment will be applied for any non-reference parameter only.

Template Parameters
tIsReferenceTrue, if the target data type is a reference (so that nothing happens); False, if the target data type will receive the value of the source parameter

Member Function Documentation

◆ address() [1/4]

void * Ocean::FunctionParameterAccessor< true >::address< NullClass > ( NullClass )
inline

◆ address() [2/4]

void * Ocean::FunctionParameterAccessor< false >::address< NullClass > ( NullClass )
inline

◆ address() [3/4]

template<bool tTargetIsReference>
template<typename T >
void * Ocean::FunctionParameterAccessor< tTargetIsReference >::address ( typename std::add_lvalue_reference< T >::type  parameter)
inlinestatic

Receives the address of a specified parameter.

The address will be nullptr if the provided parameter is a reference.

Parameters
parameterThe parameter for which the address is requested
Returns
The resulting type-less address of the specified parameter, nullptr if tIsReference is True
Template Parameters
TThe data type of the source and target parameter

◆ address() [4/4]

void * Ocean::FunctionParameterAccessor< true >::address ( typename std::add_lvalue_reference< T >::type  )
inline

◆ assign() [1/4]

void Ocean::FunctionParameterAccessor< true >::assign< NullClass > ( NullClass ,
const void *   
)
inline

◆ assign() [2/4]

void Ocean::FunctionParameterAccessor< false >::assign< NullClass > ( NullClass ,
const void *   
)
inline

◆ assign() [3/4]

template<bool tTargetIsReference>
template<typename T >
void Ocean::FunctionParameterAccessor< tTargetIsReference >::assign ( typename std::add_lvalue_reference< T >::type  target,
const void *  source 
)
inlinestatic

Assigns the value of a source parameter to a target parameter.

Parameters
targetThe target parameter receiving the value of the source parameter
sourceThe address of the source parameter
Template Parameters
TThe data type of the source and target parameter

◆ assign() [4/4]

void Ocean::FunctionParameterAccessor< true >::assign ( typename std::add_lvalue_reference< T >::type  ,
const void *   
)
inline

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