.. index:: pair: class; DataPackInterface .. _doxid-class_data_pack_interface: class DataPackInterface ======================= .. toctree:: :hidden: Overview ~~~~~~~~ Interface to datapacks. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class DataPackInterface: public :ref:`PtrTemplates` { public: // construction :target:`DataPackInterface`(); :target:`DataPackInterface`(const DataPackInterface&); :target:`DataPackInterface`(DataPackInterface&& obj); template :target:`DataPackInterface`(DEV_ID_T&& id); :target:`DataPackInterface`( const std::string& name, const std::string& engineName, const std::string& type ); // methods DataPackInterface& :target:`operator =` (const DataPackInterface&); DataPackInterface& :target:`operator =` (DataPackInterface&&); const std::string& :target:`name`() const; void :target:`setName`(const std::string& name); const std::string& :target:`type`() const; void :target:`setType`(const std::string& type); const std::string& :target:`engineName`() const; void :target:`setEngineName`(const std::string& engineName); const :ref:`DataPackIdentifier`& :target:`id`() const; void :target:`setID`(const :ref:`DataPackIdentifier`& id); virtual DataPackInterface* :ref:`clone`() const; bool :ref:`isEmpty`() const; bool :ref:`isUpdated`() const; void :ref:`resetIsUpdated`() const; }; // direct descendants template class :ref:`DataPack`; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef std::shared_ptr :ref:`shared_ptr`; typedef std::shared_ptr :ref:`const_shared_ptr`; typedef std::unique_ptr :ref:`unique_ptr`; typedef std::unique_ptr :ref:`const_unique_ptr`; .. _details-class_data_pack_interface: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Interface to datapacks. Methods ------- .. index:: pair: function; clone .. _doxid-class_data_pack_interface_1a02a9996b2349806d5c7514ad5130d0d0: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual DataPackInterface* clone() const Virtual clone method to support polymorphic copy. .. index:: pair: function; isEmpty .. _doxid-class_data_pack_interface_1ae29518b89988c7e7639765ff8d91977e: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isEmpty() const Indicates if the datapack contains any data aside from datapack ID. The function will return true, if the datapack is of :ref:`DataPackInterface ` type, which contains only datapack ID. For any concrete implementation of :ref:`DataPack ` class, it should return false. .. index:: pair: function; isUpdated .. _doxid-class_data_pack_interface_1a34968375fb20ea8ccde8a339d0c24c21: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isUpdated() const Indicates if the :ref:`DataPack ` was created or received on the current simulation iteration. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - true - When the :ref:`DataPack ` was created or received on the current simulation iteration * - false - When the :ref:`DataPack ` is 'stale' - it was created or received on one of the earlier simulation iterations .. index:: pair: function; resetIsUpdated .. _doxid-class_data_pack_interface_1a7f0d12553d4cc6fc1a85374b0f4e91b1: .. ref-code-block:: cpp :class: doxyrest-title-code-block void resetIsUpdated() const Sets the isUpdated flag to false TODO This method is obviously non-const, it will be changed in NRRPLT-8589.