<<value-type>> Represents an IDL array type.
More...
#include <dds/core/xtypes/CollectionTypes.hpp>
Detailed Description
<<value-type>> Represents an IDL array type.
Constructor & Destructor Documentation
Creates an unidimensional array.
- Parameters
-
type | The element type |
the_dimension | The dimension of this unidimensional array |
template<typename IntegerFwdIterator >
dds::core::xtypes::ArrayType::ArrayType |
( |
const dds::core::xtypes::DynamicType & |
type, |
|
|
IntegerFwdIterator |
dimensions_begin, |
|
|
IntegerFwdIterator |
dimensions_end |
|
) |
| |
|
inline |
Creates a multidimensional array.
For example, to create the following IDL array:
We can use this code:
std::vector<uint32_t> dim(2);
dim[0] = 10;
dim[1] = 20;
ArrayType my_array(primitive_type<double>(), dim.begin(), dim.end());
- Parameters
-
type | The element type |
dimensions_begin | The beginning of range of dimensions (uint32_t) |
dimensions_end | The end of a range of dimensions (uint32_t) |
<<C++11>> Creates a multidimensional array
For example, to create the following IDL array:
We can use this code:
ArrayType my_array(primitive_type<double>(), {10, 20});
- Parameters
-
type | The element type |
dimensions | The dimensions of this array |
<<C++11>> Creates an unidimensional array
- Parameters
-
type | The element type (to be moved) |
the_dimension | The dimension of this unidimensional array |
template<typename IntegerFwdIterator >
dds::core::xtypes::ArrayType::ArrayType |
( |
dds::core::xtypes::DynamicType && |
type, |
|
|
IntegerFwdIterator |
dimensions_begin, |
|
|
IntegerFwdIterator |
dimensions_end |
|
) |
| |
|
inline |
<<C++11>> Creates a multidimensional array
- Parameters
-
type | The element type (to be moved) |
dimensions_begin | The beginning of range of dimensions (uint32_t) |
dimensions_end | The end of a range of dimensions (uint32_t) |
<<C++11>> Creates a multidimensional array
- Parameters
-
type | The element type (to be moved) |
dimensions | The dimensions of this array |
Member Function Documentation
uint32_t dds::core::xtypes::ArrayType::dimension_count |
( |
| ) |
const |
Returns the number of dimensions.
uint32_t dds::core::xtypes::ArrayType::dimension |
( |
uint32_t |
dimension_index | ) |
const |
Returns the ith dimension.
uint32_t dds::core::xtypes::ArrayType::total_element_count |
( |
| ) |
const |
Returns the sum of all the dimensions.