Public Types | Public Member Functions | Protected Attributes

Fiber::ReferencingMemArray< N, T > Class Template Reference

A memory array that may share its data storage with something else. More...

#include <ReferencingMemArray.hpp>

List of all members.

Public Types

Public Member Functions

Protected Attributes


Detailed Description

template<int N, class T>
class Fiber::ReferencingMemArray< N, T >

A memory array that may share its data storage with something else.

Author:
Werner Benger

Constructor & Destructor Documentation

template<int N, class T >
Fiber::ReferencingMemArray< N, T >::ReferencingMemArray ( const RefPtr< MemCore::ChunkBase > &  Storage,
const MultiArray< N, T > &  M,
const WeakPtr< CreativeArrayBase > &  theCreator 
) [inline]

Create referencing mem array from an existing multi array and some memory reference.

It is assumed that the data reference is associated with the provided multi array, otherwise calling this constructor makes no sense. However, the base offset of the memory location does not need to overlap. This is useful when the multiarray refers to a subset of a larger memory instance. Required for the getSlice() function.


Member Function Documentation

template<int N, class T >
override void* Fiber::ReferencingMemArray< N, T >::getPtr (  )  [inline, virtual]

Special Array Storage.

Get pointer to underlying data, if this is a contiguous array

Implements Fiber::MemBase.