RefleX
Build DDS Applications in Modern C++ without IDL
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Classes
reflex::type_traits Namespace Reference

Contains customizable type traits for user-defined types. More...

Classes

struct  is_bool
 
struct  is_bool< bool >
 
struct  is_primitive
 
struct  is_primitive< match::octet_t >
 
struct  is_primitive< bool >
 
struct  is_primitive< char >
 
struct  is_primitive< signed char >
 
struct  is_primitive< int16_t >
 
struct  is_primitive< uint16_t >
 
struct  is_primitive< int32_t >
 
struct  is_primitive< uint32_t >
 
struct  is_primitive< int64_t >
 
struct  is_primitive< uint64_t >
 
struct  is_primitive< float >
 
struct  is_primitive< double >
 
struct  is_primitive< long double >
 
struct  is_primitive< char32_t >
 
struct  is_primitive< std::tuple< Args...> >
 
struct  is_primitive< std::string >
 
struct  is_primitive< std::vector< T > >
 
struct  is_primitive< reflex::match::Union< TagType, Cases...> >
 
struct  is_enum
 
struct  is_primitive_or_enum
 
struct  is_bool_or_enum
 
struct  is_primitive_and_not_bool
 
struct  is_vector
 
struct  is_vector< std::vector< T > >
 
struct  is_vector< const std::vector< T > >
 
struct  is_string
 
struct  is_string< std::string >
 
struct  is_string< const std::string >
 
struct  is_tuple
 
struct  is_tuple< std::tuple< Args...> >
 
struct  is_tuple< const std::tuple< Args...> >
 
struct  is_stdarray
 
struct  is_stdarray< std::array< T, N > >
 
struct  is_stdarray< const std::array< T, N > >
 
struct  is_stdset
 
struct  is_stdset< std::set< T, Comp, Alloc > >
 
struct  is_stdset< const std::set< T, Comp, Alloc > >
 
struct  is_stdmap
 
struct  is_stdmap< std::map< Key, T, Comp, Alloc > >
 
struct  is_stdmap< const std::map< Key, T, Comp, Alloc > >
 
struct  is_builtin_array
 
struct  is_builtin_array< T[Dim]>
 
struct  is_builtin_array< const T[Dim]>
 
struct  is_builtin_array< T[]>
 
struct  is_builtin_array< const T[]>
 
struct  is_pointer
 
struct  is_pointer< T * >
 
struct  is_pointer< const T * >
 
struct  is_container
 
struct  is_container< std::vector< T, Alloc > >
 
struct  is_container< const std::vector< T, Alloc > >
 
struct  is_container< std::list< T, Alloc > >
 
struct  is_container< const std::list< T, Alloc > >
 
struct  is_container< std::set< Key, Comp, Alloc > >
 
struct  is_container< const std::set< Key, Comp, Alloc > >
 
struct  is_container< std::map< Key, T, Comp, Alloc > >
 
struct  is_container< const std::map< Key, T, Comp, Alloc > >
 
struct  is_union
 
struct  is_union< reflex::match::Union< TagType, Args...> >
 
struct  is_union< const reflex::match::Union< TagType, Args...> >
 
struct  is_sparse
 
struct  is_sparse< reflex::match::Sparse< Args...> >
 
struct  is_sparse< const reflex::match::Sparse< Args...> >
 
struct  is_range
 
struct  is_range< reflex::match::Range< T > >
 
struct  is_range< const reflex::match::Range< T > >
 
struct  is_range< reflex::match::BoundedRange< T, N > >
 
struct  is_range< const reflex::match::BoundedRange< T, N > >
 
struct  is_optional
 
struct  is_optional< boost::optional< T > >
 
struct  container_traits_impl
 
struct  container_traits_impl< C, true >
 
struct  container_traits_impl< C, false >
 
struct  container_traits
 
struct  optional_traits
 
struct  is_char_ptr
 
struct  is_char_ptr< char * >
 
struct  is_char_ptr< const char * >
 
struct  is_char_ptr< char *const >
 
struct  is_char_ptr< const char *const >
 
struct  inheritance_traits
 
struct  default_bound
 
struct  static_string_bound
 
struct  static_container_bound
 

Detailed Description

Contains customizable type traits for user-defined types.

Type-traits for standard library container/optional types and select boost types are already provided. For third-party container/optional types, the respective type traits templates can be customized.

For instance, if thirdparty::base64_binary is a container of octets in the thirdparty namespace, such a container can be easily adapted using the following.

namespace reflex { namespace type_traits {
template <>
struct is_container<thirdparty::base64_binary>
{ };
template <>
struct container_traits<thirdparty::base64_binary>
{
typedef char value_type;
typedef char * iterator;
};
} } // namespace reflex::type_traits

The is_container type trait indicates that a certain type should be treated as a container type. It will map to sequence typecode. Adaptable containers must export input-iterator like interface including the relevant traits. For instance, thirdparty::base64_binary exports value_type and iterator using container_traits specialization below. The container_traits specialization may not be always needed.

For a more complete example, please see $REFLEXHOME/include/reflex/traits/xsd_traits.h