AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
A container for simple arrays for use with SDS templates.
Some of the drama::sds::Id methods require a container to access simple arrays. In some cases, you may want to access memory created elsewhere and hence can't use a STL container directly.
This template class can be used to wrap access to a C style array so that the drama::sds::Id methods can use it.
T | The type of the item we are referring to. Must be a POD types, if not, compile will fail with a static assertion. |
#include "sds.hh"
Public Types | |
typedef value_type & | reference |
The type for a reference to the value. | |
typedef std::size_t | size_type |
The type used for sizes. | |
typedef T | value_type |
The value type. | |
Public Member Functions | |
ArrayContainer (T *address, size_type size) | |
Create a container to access the array. | |
~ArrayContainer () | |
Destroy the container, not the underlying array item. | |
bool | empty () const |
Returns true if the container is empty. | |
reference | operator[] (size_type n) |
Returns an item at a particular address. | |
size_type | size () const |
Returns the size of the container in items. | |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Dec 12 2024 23:07:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8