Embedded Template Library 1.0
Loading...
Searching...
No Matches
unaligned_type.h File Reference
#include "platform.h"
#include "type_traits.h"
#include "endianness.h"
#include "iterator.h"
#include "algorithm.h"
#include "bit.h"
#include "binary.h"
#include "array.h"
#include "exception.h"
#include "file_error_numbers.h"
#include <string.h>

Go to the source code of this file.

Classes

struct  etl::unaligned_type_exception
 
class  etl::unaligned_type_buffer_size
 Buffer size exception. More...
 

Namespaces

namespace  etl
 bitset_ext
 

Typedefs

typedef private_unaligned_type::unaligned_type_storage< Size_ >::pointer etl::private_unaligned_type::pointer
 
typedef private_unaligned_type::unaligned_type_storage< Size_ >::const_pointer etl::private_unaligned_type::const_pointer
 
typedef unaligned_type< char, etl::endian::little > etl::le_char_t
 
typedef unaligned_type< signed char, etl::endian::little > etl::le_schar_t
 
typedef unaligned_type< unsigned char, etl::endian::little > etl::le_uchar_t
 
typedef unaligned_type< short, etl::endian::little > etl::le_short_t
 
typedef unaligned_type< unsigned short, etl::endian::little > etl::le_ushort_t
 
typedef unaligned_type< int, etl::endian::little > etl::le_int_t
 
typedef unaligned_type< unsigned int, etl::endian::little > etl::le_uint_t
 
typedef unaligned_type< long, etl::endian::little > etl::le_long_t
 
typedef unaligned_type< unsigned long, etl::endian::little > etl::le_ulong_t
 
typedef unaligned_type< long long, etl::endian::little > etl::le_long_long_t
 
typedef unaligned_type< unsigned long long, etl::endian::little > etl::le_ulong_long_t
 
typedef unaligned_type< int16_t, etl::endian::little > etl::le_int16_t
 
typedef unaligned_type< uint16_t, etl::endian::little > etl::le_uint16_t
 
typedef unaligned_type< int32_t, etl::endian::little > etl::le_int32_t
 
typedef unaligned_type< uint32_t, etl::endian::little > etl::le_uint32_t
 
typedef unaligned_type< int64_t, etl::endian::little > etl::le_int64_t
 
typedef unaligned_type< uint64_t, etl::endian::little > etl::le_uint64_t
 
typedef unaligned_type< float, etl::endian::little > etl::le_float_t
 
typedef unaligned_type< double, etl::endian::little > etl::le_double_t
 
typedef unaligned_type< long double, etl::endian::little > etl::le_long_double_t
 
typedef unaligned_type< char, etl::endian::big > etl::be_char_t
 
typedef unaligned_type< signed char, etl::endian::big > etl::be_schar_t
 
typedef unaligned_type< unsigned char, etl::endian::big > etl::be_uchar_t
 
typedef unaligned_type< short, etl::endian::big > etl::be_short_t
 
typedef unaligned_type< unsigned short, etl::endian::big > etl::be_ushort_t
 
typedef unaligned_type< int, etl::endian::big > etl::be_int_t
 
typedef unaligned_type< unsigned int, etl::endian::big > etl::be_uint_t
 
typedef unaligned_type< long, etl::endian::big > etl::be_long_t
 
typedef unaligned_type< unsigned long, etl::endian::big > etl::be_ulong_t
 
typedef unaligned_type< long long, etl::endian::big > etl::be_long_long_t
 
typedef unaligned_type< unsigned long long, etl::endian::big > etl::be_ulong_long_t
 
typedef unaligned_type< int16_t, etl::endian::big > etl::be_int16_t
 
typedef unaligned_type< uint16_t, etl::endian::big > etl::be_uint16_t
 
typedef unaligned_type< int32_t, etl::endian::big > etl::be_int32_t
 
typedef unaligned_type< uint32_t, etl::endian::big > etl::be_uint32_t
 
typedef unaligned_type< int64_t, etl::endian::big > etl::be_int64_t
 
typedef unaligned_type< uint64_t, etl::endian::big > etl::be_uint64_t
 
typedef unaligned_type< float, etl::endian::big > etl::be_float_t
 
typedef unaligned_type< double, etl::endian::big > etl::be_double_t
 
typedef unaligned_type< long double, etl::endian::big > etl::be_long_double_t
 
typedef be_char_t etl::net_char_t
 
typedef be_schar_t etl::net_schar_t
 
typedef be_uchar_t etl::net_uchar_t
 
