NRP Core  1.4.1
DataPackInterface Class Reference

Interface to datapacks. More...

#include <datapack_interface.h>

Inheritance diagram for DataPackInterface:
PtrTemplates< DataPackInterface > DataPack< DATA_TYPE > RawData< DATA_TYPE >

Public Member Functions

 DataPackInterface ()=default
 
 DataPackInterface (const DataPackInterface &)=default
 
DataPackInterfaceoperator= (const DataPackInterface &)=default
 
 DataPackInterface (DataPackInterface &&obj)=default
 
DataPackInterfaceoperator= (DataPackInterface &&)=default
 
template<class DEV_ID_T >
 DataPackInterface (DEV_ID_T &&id)
 
 DataPackInterface (const std::string &name, const std::string &engineName, const std::string &type)
 
virtual ~DataPackInterface ()=default
 
const std::string & name () const
 
void setName (const std::string &name)
 
const std::string & type () const
 
void setType (const std::string &type)
 
const std::string & engineName () const
 
void setEngineName (const std::string &engineName)
 
const DataPackIdentifierid () const
 
void setID (const DataPackIdentifier &id)
 
virtual DataPackInterfaceclone () const
 Virtual clone method to support polymorphic copy. More...
 
bool isEmpty () const
 Indicates if the datapack contains any data aside from datapack ID. More...
 
bool isUpdated () const
 Indicates if the DataPack was created or received on the current simulation iteration. More...
 
void resetIsUpdated () const
 Sets the isUpdated flag to false TODO This method is obviously non-const, it will be changed in NRRPLT-8589. More...
 

Protected Member Functions

void setIsEmpty (bool value)
 
 DataPackInterface (const std::string &name, const std::string &engineName, const std::string &type, bool isUpdated)
 

Additional Inherited Members

- Public Types inherited from PtrTemplates< DataPackInterface >
using shared_ptr = std::shared_ptr< DataPackInterface >
 
using const_shared_ptr = std::shared_ptr< const DataPackInterface >
 
using unique_ptr = std::unique_ptr< DataPackInterface >
 
using const_unique_ptr = std::unique_ptr< const DataPackInterface >
 

Detailed Description

Interface to datapacks.

Constructor & Destructor Documentation

◆ DataPackInterface() [1/6]

DataPackInterface::DataPackInterface ( )
default

◆ DataPackInterface() [2/6]

DataPackInterface::DataPackInterface ( const DataPackInterface )
default

◆ DataPackInterface() [3/6]

DataPackInterface::DataPackInterface ( DataPackInterface &&  obj)
default

◆ DataPackInterface() [4/6]

template<class DEV_ID_T >
DataPackInterface::DataPackInterface ( DEV_ID_T &&  id)
inline

◆ DataPackInterface() [5/6]

DataPackInterface::DataPackInterface ( const std::string &  name,
const std::string &  engineName,
const std::string &  type 
)

◆ ~DataPackInterface()

virtual DataPackInterface::~DataPackInterface ( )
virtualdefault

◆ DataPackInterface() [6/6]

DataPackInterface::DataPackInterface ( const std::string &  name,
const std::string &  engineName,
const std::string &  type,
bool  isUpdated 
)
inlineprotected

Member Function Documentation

◆ clone()

virtual DataPackInterface* DataPackInterface::clone ( ) const
inlinevirtual

Virtual clone method to support polymorphic copy.

Reimplemented in DataPack< DATA_TYPE >.

◆ engineName()

const std::string & DataPackInterface::engineName ( ) const

◆ id()

const DataPackIdentifier & DataPackInterface::id ( ) const

◆ isEmpty()

bool DataPackInterface::isEmpty ( ) const

Indicates if the datapack contains any data aside from datapack ID.

The function will return true, if the datapack is of DataPackInterface type, which contains only datapack ID. For any concrete implementation of DataPack class, it should return false.

◆ isUpdated()

bool DataPackInterface::isUpdated ( ) const

Indicates if the DataPack was created or received on the current simulation iteration.

Return values
trueWhen the DataPack was created or received on the current simulation iteration
falseWhen the DataPack is 'stale' - it was created or received on one of the earlier simulation iterations

◆ name()

const std::string & DataPackInterface::name ( ) const

◆ operator=() [1/2]

DataPackInterface& DataPackInterface::operator= ( const DataPackInterface )
default

◆ operator=() [2/2]

DataPackInterface& DataPackInterface::operator= ( DataPackInterface &&  )
default

◆ resetIsUpdated()

void DataPackInterface::resetIsUpdated ( ) const

Sets the isUpdated flag to false TODO This method is obviously non-const, it will be changed in NRRPLT-8589.

◆ setEngineName()

void DataPackInterface::setEngineName ( const std::string &  engineName)

◆ setID()

void DataPackInterface::setID ( const DataPackIdentifier id)

◆ setIsEmpty()

void DataPackInterface::setIsEmpty ( bool  value)
protected

◆ setName()

void DataPackInterface::setName ( const std::string &  name)

◆ setType()

void DataPackInterface::setType ( const std::string &  type)

◆ type()

const std::string & DataPackInterface::type ( ) const

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