geomc 1.0
A c++ linear algebra template library
Public Types | Public Member Functions | List of all members
GenericStorage< T, N, P > Struct Template Reference

Array storage with templated static or dynamic size, and template-selectable ownership policy. More...

#include <geomc/Storage.h>

Public Types

typedef Storage< T, N > type
 Storage class inherited from.
 

Public Member Functions

 GenericStorage (index_t n, T *srcdata)
 Construct a new array of size n, initialized with srcdata.
 
 GenericStorage (index_t n)
 Construct a new array of size n. Not available for wrapped specializations.
 
T * get ()
 Return a pointer to the first element in the storage array.
 
const T * get () const
 Return a const pointer to the first element in the storage array.
 
index_t size () const
 Return the number of elements in the array.
 
T & operator[] (index_t idx)
 Return a reference to the ith element in the array.
 
operator[] (index_t idx) const
 Return the ith element in the array.
 

Detailed Description

template<typename T, index_t N, StoragePolicy P>
struct geom::GenericStorage< T, N, P >

Array storage with templated static or dynamic size, and template-selectable ownership policy.

Template Parameters
TElement type.
NSize of the array, or 0 for dynamic size.

The ownership policy behavior is as follows:

#include <geomc/Storage.h>


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