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

namedarray array value type More...

#include <DataTypes.h>

Inheritance diagram for RobotRaconteur::RRNamedArray< T >:
RobotRaconteur::RRNamedBaseArray RobotRaconteur::RRValue

Public Types

typedef T value_type
typedef T * iterator
typedef const T * const_iterator
typedef T & reference
typedef const T & const_reference
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type
typedef boost::reverse_iterator< iteratorreverse_iterator
typedef boost::reverse_iterator< const_iteratorconst_reverse_iterator

Public Member Functions

 RRNamedArray (const boost::intrusive_ptr< RRArray< typename RRPrimUtil< T >::ElementArrayType > > &rr_array)
 Construct a RRNamedArray object.
virtual size_t size () const
 returns the number of elements (namedarray elements)
virtual size_t size ()
 returns the number of elements (namedarray elements)
virtual void * void_ptr ()
 get a void pointer to the underlying numeric array
RR_OVIRTUAL size_t ElementSize () RR_OVERRIDE
 get the number of bytes per namedarray element of the array
RR_OVIRTUAL DataTypes ElementArrayType () RR_OVERRIDE
 get the type of the underlying numeric array
RR_OVIRTUAL size_t ElementArrayCount () RR_OVERRIDE
 get the total number of elements in the underlying numeric array
virtual boost::intrusive_ptr< RRArray< typename RRPrimUtil< T >::ElementArrayType > > GetNumericArray ()
 get the underlying numeric RRArray
RR_OVIRTUAL boost::intrusive_ptr< RRBaseArrayGetNumericBaseArray () RR_OVERRIDE
 get the underlying numeric array as an RRBaseArray
iterator begin ()
 returns an iterator to the beginning
const_iterator begin () const
 returns an iterator to the beginning
const_iterator cbegin () const
 returns an iterator to the beginning
iterator end ()
 returns an iterator to the end
const_iterator end () const
 returns an iterator to the end
const_iterator cend () const
 returns an iterator to the end
reverse_iterator rbegin ()
 returns a reverse iterator to the beginning
const_reverse_iterator rbegin () const
 returns a reverse iterator to the beginning
const_reverse_iterator crbegin () const
 returns a reverse iterator to the beginning
reverse_iterator rend ()
 returns a reverse iterator to the end
const_reverse_iterator rend () const
 returns a reverse iterator to the end
const_reverse_iterator crend () const
 returns a reverse iterator to the end
reference operator[] (size_type i)
 access specified namedarray element
const_reference operator[] (size_type i) const
 access specified namedarray element
reference at (size_type i)
 access specified namedarray element with bounds checking
const_reference at (size_type i) const
 access specified namedarray element with bounds checking
reference front ()
 access the first element
const_reference front () const
 access the first element
reference back ()
 access the last element
const_reference back () const
 access the last element
bool empty ()
 checks whether the container is empty
size_type max_size ()
 returns the maximum possible number of elements

Detailed Description

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

namedarray array value type

This class stores a named array. Named arrays should always be allocated using AllocateEmptyRRNamedArray()

T must be a namedarray type that has been generated as part of the thunk source.

RRNamedArray 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 Typedef Documentation

◆ const_iterator

template<typename T>
typedef const T* RobotRaconteur::RRNamedArray< T >::const_iterator

◆ const_reference

template<typename T>
typedef const T& RobotRaconteur::RRNamedArray< T >::const_reference

◆ const_reverse_iterator

template<typename T>
typedef boost::reverse_iterator<const_iterator> RobotRaconteur::RRNamedArray< T >::const_reverse_iterator

◆ difference_type

template<typename T>
typedef std::ptrdiff_t RobotRaconteur::RRNamedArray< T >::difference_type

◆ iterator

template<typename T>
typedef T* RobotRaconteur::RRNamedArray< T >::iterator

iterator

◆ reference

template<typename T>
typedef T& RobotRaconteur::RRNamedArray< T >::reference

reference

◆ reverse_iterator

template<typename T>
typedef boost::reverse_iterator<iterator> RobotRaconteur::RRNamedArray< T >::reverse_iterator

◆ size_type

template<typename T>
typedef std::size_t RobotRaconteur::RRNamedArray< T >::size_type

◆ value_type

template<typename T>
typedef T RobotRaconteur::RRNamedArray< T >::value_type

Constructor & Destructor Documentation

◆ RRNamedArray()

template<typename T>
RobotRaconteur::RRNamedArray< T >::RRNamedArray ( const boost::intrusive_ptr< RRArray< typename RRPrimUtil< T >::ElementArrayType > > & rr_array)
inline

Construct a RRNamedArray object.

Must be stored in a boost::intrusive_ptr

The RRNamedArray creates a memory view of the provided numeric array parameter rr_array. The reference count is increased, so the array will not be destroyed if the caller releases its smart pointers.

Parameters
rr_arrayThe array to use for storage

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