AAO DRAMA/DRAMA2 C++ Interface
Public Member Functions | 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<>.

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.

There is an array specialization of this template which implements typical array iterator operations.

Template Parameters
TThe type we want to access. Must be a POD type. If not POD then compilation will fail with a static assertion.

#include "sds.hh"

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

Public Member Functions

 DataPointer (const drama::sds::Id &theId)
 DataPointer Constructor. More...
 
 DataPointer (drama::sds::Id *theId, bool outlives)
 DataPointer Constructor. More...
 
 ~DataPointer ()
 DataPointer destructor. More...
 
unsigned long NumBytes () const
 Return the size of the item in bytes. More...
 

Constructor & Destructor Documentation

template<typename T >
drama::sds::DataPointer< T >::DataPointer ( const drama::sds::Id theId)
inline

DataPointer Constructor.

Parameters
theIdThe SDS ID of the item we want a pointer to the data of. The object theId must outlive this DataPointer object. A separate constructor is provided if it cannot.

References DramaTHROW_S, drama::sds::Id::Pointer(), and drama::sds::Id::ShallowCopy().

template<typename T >
drama::sds::DataPointer< T >::DataPointer ( drama::sds::Id theId,
bool  outlives 
)
inline

DataPointer Constructor.

Parameters
theIdThe SDS ID of the item we want a pointer to the data of.
outlivesIf true, then this item will outlive the supplied sds::Id item and should take responsibility for any cleaning up operation.

References DramaTHROW_S, drama::sds::Id::Pointer(), and drama::sds::Id::ShallowCopy().

template<typename T >
drama::sds::DataPointer< T >::~DataPointer ( )
inline

DataPointer destructor.

Flush the SDS pointer data.

References drama::sds::Id::Flush().

Member Function Documentation

template<typename T >
unsigned long drama::sds::DataPointer< T >::NumBytes ( ) const
inline

Return the size of the item in bytes.


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

Click here for the DRAMA home page and here for the AAO home page.

For more information, contact tjf@aao.gov.au 

Generated on Mon Feb 22 2016 15:57:53 for AAO DRAMA/DRAMA2 C++ Interface by doxygen 1.8.10