Menu

StaticCreatorPolicy Struct Reference

StaticCreatorPolicy is a policy template for the compile time selection utility IF_CONTAINS_TYPE_(NAME). More...

#include <StaticCreatorPolicy.h>

Static Public Member Functions

template<typename T , typename SubType , typename R >
static R process ()
 The method is provided for calling within the context of a selector template. As the name of the policy class describes it creates a static object that is not destructed if the method is left.

Detailed Description

StaticCreatorPolicy is a policy template for the compile time selection utility IF_CONTAINS_TYPE_(NAME).

It is intended for the use within the then clause, because it creates/construtes a static object of the requested type. This creator can be used for things, that only needs to be constructed and the reset of the functionality works then out of the box.


Member Function Documentation

template<typename T , typename SubType , typename R >
static R StaticCreatorPolicy::process (  )  [inline, static]

The method is provided for calling within the context of a selector template. As the name of the policy class describes it creates a static object that is not destructed if the method is left.

Template Parameters:
T is a type normally a configuration type/class
SubType is a type and you can instantiate an object of it. If the policy is used in the context of IF_CONTAINS_TYPE_(NAME) it is guaranteed, that SubType is the requested type.
R is the return value of the static process method and its default is void

References famouso::mw::nl::CAN::detail::__attribute__().


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