STADLS
stadls::DecodeVisitor< T > Class Template Reference

Fill the visited containers by decoding the specified configuration data. More...

#include <visitors.h>

Public Member Functions

 DecodeVisitor (T data)
 
template<typename CoordinateT , typename ContainerT >
auto operator() (CoordinateT const &, ContainerT const &) -> typename std::enable_if<!ContainerT::has_local_data::value >::type
 
template<typename CoordinateT , typename ContainerT >
auto operator() (CoordinateT const &coord, ContainerT &container) -> decltype(&ContainerT::decode, void())
 
template<typename CoordinateT , typename ContainerT >
auto operator() (CoordinateT const &coord, ContainerT &container) -> decltype(&ContainerT::template decode< value_type >, void())
 

Detailed Description

template<typename T>
class stadls::DecodeVisitor< T >

Fill the visited containers by decoding the specified configuration data.

Each container should implement a decode member function that accepts an array of words read from the hardware. The first argument to the function can optionally be the coordinate of the container, should it be required to correctly decode the data. Containers that do not themselves contain data (i.e. containers of containers) can alternatively be tagged via

typedef std::false_type has_local_data;
See also
ReadAddressVisitor, which is used to extract the addresses to read the configuration data from.

Definition at line 131 of file visitors.h.

Constructor & Destructor Documentation

◆ DecodeVisitor()

template<typename T >
stadls::DecodeVisitor< T >::DecodeVisitor ( data)
inline

Definition at line 138 of file visitors.h.

Member Function Documentation

◆ operator()() [1/3]

template<typename T >
template<typename CoordinateT , typename ContainerT >
auto stadls::DecodeVisitor< T >::operator() ( CoordinateT const &  ,
ContainerT const &   
) -> typename std::enable_if<!ContainerT::has_local_data::value>::type
inline

Definition at line 155 of file visitors.h.

◆ operator()() [2/3]

template<typename T >
template<typename CoordinateT , typename ContainerT >
auto stadls::DecodeVisitor< T >::operator() ( CoordinateT const &  coord,
ContainerT &  container 
) -> decltype(&ContainerT::decode, void())
inline

Definition at line 141 of file visitors.h.

◆ operator()() [3/3]

template<typename T >
template<typename CoordinateT , typename ContainerT >
auto stadls::DecodeVisitor< T >::operator() ( CoordinateT const &  coord,
ContainerT &  container 
) -> decltype(&ContainerT::template decode<value_type>, void())
inline

Definition at line 148 of file visitors.h.


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