GEGELATI
Public Member Functions | List of all members
Data::ConstantHandler Class Reference

Data::DataHandler used by Program::Program to handle their set of Constant values. More...

#include <constantHandler.h>

Inheritance diagram for Data::ConstantHandler:
Data::PrimitiveTypeArray< Constant > Data::ArrayWrapper< Constant > Data::DataHandler

Public Member Functions

 ConstantHandler (size_t nb_constants)
 Default constructor of the ConstantHandler class.
 
virtual ~ConstantHandler ()=default
 Default destructor.
 
 ConstantHandler (const ConstantHandler &other)=default
 Default copy constructor.
 
- Public Member Functions inherited from Data::PrimitiveTypeArray< Constant >
 PrimitiveTypeArray (size_t size=8)
 Constructor for the PrimitiveTypeArray class. More...
 
 PrimitiveTypeArray (const PrimitiveTypeArray< Constant > &other)
 Copy constructor (deep copy).
 
 PrimitiveTypeArray (const ArrayWrapper< Constant > &other)
 Copy content from an ArrayWrapper.
 
virtual ~PrimitiveTypeArray ()=default
 Default destructor.
 
virtual DataHandlerclone () const override
 Inherited from DataHandler. More...
 
void resetData () override
 Sets all elements of the Array to 0 (or its equivalent for the given template param.) More...
 
void setDataAt (const std::type_info &type, const size_t address, const Constant &value)
 Set the data at the given address to the given value. More...
 
PrimitiveTypeArray< Constant > & operator= (const PrimitiveTypeArray< Constant > &other)
 Assignement Operator for PrimitiveTypeArray<T> More...
 
- Public Member Functions inherited from Data::ArrayWrapper< Constant >
 ArrayWrapper (size_t size=8, std::vector< Constant > *ptr=nullptr)
 Constructor for the ArrayWrapper class. More...
 
 ArrayWrapper (const ArrayWrapper< Constant > &other)=default
 Default copy constructor.
 
virtual ~ArrayWrapper ()=default
 Default destructor.
 
virtual DataHandlerclone () const override
 Return a PrimitiveTypeArray<T> where all data of the ArrayWrapper has been copied. More...
 
virtual bool canHandle (const std::type_info &type) const override
 Inherited from DataHandler. More...
 
virtual size_t getAddressSpace (const std::type_info &type) const override
 Inherited from DataHandler. More...
 
virtual size_t getLargestAddressSpace (void) const override
 Inherited from DataHandler. More...
 
void invalidateCachedHash ()
 Invalidate the hash of the container. More...
 
void resetData () override
 Inherited from DataHandler. Does nothing. More...
 
void setPointer (std::vector< Constant > *ptr)
 Set the pointer of the ArrayWrapper. More...
 
virtual UntypedSharedPtr getDataAt (const std::type_info &type, const size_t address) const override
 Inherited from DataHandler. More...
 
virtual std::vector< size_t > getAddressesAccessed (const std::type_info &type, const size_t address) const override
 Inherited from DataHandler. More...
 
virtual const std::type_info & getNativeType () const override
 Inherited from DataHandler. More...
 
virtual std::vector< size_t > getDimensionsSize () const override
 Inherited from DataHandler. More...
 
- 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.
 
virtual DataHandlerclone () const =0
 Return a copy of the DataHandler (with all its content). More...
 
size_t getId () const
 Get the ID of the DataHandler. More...
 
size_t getHash () const
 Get the current value of the hash for this DataHandler. More...
 
virtual bool canHandle (const std::type_info &type) const =0
 Check a given DataHandler can handle data for the given data type. More...
 
virtual size_t getAddressSpace (const std::type_info &type) const =0
 Get the getAddressSpace size for the given data type. More...
 
virtual size_t getLargestAddressSpace () const =0
 Get the largest AddressSpace for all data types handled by the DataHandler. More...
 
virtual void resetData ()=0
 Generic method for DataHandler to reset their data. More...
 
virtual UntypedSharedPtr getDataAt (const std::type_info &type, const size_t address) const =0
 Get data of the given type, from the given address. More...
 
virtual std::vector< size_t > getAddressesAccessed (const std::type_info &type, const size_t address) const =0
 Get the set of addresses actually used when getting the given type of data, at the given address. More...
 
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. More...
 
virtual const std::type_info & getNativeType () const =0
 Function returning the native type of the DataHandler. More...
 
virtual std::vector< size_t > getDimensionsSize () const =0
 Give the size of each dimension (if any) of the DataHandler. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Data::ArrayWrapper< Constant >
void checkAddressAndType (const std::type_info &type, const size_t &address) const
 
virtual size_t updateHash () const override
 Implementation of the updateHash method. More...
 
virtual size_t updateHash () const =0
 Update the cachedHash value. More...
 
- Protected Attributes inherited from Data::PrimitiveTypeArray< Constant >
std::vector< Constantdata
 Array storing the data of the PrimitiveTypeArray.
 
- Protected Attributes inherited from Data::ArrayWrapper< Constant >
const size_t nbElements
 Number of elements contained pointer vector. More...
 
std::vector< Constant > * containerPtr
 Pointer to the array containing the data accessed through the ArrayWrapper.
 
- Protected Attributes inherited from Data::DataHandler
const size_t id
 Identifier of each DataHandler. More...
 
size_t cachedHash
 Cached value returned by the getHash() function. More...
 
bool invalidCachedHash
 Boolean value indicating whether the current cachedValue is valid, or not. More...
 
- Static Protected Attributes inherited from Data::DataHandler
static size_t count = 0
 Static count used to initialize the id of each DataHandler. More...
 

Detailed Description

Data::DataHandler used by Program::Program to handle their set of Constant values.


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