STADLS
stadls::EncodeVisitor< T > Class Template Reference

Extract hardware configuration data for the visited containers. More...

#include <visitors.h>

Public Member Functions

 EncodeVisitor (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 const &container) -> decltype(&ContainerT::encode, void())
 
template<typename CoordinateT , typename ContainerT >
auto operator() (CoordinateT const &coord, ContainerT const &container) -> decltype(&ContainerT::template encode< value_type >, void())
 

Detailed Description

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

Extract hardware configuration data for the visited containers.

Each container should implement an encode member function that returns an array of words to be written to the hardware. The first argument to the function can optionally be the coordinate of the container, should it be required to correctly encode 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
WriteAddressVisitor, which is used to extract the addresses to write the configuration data to.

Definition at line 211 of file visitors.h.

Constructor & Destructor Documentation

◆ EncodeVisitor()

template<typename T >
stadls::EncodeVisitor< T >::EncodeVisitor ( T &  data)
inline

Definition at line 217 of file visitors.h.

Member Function Documentation

◆ operator()() [1/3]

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

Definition at line 234 of file visitors.h.

◆ operator()() [2/3]

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

Definition at line 220 of file visitors.h.

◆ operator()() [3/3]

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

Definition at line 227 of file visitors.h.


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