AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
Public Types | Public Member Functions | Public Attributes | List of all members
drama::sds::DataPointer< T[]> Class Template Reference

Detailed Description

template<typename T>
class drama::sds::DataPointer< T[]>

A class that provides direct access to the data of an SDS item, via a sub-class of std::unique_ptr<>.

Partial specialization of DataPointer for arrays.

Rather then Get and Put operations, it may be appropriate to access SDS data directly. This class provides a way of doing that. The user creates an item of this type specifying the type of the data item within the SDS item as the template argument.

Objects of this template class should be usable as STL containers in many cases, similar to std::array types, but not all operators have yet been implemented.

Template Parameters
TThe array type we want to access. Must be a POD type.
If the elements of the array are not POD then compilation will fail with a static assertion.
Adelete-or function to be specified to std::unique_ptr<>.

#include "sds.hh"

Inheritance diagram for drama::sds::DataPointer< T[]>:

Public Types

typedef const T * const_iterator
 const iterator for this item
 
typedef T * iterator
 iterator for this item
 
typedefvalue_type
 Returns the type of T

 

Public Member Functions

 DataPointer (const drama::sds::Id &theId)
 DataPointer Constructor.
 
 DataPointer (drama::sds::Id *theId, bool outlives=false)
 DataPointer Constructor.
 
 ~DataPointer ()
 DataPointer destructor.
 
iterator begin ()
 Returns an iterator pointing to the first element in the array.
 
const_iterator begin () const
 Returns a const iterator pointing to the first element in the array.
 
const_iterator cbegin () const
 Returns a const iterator pointing to the first element in the array.
 
const_iterator cend () const
 Returns a const iterator pointing to the past-the-end element in the array.
 
bool empty () const
 Returns true if container is empty.
 
iterator end ()
 Returns an iterator pointing to the past-the-end element in the array.
 
const_iterator end () const
 Returns a const iterator pointing to the past-the-end element in the array.
 
unsigned long NumBytes () const
 Return the size of the item in bytes.
 
T * operator-> ()
 STL member.
 
unsigned long size () const
 Return the number of elements in the array.
 

Public Attributes

ptr
 STL member.
 

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