typedef be_short_t etl::net_short_t
 
typedef be_ushort_t etl::net_ushort_t
 
typedef be_int_t etl::net_int_t
 
typedef be_uint_t etl::net_uint_t
 
typedef be_long_t etl::net_long_t
 
typedef be_ulong_t etl::net_ulong_t
 
typedef be_long_long_t etl::net_long_long_t
 
typedef be_ulong_long_t etl::net_ulong_long_t
 
typedef be_int16_t etl::net_int16_t
 
typedef be_uint16_t etl::net_uint16_t
 
typedef be_int32_t etl::net_int32_t
 
typedef be_uint32_t etl::net_uint32_t
 
typedef be_int64_t etl::net_int64_t
 
typedef be_uint64_t etl::net_uint64_t
 
typedef be_float_t etl::net_float_t
 
typedef be_double_t etl::net_double_t
 
typedef be_long_double_t etl::net_long_double_t
 
typedef unaligned_type_ext< char, etl::endian::little > etl::le_char_ext_t
 
typedef unaligned_type_ext< signed char, etl::endian::little > etl::le_schar_ext_t
 
typedef unaligned_type_ext< unsigned char, etl::endian::little > etl::le_uchar_ext_t
 
typedef unaligned_type_ext< short, etl::endian::little > etl::le_short_ext_t
 
typedef unaligned_type_ext< unsigned short, etl::endian::little > etl::le_ushort_ext_t
 
typedef unaligned_type_ext< int, etl::endian::little > etl::le_int_ext_t
 
typedef unaligned_type_ext< unsigned int, etl::endian::little > etl::le_uint_ext_t
 
typedef unaligned_type_ext< long, etl::endian::little > etl::le_long_ext_t
 
typedef unaligned_type_ext< unsigned long, etl::endian::little > etl::le_ulong_ext_t
 
typedef unaligned_type_ext< long long, etl::endian::little > etl::le_long_long_ext_t
 
typedef unaligned_type_ext< unsigned long long, etl::endian::little > etl::le_ulong_long_ext_t
 
typedef unaligned_type_ext< int16_t, etl::endian::little > etl::le_int16_ext_t
 
typedef unaligned_type_ext< uint16_t, etl::endian::little > etl::le_uint16_ext_t
 
typedef unaligned_type_ext< int32_t, etl::endian::little > etl::le_int32_ext_t
 
typedef unaligned_type_ext< uint32_t, etl::endian::little > etl::le_uint32_ext_t
 
typedef unaligned_type_ext< int64_t, etl::endian::little > etl::le_int64_ext_t
 
typedef unaligned_type_ext< uint64_t, etl::endian::little > etl::le_uint64_ext_t
 
typedef unaligned_type_ext< float, etl::endian::little > etl::le_float_ext_t
 
typedef unaligned_type_ext< double, etl::endian::little > etl::le_double_ext_t
 
typedef unaligned_type_ext< long double, etl::endian::little > etl::le_long_double_ext_t
 
typedef unaligned_type_ext< char, etl::endian::big > etl::be_char_ext_t
 
typedef unaligned_type_ext< signed char, etl::endian::big > etl::be_schar_ext_t
 
typedef unaligned_type_ext< unsigned char, etl::endian::big > etl::be_uchar_ext_t
 
typedef unaligned_type_ext< short, etl::endian::big > etl::be_short_ext_t
 
typedef unaligned_type_ext< unsigned short, etl::endian::big > etl::be_ushort_ext_t
 
typedef unaligned_type_ext< int, etl::endian::big > etl::be_int_ext_t
 
typedef unaligned_type_ext< unsigned int, etl::endian::big > etl::be_uint_ext_t
 
typedef unaligned_type_ext< long, etl::endian::big > etl::be_long_ext_t
 
typedef unaligned_type_ext< unsigned long, etl::endian::big > etl::be_ulong_ext_t
 
typedef unaligned_type_ext< long long, etl::endian::big > etl::be_long_long_ext_t
 
typedef unaligned_type_ext< unsigned long long, etl::endian::big > etl::be_ulong_long_ext_t
 
typedef unaligned_type_ext< int16_t, etl::endian::big > etl::be_int16_ext_t
 
typedef unaligned_type_ext< uint16_t, etl::endian::big > etl::be_uint16_ext_t
 
typedef unaligned_type_ext< int32_t, etl::endian::big > etl::be_int32_ext_t
 
typedef unaligned_type_ext< uint32_t, etl::endian::big > etl::be_uint32_ext_t
 
