nds2-client - ClientDeveloper  0.16.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Attributes | 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>

Static Public Attributes

static const
NDS::channel::data_type 
value
 

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

Member Data Documentation

template<typename T >
const NDS::channel::data_type NDS::abi_0::channel_data_type_conversion< T >::value
static
Initial value:
=
NDS::channel::DATA_TYPE_UNKNOWN

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