rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes
type_list< base_t > Struct Template Reference

#include <type_list.h>

Inheritance diagram for type_list< base_t >:
Inheritance graph
[legend]
Collaboration diagram for type_list< base_t >:
Collaboration graph
[legend]

Public Member Functions

template<typename func_t >
void constexpr apply_all (func_t const &f)
 
template<typename func_t >
void constexpr apply_all (func_t const &f) const
 
template<typename return_t , typename func_t >
decltype(auto) aggregate (func_t const &accumulator, return_t seed)
 
template<typename return_t , typename func_t >
decltype(auto) aggregate (func_t const &accumulator, return_t seed) const
 
template<typename get_t , typename = std::enable_if_t<has<get_t>()>>
constexpr auto & get ()
 
template<typename get_t , typename = std::enable_if_t<has<get_t>()>>
constexpr auto const & get () const
 
constexpr auto & unmock ()
 
constexpr auto const & unmock () const
 
constexpr auto operator-> ()
 
constexpr auto operator-> () const
 
constexpr auto & operator* ()
 
constexpr auto const & operator* () const
 

Static Public Member Functions

template<typename count_t >
static consteval size_t count ()
 
static consteval size_t count ()
 
template<typename has_t >
static consteval bool has ()
 

Private Attributes

base_t me
 

Detailed Description

template<typename base_t>
struct type_list< base_t >

Definition at line 130 of file type_list.h.

Member Function Documentation

◆ aggregate() [1/2]

template<typename base_t >
template<typename return_t , typename func_t >
decltype(auto) type_list< base_t >::aggregate ( func_t const &  accumulator,
return_t  seed 
)
inline

Definition at line 155 of file type_list.h.

155 {
156 return accumulator(me, seed);
157 }

◆ aggregate() [2/2]

template<typename base_t >
template<typename return_t , typename func_t >
decltype(auto) type_list< base_t >::aggregate ( func_t const &  accumulator,
return_t  seed 
) const
inline

Definition at line 160 of file type_list.h.

160 {
161 return accumulator(me, seed);
162 }

◆ apply_all() [1/2]

template<typename base_t >
template<typename func_t >
void constexpr type_list< base_t >::apply_all ( func_t const &  f)
inlineconstexpr

Definition at line 145 of file type_list.h.

145 {
146 f(me);
147 }

◆ apply_all() [2/2]

template<typename base_t >
template<typename func_t >
void constexpr type_list< base_t >::apply_all ( func_t const &  f) const
inlineconstexpr

Definition at line 150 of file type_list.h.

150 {
151 f(me);
152 }

◆ count() [1/2]

template<typename base_t >
template<typename count_t >
static consteval size_t type_list< base_t >::count ( )
inlinestatic

Definition at line 136 of file type_list.h.

136 {
137 return std::is_same_v<base_t, count_t> ? 1 : 0;
138 }

◆ count() [2/2]

template<typename base_t >
static consteval size_t type_list< base_t >::count ( )
inlinestatic

Definition at line 140 of file type_list.h.

140 {
141 return 1;
142 }

◆ get() [1/2]

template<typename base_t >
template<typename get_t , typename = std::enable_if_t<has<get_t>()>>
constexpr auto & type_list< base_t >::get ( )
inlineconstexpr

Definition at line 170 of file type_list.h.

170 {
171 return *this;
172 }

◆ get() [2/2]

template<typename base_t >
template<typename get_t , typename = std::enable_if_t<has<get_t>()>>
constexpr auto const & type_list< base_t >::get ( ) const
inlineconstexpr

Definition at line 175 of file type_list.h.

175 {
176 return *this;
177 }

◆ has()

template<typename base_t >
template<typename has_t >
static consteval bool type_list< base_t >::has ( )
inlinestatic

Definition at line 165 of file type_list.h.

165 {
166 return std::is_same_v<has_t, base_t>;
167 }

◆ operator*() [1/2]

template<typename base_t >
constexpr auto & type_list< base_t >::operator* ( )
inlineconstexpr

Definition at line 195 of file type_list.h.

195 {
196 return me;
197 }

◆ operator*() [2/2]

template<typename base_t >
constexpr auto const & type_list< base_t >::operator* ( ) const
inlineconstexpr

Definition at line 199 of file type_list.h.

199 {
200 return me;
201 }

◆ operator->() [1/2]

template<typename base_t >
constexpr auto type_list< base_t >::operator-> ( )
inlineconstexpr

Definition at line 187 of file type_list.h.

187 {
188 return &me;
189 }

◆ operator->() [2/2]

template<typename base_t >
constexpr auto type_list< base_t >::operator-> ( ) const
inlineconstexpr

Definition at line 191 of file type_list.h.

191 {
192 return &me;
193 }

◆ unmock() [1/2]

template<typename base_t >
constexpr auto & type_list< base_t >::unmock ( )
inlineconstexpr

Definition at line 179 of file type_list.h.

179 {
180 return me;
181 }

◆ unmock() [2/2]

template<typename base_t >
constexpr auto const & type_list< base_t >::unmock ( ) const
inlineconstexpr

Definition at line 183 of file type_list.h.

183 {
184 return me;
185 }

Field Documentation

◆ me

template<typename base_t >
base_t type_list< base_t >::me
private

Definition at line 132 of file type_list.h.


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