GEGELATI
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Data::PointerWrapper< T > Class Template Reference

#include <pointerWrapper.h>

Inheritance diagram for Data::PointerWrapper< T >:
Data::DataHandler

Public Member Functions

 PointerWrapper (T *ptr=nullptr)
 Constructor for the PointerWrapper class.
 
virtual ~PointerWrapper ()=default
 Default destructor.
 
 PointerWrapper (const PointerWrapper< T > &other)=default
 Default copy constructor.
 
virtual DataHandlerclone () const override
 Return a PrimitiveTypeArray<T> where the data of the PointerWrapper has been copied.
 
virtual bool canHandle (const std::type_info &type) const override
 Inherited from DataHandler.
 
virtual size_t getAddressSpace (const std::type_info &type) const override
 Inherited from DataHandler.
 
virtual size_t getLargestAddressSpace (void) const override
 Inherited from DataHandler.
 
virtual size_t getHash () const override
 Inherited from DataHandler.
 
void resetData () override
 Inherited from DataHandler. Does nothing.
 
void setPointer (T *ptr)
 Set the pointer of the PointerWrapper.
 
virtual UntypedSharedPtr getDataAt (const std::type_info &type, const size_t address) const override
 Inherited from DataHandler.
 
virtual std::vector< size_tgetAddressesAccessed (const std::type_info &type, const size_t address) const override
 Inherited from DataHandler.
 
virtual const std::type_info & getNativeType () const override
 Inherited from DataHandler.
 
virtual std::vector< size_tgetDimensionsSize () const override
 Inherited from DataHandler.
 
- Public Member Functions inherited from Data::DataHandler
 DataHandler ()
 Default constructor of the DataHandler class.
 
virtual ~DataHandler ()=default
 Default destructor.
 
 DataHandler (const DataHandler &other)=default
 Default copy constructor.
 
size_t getId () const
 Get the ID of the DataHandler.
 
uint64_t scaleLocation (const uint64_t rawLocation, const std::type_info &type) const
 Scale a location from the Environment largestAddressSpace to the largestAddressSpace of the dataHandler, for the given data type.
 

Protected Member Functions

virtual size_t updateHash () const override
 Implementation of the updateHash method.
 

Protected Attributes

TcontainerPtr
 Pointer to the data accessed through the PointerWrapper.
 
- Protected Attributes inherited from Data::DataHandler
const size_t id
 Identifier of each DataHandler.
 
size_t cachedHash
 Cached value returned by the getHash() function.
 
bool invalidCachedHash
 Boolean value indicating whether the current cachedValue is valid, or not.
 

Friends

template<class U >
class PrimitiveTypeArray
 

Additional Inherited Members

- Static Protected Attributes inherited from Data::DataHandler
static size_t count = 0
 Static count used to initialize the id of each DataHandler.
 

Detailed Description

template<class T>
class Data::PointerWrapper< T >

DataHandler for manipulating pointers to primitive data type.

Contrary to the PrimitiveTypeArray does not contain its data, but possesses a pointer to them.

Constructor & Destructor Documentation

◆ PointerWrapper()

template<class T >
Data::PointerWrapper< T >::PointerWrapper ( T * ptr = nullptr)
inline

Constructor for the PointerWrapper class.

Parameters
[in]ptrthe pointer managed by the PointerWrapper.

Member Function Documentation

◆ canHandle()

template<class T >
bool Data::PointerWrapper< T >::canHandle ( const std::type_info & type) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ clone()

template<class T >
DataHandler * Data::PointerWrapper< T >::clone ( ) const
inlineoverridevirtual

Return a PrimitiveTypeArray<T> where the data of the PointerWrapper has been copied.

Returns
a PrimitiveTypeArray of size one.

Implements Data::DataHandler.

◆ getAddressesAccessed()

template<class T >
std::vector< size_t > Data::PointerWrapper< T >::getAddressesAccessed ( const std::type_info & type,
const size_t address ) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ getAddressSpace()

template<class T >
size_t Data::PointerWrapper< T >::getAddressSpace ( const std::type_info & type) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ getDataAt()

template<class T >
UntypedSharedPtr Data::PointerWrapper< T >::getDataAt ( const std::type_info & type,
const size_t address ) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ getDimensionsSize()

template<class T >
std::vector< size_t > Data::PointerWrapper< T >::getDimensionsSize ( ) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ getHash()

template<class T >
size_t Data::PointerWrapper< T >::getHash ( ) const
inlineoverridevirtual

Inherited from DataHandler.

Reimplemented from Data::DataHandler.

◆ getLargestAddressSpace()

template<class T >
size_t Data::PointerWrapper< T >::getLargestAddressSpace ( void ) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ getNativeType()

template<class T >
const std::type_info & Data::PointerWrapper< T >::getNativeType ( ) const
inlineoverridevirtual

Inherited from DataHandler.

Implements Data::DataHandler.

◆ resetData()

template<class T >
void Data::PointerWrapper< T >::resetData ( )
inlineoverridevirtual

Inherited from DataHandler. Does nothing.

Implements Data::DataHandler.

◆ setPointer()

template<class T >
void Data::PointerWrapper< T >::setPointer ( T * ptr)
inline

Set the pointer of the PointerWrapper.

This method automatically invalidates the cachedHash.

Parameters
[in]ptrthe new pointer managed by the PointerWrapper.

◆ updateHash()

template<class T >
size_t Data::PointerWrapper< T >::updateHash ( ) const
inlineoverrideprotectedvirtual

Implementation of the updateHash method.

Hash is very lightweight and does not need to be cashed. This method is empty.

Implements Data::DataHandler.


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