RTT::types::carray< T > Class Template Reference

#include <carray.hpp>

List of all members.

Public Types

typedef T value_type
typedef T value_type

Public Member Functions

value_typeaddress () const
value_typeaddress () const
 carray (boost::serialization::array< T > const &orig)
 carray ()
 carray (value_type *t, std::size_t s)
 carray (boost::serialization::array< T > const &orig)
 carray ()
 carray (value_type *t, std::size_t s)
std::size_t count () const
std::size_t count () const

Private Attributes

std::size_t m_element_count
value_typem_t

Detailed Description

template<class T>
class RTT::types::carray< T >

Wraps a C array such that we can return a C array from a DataSource. Inspired on boost::serialization::array.

Default copy-constructible and assignable. An assignment makes a 'shallow copy', all copies refer to the same C array.

You can also point to parts of arrays. An uninitialized carray object returns null for both count() and address().

Parameters:
T The data type of the array.

Definition at line 64 of file install/include/rtt/types/carray.hpp.


Member Typedef Documentation

template<class T>
typedef T RTT::types::carray< T >::value_type

Definition at line 67 of file rtt/types/carray.hpp.

template<class T>
typedef T RTT::types::carray< T >::value_type

Definition at line 67 of file install/include/rtt/types/carray.hpp.


Constructor & Destructor Documentation

template<class T>
RTT::types::carray< T >::carray ( value_type t,
std::size_t  s 
) [inline]

Create an C array wrapper.

Parameters:
t Pointer to first element of array.
s Length of array. If zero, the parameter t will be ignored.

Definition at line 75 of file install/include/rtt/types/carray.hpp.

template<class T>
RTT::types::carray< T >::carray (  )  [inline]

Definition at line 80 of file install/include/rtt/types/carray.hpp.

template<class T>
RTT::types::carray< T >::carray ( boost::serialization::array< T > const &  orig  )  [inline]

We are constructible from boost::serialization::array<T>

Parameters:
orig 

Definition at line 86 of file install/include/rtt/types/carray.hpp.

template<class T>
RTT::types::carray< T >::carray ( value_type t,
std::size_t  s 
) [inline]

Create an C array wrapper.

Parameters:
t Pointer to first element of array.
s Length of array. If zero, the parameter t will be ignored.

Definition at line 75 of file rtt/types/carray.hpp.

template<class T>
RTT::types::carray< T >::carray (  )  [inline]

Definition at line 80 of file rtt/types/carray.hpp.

template<class T>
RTT::types::carray< T >::carray ( boost::serialization::array< T > const &  orig  )  [inline]

We are constructible from boost::serialization::array<T>

Parameters:
orig 

Definition at line 86 of file rtt/types/carray.hpp.


Member Function Documentation

template<class T>
value_type* RTT::types::carray< T >::address (  )  const [inline]

The address of the first element of the array

Returns:
null if count() == 0, the address otherwise.

Definition at line 96 of file rtt/types/carray.hpp.

template<class T>
value_type* RTT::types::carray< T >::address (  )  const [inline]

The address of the first element of the array

Returns:
null if count() == 0, the address otherwise.

Definition at line 96 of file install/include/rtt/types/carray.hpp.

template<class T>
std::size_t RTT::types::carray< T >::count (  )  const [inline]
Returns:
The number of elements in the array.

Definition at line 104 of file rtt/types/carray.hpp.

template<class T>
std::size_t RTT::types::carray< T >::count (  )  const [inline]
Returns:
The number of elements in the array.

Definition at line 104 of file install/include/rtt/types/carray.hpp.


Member Data Documentation

template<class T>
std::size_t RTT::types::carray< T >::m_element_count [private]

Definition at line 111 of file install/include/rtt/types/carray.hpp.

template<class T>
value_type * RTT::types::carray< T >::m_t [private]

Definition at line 110 of file install/include/rtt/types/carray.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:17 2013