nds2-client - ClientUser  0.16.8
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
List of all members
NDS::abi_0::channel_data_type_conversion< T > Struct Template Reference

Given a C++ data type, determine which NDS channel data type applies to it. More...

#include <nds_channel.hh>

Detailed Description

template<typename T>
struct NDS::abi_0::channel_data_type_conversion< T >

Given a C++ data type, determine which NDS channel data type applies to it.

Template Parameters
TThe type to check.

This is used by template code to map between the C++ type system and the NDS channel types. For example to find the type associated with an std::int32_t you would do:

NDS::channel::data_type value_type =
NDS::channel_data_type_conversion<std::int_32>::value;
// in this case value_type == NDS::channel::DATA_TYPE_INT32

When types do not match, they are mapped to DATA_TYPE_UNKOWN

const auto val =
NDS::channel_data_type_conversion<NDS::connection>::value;
// This does not make sense, so it maps to DATA_TYPE_UNKOWN

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