Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::RRMultiDimArray< T > Class Template Reference

Numeric primitive multidimensional array value type. More...

#include <DataTypes.h>

Inheritance diagram for RobotRaconteur::RRMultiDimArray< T >:
RobotRaconteur::RRMultiDimBaseArray RobotRaconteur::RRValue

Public Member Functions

virtual void RetrieveSubArray (const std::vector< uint32_t > &memorypos, const boost::intrusive_ptr< RRMultiDimArray< T > > &buffer, const std::vector< uint32_t > &bufferpos, const std::vector< uint32_t > &count)
 Retrieve a subset of an array.
virtual void AssignSubArray (const std::vector< uint32_t > &memorypos, const boost::intrusive_ptr< RRMultiDimArray< T > > &buffer, const std::vector< uint32_t > &bufferpos, const std::vector< uint32_t > &count)
 Assign a subset of an array.

Detailed Description

template<typename T>
class RobotRaconteur::RRMultiDimArray< T >

Numeric primitive multidimensional array value type.

This class stores a numeric primitive multidimensional arrays. Multidimensional arrays are stored as a uint32_t array of dimensions, and an array of the flattened elements. Arrays are stored in column major, or "Fortran" order.

Multidimensional arrays should be allocated using AllocateRRMultiDimArray() or AllocateEmptyRRMultiDimArray()

Valid values for T are rr_bool, double, float, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, cdouble, or csingle. Attempts to use any other types will result in a compiler error.

RRMultiDimArray must be stored in RR_INTRUSIVE_PTR. It will be deleted automatically when the reference count goes to zero.

Template Parameters
TThe type of the array elements

Member Function Documentation

◆ AssignSubArray()

template<typename T>
virtual void RobotRaconteur::RRMultiDimArray< T >::AssignSubArray ( const std::vector< uint32_t > & memorypos,
const boost::intrusive_ptr< RRMultiDimArray< T > > & buffer,
const std::vector< uint32_t > & bufferpos,
const std::vector< uint32_t > & count )
inlinevirtual

Assign a subset of an array.

Parameters
memoryposPosition within array to store data
bufferBuffer to assign data from
bufferposPosition within buffer to assign from
countCount of data to assign

◆ RetrieveSubArray()

template<typename T>
virtual void RobotRaconteur::RRMultiDimArray< T >::RetrieveSubArray ( const std::vector< uint32_t > & memorypos,
const boost::intrusive_ptr< RRMultiDimArray< T > > & buffer,
const std::vector< uint32_t > & bufferpos,
const std::vector< uint32_t > & count )
inlinevirtual

Retrieve a subset of an array.

Parameters
memoryposPosition in array to read
bufferBuffer to store retrieved data
bufferposPosition within buffer to store data
countCount of data to retrieve

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