#include <array.hpp>
Public Types | |
enum | { MaxSize = MaxSize_ } |
enum | { MinBitLen } |
enum | { MaxBitLen } |
enum | { IsDynamic = ArrayMode == ArrayModeDynamic } |
typedef T | RawValueType |
This may be not the same as the element type. More... | |
typedef SizeType | size_type |
typedef Base::SizeType | SizeType |
Minimal width size type. More... | |
typedef ValueType | value_type |
typedef StorageType< T >::Type | ValueType |
This is the actual stored element type. More... | |
![]() | |
enum | |
typedef ValueType * | iterator |
typedef Base::SizeType | SizeType |
typedef StorageType< T >::Type | ValueType |
Public Member Functions | |
template<typename A > | |
void | appendFormatted (const char *const format, const A value) |
Array () | |
Array (const char *str) | |
template<typename R > | |
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> | begin ()) &&sizeof((reinterpret_cast< const R * >(0)) -> size())>::Type packSquareMatrix(const R &src_row_major) |
template<typename R > | |
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> | begin ()) &&sizeof((reinterpret_cast< const R * >(0)) -> size())>::Type unpackSquareMatrix(R &dst_row_major) const |
void | convertToLowerCaseASCII () |
void | convertToUpperCaseASCII () |
bool | empty () const |
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> bool ::Type | isClose (const R &rhs) const |
template<typename R > | |
bool | operator!= (const R &rhs) const |
template<uavcan::ArrayMode RhsArrayMode, unsigned RhsMaxSize> | |
SelfType & | operator+= (const Array< T, RhsArrayMode, RhsMaxSize > &rhs) |
SelfType & | operator+= (const char *chr) |
SelfType & | operator= (const char *chr) |
bool | operator== (const char *chr) const |
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> bool ::Type | operator== (const R &rhs) const |
void | packSquareMatrix () |
template<typename ScalarType > | |
void | packSquareMatrix (const ScalarType(&src_row_major)[MaxSize]) |
void | pop_back () |
void | push_back (const ValueType &value) |
void | resize (SizeType new_size) |
void | resize (SizeType new_size, const ValueType &filler) |
template<typename R > | |
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> | size ()) &&sizeof((*(reinterpret_cast< const R * >(0)))[0]) |
template<typename R > | |
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> | size ()) &&sizeof((*(reinterpret_cast< const R * >(0)))[0]) |
void | unpackSquareMatrix () |
template<typename ScalarType > | |
void | unpackSquareMatrix (ScalarType(&dst_row_major)[MaxSize]) const |
![]() | |
ArrayImpl () | |
ValueType & | at (SizeType pos) |
const ValueType & | at (SizeType pos) const |
ValueType & | back () |
const ValueType & | back () const |
ValueType * | begin () |
const ValueType * | begin () const |
const char * | c_str () const |
ValueType * | end () |
const ValueType * | end () const |
ValueType & | front () |
const ValueType & | front () const |
bool | operator< (const R &rhs) const |
ValueType & | operator[] (SizeType pos) |
const ValueType & | operator[] (SizeType pos) const |
Static Public Member Functions | |
static int | decode (SelfType &array, ScalarCodec &codec, const TailArrayOptimizationMode tao_mode) |
static int | encode (const SelfType &array, ScalarCodec &codec, const TailArrayOptimizationMode tao_mode) |
static void | extendDataTypeSignature (DataTypeSignature &signature) |
Private Types | |
typedef ArrayImpl< T, ArrayMode, MaxSize_ > | Base |
typedef Array< T, ArrayMode, MaxSize_ > | SelfType |
Private Member Functions | |
int | decodeImpl (ScalarCodec &codec, const TailArrayOptimizationMode tao_mode, FalseType) |
Static. More... | |
int | decodeImpl (ScalarCodec &codec, const TailArrayOptimizationMode tao_mode, TrueType) |
Dynamic. More... | |
int | encodeImpl (ScalarCodec &codec, const TailArrayOptimizationMode tao_mode, FalseType) const |
Static. More... | |
int | encodeImpl (ScalarCodec &codec, const TailArrayOptimizationMode tao_mode, TrueType) const |
Dynamic. More... | |
template<typename InputIter > | |
void | packSquareMatrixImpl (const InputIter src_row_major) |
template<typename ScalarType , typename OutputIter > | |
void | unpackSquareMatrixImpl (const OutputIter dst_row_major) const |
Static Private Member Functions | |
static bool | isOptimizedTailArray (TailArrayOptimizationMode tao_mode) |
Additional Inherited Members | |
![]() | |
const typedef ValueType * | const_iterator |
![]() | |
~ArrayImpl () | |
Generic array implementation. This class is compatible with most standard library functions operating on containers (e.g. std::sort(), std::lexicographical_compare(), etc.). No dynamic memory is used. All functions that can modify the array or access elements are range checking. If the range error occurs:
|
private |
typedef T uavcan::Array< T, ArrayMode, MaxSize_ >::RawValueType |
|
private |
typedef SizeType uavcan::Array< T, ArrayMode, MaxSize_ >::size_type |
typedef Base::SizeType uavcan::Array< T, ArrayMode, MaxSize_ >::SizeType |
typedef ValueType uavcan::Array< T, ArrayMode, MaxSize_ >::value_type |
typedef StorageType<T>::Type uavcan::Array< T, ArrayMode, MaxSize_ >::ValueType |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
|
inline |
|
inline |
String constructor - only for string-like arrays. Refer to operator+=(const char*) for details.
|
inline |
Formatting appender. This method doesn't raise an overflow error; instead it silently truncates the data to fit the array capacity. Works only with string-like arrays, otherwise fails to compile.
format | Format string for std::snprintf(), e.g. "%08x", "%f" |
value | Arbitrary value of a primitive type (should fail to compile if there's a non-primitive type) |
|
inline |
Fills this array as a packed square matrix from any container that has the following public entities:
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlinestatic |
|
inlineprivate |
|
inlineprivate |
|
inlinestatic |
|
inline |
|
inlinestaticprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Fills this array as a packed square matrix in place. Please refer to the specification to learn more about matrix packing. Note that matrix packing code uses areClose() for comparison.
|
inline |
Fills this array as a packed square matrix from a static array. Please refer to the specification to learn more about matrix packing. Note that matrix packing code uses areClose() for comparison.
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
EnableIf<sizeof((reinterpret_cast<const R*>0))-> uavcan::Array< T, ArrayMode, MaxSize_ >::size | ( | ) | )[0] const && |
This operator accepts any container with size() and []. Members must be comparable via operator ==.
EnableIf<sizeof((reinterpret_cast<const R*>0))-> uavcan::Array< T, ArrayMode, MaxSize_ >::size | ( | ) | )[0] const && |
This method compares two arrays using areClose(), which ensures proper comparison of floating point values, or DSDL data structures which contain floating point fields at any depth. Please refer to the documentation of areClose() to learn more about how it works and how to define custom fuzzy comparison behavior. Any container with size() and [] is acceptable.
|
inline |
|
inline |
|
inlineprivate |