SPH
Classes | Enumerations | Functions
ArrayRef.h File Reference
#include "objects/containers/Array.h"

Go to the source code of this file.

Classes

class  ArrayRef< T >
 

Enumerations

enum class  RefEnum { WEAK , STRONG }
 

Functions

template<typename T >
ArrayRef< T > makeArrayRef (Array< T > &data, const RefEnum type)
 
template<typename T >
ArrayRef< const T > makeArrayRef (const Array< T > &data, const RefEnum type)
 
template<typename T >
ArrayRef< T > makeArrayRef (Array< T > &&data)
 

Enumeration Type Documentation

◆ RefEnum

enum RefEnum
strong
Enumerator
WEAK 

Weak reference; the object holds only a pointer and the data must be owned by another Array or some container. Once the owning container is reallocated or deleted, the reference is invalidated.

STRONG 

Strong reference, the data are copied into the object and the object is now the owner. No external buffer is referenced. The data are always valid.

Definition at line 7 of file ArrayRef.h.

Function Documentation

◆ makeArrayRef() [1/3]

template<typename T >
ArrayRef<T> makeArrayRef ( Array< T > &&  data)

Definition at line 148 of file ArrayRef.h.

◆ makeArrayRef() [2/3]

template<typename T >
ArrayRef<T> makeArrayRef ( Array< T > &  data,
const RefEnum  type 
)

Definition at line 138 of file ArrayRef.h.

◆ makeArrayRef() [3/3]

template<typename T >
ArrayRef<const T> makeArrayRef ( const Array< T > &  data,
const RefEnum  type 
)

Definition at line 143 of file ArrayRef.h.