typedef unaligned_type_ext< int64_t, etl::endian::big > etl::be_int64_ext_t
 
typedef unaligned_type_ext< uint64_t, etl::endian::big > etl::be_uint64_ext_t
 
typedef unaligned_type_ext< float, etl::endian::big > etl::be_float_ext_t
 
typedef unaligned_type_ext< double, etl::endian::big > etl::be_double_ext_t
 
typedef unaligned_type_ext< long double, etl::endian::big > etl::be_long_double_ext_t
 
typedef be_char_ext_t etl::net_char_ext_t
 
typedef be_schar_ext_t etl::net_schar_ext_t
 
typedef be_uchar_ext_t etl::net_uchar_ext_t
 
typedef be_short_ext_t etl::net_short_ext_t
 
typedef be_ushort_ext_t etl::net_ushort_ext_t
 
typedef be_int_ext_t etl::net_int_ext_t
 
typedef be_uint_ext_t etl::net_uint_ext_t
 
typedef be_long_ext_t etl::net_long_ext_t
 
typedef be_ulong_ext_t etl::net_ulong_ext_t
 
typedef be_long_long_ext_t etl::net_long_long_ext_t
 
typedef be_ulong_long_ext_t etl::net_ulong_long_ext_t
 
typedef be_int16_ext_t etl::net_int16_ext_t
 
typedef be_uint16_ext_t etl::net_uint16_ext_t
 
typedef be_int32_ext_t etl::net_int32_ext_t
 
typedef be_uint32_ext_t etl::net_uint32_ext_t
 
typedef be_int64_ext_t etl::net_int64_ext_t
 
typedef be_uint64_ext_t etl::net_uint64_ext_t
 
typedef be_float_ext_t etl::net_float_ext_t
 
typedef be_double_ext_t etl::net_double_ext_t
 
typedef be_long_double_ext_t etl::net_long_double_ext_t
 

Functions

template<size_t Size_, typename TDerivedType >
 etl::private_unaligned_type::ETL_PACKED_CLASS (unaligned_type_common)
 
template<size_t Size_, int Endian_>
 etl::private_unaligned_type::ETL_PACKED_CLASS (unaligned_copy)< Size_
 
template<size_t Size_, int Endian_>
ETL_END_PACKED etl::private_unaligned_type::ETL_PACKED_CLASS (unaligned_copy)< Size_
 

Variables

 etl::private_unaligned_type::Endian_
 
 etl::private_unaligned_type::true
 
ETL_END_PACKED etl::private_unaligned_type::false
 

Function Documentation

◆ ETL_PACKED_CLASS() [1/3]

template<size_t Size_, int Endian_>
etl::private_unaligned_type::ETL_PACKED_CLASS ( unaligned_copy  )

Unaligned copy For integrals.

◆ ETL_PACKED_CLASS() [2/3]

template<size_t Size_, int Endian_>
ETL_END_PACKED etl::private_unaligned_type::ETL_PACKED_CLASS ( unaligned_copy  )

Unaligned copy For floating point.

◆ ETL_PACKED_CLASS() [3/3]

template<size_t Size_, typename TDerivedType >
etl::private_unaligned_type::ETL_PACKED_CLASS ( unaligned_type_common  )

unaligned_type_common Contains all functionality that doesn't require the type. ETL_PACKED ensures that GCC does not complain when used in a packed object.

Default constructor

Size of the storage.

Pointer to the beginning of the storage.

Const pointer to the beginning of the storage.

Iterator to the beginning of the storage.

Const iterator to the beginning of the storage.

Const iterator to the beginning of the storage.

Reverse iterator to the beginning of the storage.

Const reverse iterator to the beginning of the storage.

Const reverse iterator to the beginning of the storage.

Iterator to the end of the storage.

Const iterator to the end of the storage.

Const iterator to the end of the storage.

Reverse iterator to the end of the storage.

Const reverse iterator to the end of the storage.

Const reverse iterator to the end of the storage.

Index operator.

Const index operator.

Get a pointer to the storage.

Get a const pointer to the storage.

Variable Documentation

◆ false

ETL_END_PACKED etl::private_unaligned_type::false
Initial value:
{
public:
typedef typename private_unaligned_type::unaligned_type_storage<Size_>::storage_type storage_type

◆ true

etl::private_unaligned_type::true
Initial value:
{
public:
typedef typename private_unaligned_type::unaligned_type_storage<Size_>::storage_type storage_type