Template Class VariantChannel

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public boost::variant< Channel< T >... >

Class Documentation

template<typename ...T>
class VariantChannel : public boost::variant<Channel<T>...>

Public Types

using types = std::tuple<T...>
template<std::size_t N>
using type_of_index = typename std::tuple_element<N, types>::type

Public Functions

size_t numElements() const
size_t width() const
std::string typeName() const
template<typename U>
boost::shared_array<U> dataPtr() const
template<std::size_t N>
inline boost::shared_array<type_of_index<N>> dataPtr() const
int type() const

Get type index of a map entry.

template<typename U>
Channel<U> extract() const
template<typename U>
Channel<U> &extract()
template<typename U>
bool is_type() const
VariantChannel<T...> clone() const

Public Static Attributes

static constexpr std::size_t num_types = std::tuple_size<types>::value

Friends

inline friend std::ostream &operator<<(std::ostream &os, const VariantChannel<T...> &ch)
struct CloneVisitor : public boost::static_visitor<VariantChannel<T...>>

Public Functions

template<typename U>
inline VariantChannel<T...> operator()(const Channel<U> &channel) const
template<typename U>
struct DataPtrVisitor : public boost::static_visitor<boost::shared_array<U>>

Public Functions

template<typename V, std::enable_if_t<std::is_same<U, V>::value, int> = 0>
inline boost::shared_array<U> operator()(const Channel<V> &channel) const
template<typename V, std::enable_if_t<!std::is_same<U, V>::value, int> = 0>
inline boost::shared_array<U> operator()(const Channel<V> &channel) const
template<class U>
struct index_of_type

Access type index with type.

  • example: ChanneVariantMap<int, float> my_map; ChanneVariantMap<int, float>::type_index<int>::value -> 0

Public Static Attributes

static constexpr std::size_t value = TupleIndex<U, types>::value
struct NumElementsVisitor : public boost::static_visitor<size_t>

Public Functions

template<typename U>
inline size_t operator()(const Channel<U> &channel) const
template<class T1, class Tuple>
struct TupleIndex
template<class T1, class ...Types>
struct TupleIndex<T1, std::tuple<T1, Types...>>

Public Static Attributes

static constexpr std::size_t value = 0
template<class T1, class U, class ...Types>
struct TupleIndex<T1, std::tuple<U, Types...>>

Public Static Attributes

static constexpr std::size_t value = 1 + TupleIndex<T1, std::tuple<Types...>>::value
struct TypeNameVisitor : public boost::static_visitor<std::string>

Public Functions

template<typename U>
inline std::string operator()(const Channel<U> &channel) const
struct WidthVisitor : public boost::static_visitor<size_t>

Public Functions

template<typename U>
inline size_t operator()(const Channel<U> &channel) const