NRP Core  1.4.1
RawData< DATA_TYPE > Class Template Reference

Wrapper class for DataPacks with no name and no engine association. More...

#include <datapack.h>

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

Public Member Functions

 RawData ()
 
- Public Member Functions inherited from DataPack< DATA_TYPE >
 DataPack (const std::string &name, const std::string &engineName, DATA_TYPE *data_)
 
 DataPack (const std::string &name, const std::string &engineName)
 
 DataPack (const DataPack &)=delete
 
DataPackoperator= (const DataPack &)=delete
 
 DataPack (DataPack &&obj)=default
 
DataPackoperator= (DataPack &&)=default
 
const DATA_TYPE & getData () const
 Returns reference to data stored in the object. More...
 
PyObject * toPythonString ()
 Returns a python string representation of this object content. More...
 
DataPackInterfaceclone () const override
 Virtual clone method to support polymorphic copy. More...
 
- Public Member Functions inherited from DataPackInterface
 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)
 
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...
 

Static Public Member Functions

static void create_python (const std::string &name)
 
- Static Public Member Functions inherited from DataPack< DATA_TYPE >
static std::string getType ()
 Returns type of the datapack class. More...
 
static DataPackIdentifier createID (const std::string &name, const std::string &engineName)
 Creates a DataPackIdentifier object with type matching the DATA_TYPE used by the DataPack class. More...
 
static void create_python (const std::string &name)
 

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 >
 
- Protected Member Functions inherited from DataPackInterface
void setIsEmpty (bool value)
 
 DataPackInterface (const std::string &name, const std::string &engineName, const std::string &type, bool isUpdated)
 

Detailed Description

template<class DATA_TYPE>
class RawData< DATA_TYPE >

Wrapper class for DataPacks with no name and no engine association.

Technically it's possible to alias the DataPack class with two different Python names, for example JsonDataPack and JsonRawData, but in that case boost::python will complain about duplicated converter functions. Having this thin wrapper/alias class prevents that.

Constructor & Destructor Documentation

◆ RawData()

template<class DATA_TYPE >
RawData< DATA_TYPE >::RawData ( )
inline

Member Function Documentation

◆ create_python()

template<class DATA_TYPE >
static void RawData< DATA_TYPE >::create_python ( const std::string &  name)
inlinestatic

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