NGen
Loading...
Searching...
No Matches
utils::NexusOutputsMgr Class Referenceabstract

Abstract class for managing and writing to nexus data files. More...

#include <NexusOutputsMgr.hpp>

+ Inheritance diagram for utils::NexusOutputsMgr:
+ Collaboration diagram for utils::NexusOutputsMgr:

Public Member Functions

virtual void close ()=0
 Close down this manager, closing any and all open files.
 
virtual void commit_writes ()=0
 Write any received data entries that were not written immediately upon receipt to the managed data files.
 
virtual bool is_closed ()=0
 A test of whether this instance is closed.
 
virtual void receive_data_entry (const std::string &formulation_id, const std::string &nexus_id, const time_marker &data_time_marker, const double flow_data_at_t)=0
 Receive a data entry for this nexus, specifying details including the formulation id.
 
virtual void receive_data_entry (const std::string &nexus_id, const time_marker &data_time_marker, const double flow_data_at_t)
 Receive a data entry for this nexus, specifying details but using the default formulation id (however that is determined).
 

Protected Member Functions

virtual ~NexusOutputsMgr ()=default
 
const std::string get_default_formulation_id ()
 Get some a formulation id value.
 

Detailed Description

Abstract class for managing and writing to nexus data files.

Constructor & Destructor Documentation

◆ ~NexusOutputsMgr()

virtual utils::NexusOutputsMgr::~NexusOutputsMgr ( )
protectedvirtualdefault

Member Function Documentation

◆ close()

virtual void utils::NexusOutputsMgr::close ( )
pure virtual

Close down this manager, closing any and all open files.

Once a manager is closed, it should not be able to receive new data. Subsequent calls to receive_data_entry functions should result in an exception.

Subtypes may choose how to handle any data received since the last call to commit_writes.

If an instance is already closed, implementations should simply return.

Implemented in utils::PerNexusCsvOutputMgr.

◆ commit_writes()

virtual void utils::NexusOutputsMgr::commit_writes ( )
pure virtual

Write any received data entries that were not written immediately upon receipt to the managed data files.

Implemented in utils::PerNexusCsvOutputMgr.

Referenced by ngen::SurfaceLayer::update_models().

◆ get_default_formulation_id()

const std::string utils::NexusOutputsMgr::get_default_formulation_id ( )
inlineprotected

Get some a formulation id value.

Returns
The value for the default formulation id.

Referenced by receive_data_entry().

◆ is_closed()

virtual bool utils::NexusOutputsMgr::is_closed ( )
pure virtual

A test of whether this instance is closed.

Returns
Whether this instance is closed.
See also
close

Implemented in utils::PerNexusCsvOutputMgr.

◆ receive_data_entry() [1/2]

virtual void utils::NexusOutputsMgr::receive_data_entry ( const std::string & formulation_id,
const std::string & nexus_id,
const time_marker & data_time_marker,
const double flow_data_at_t )
pure virtual

Receive a data entry for this nexus, specifying details including the formulation id.

Parameters
formulation_idThe id of the formulation involved in producing this data.
nexus_idThe id for the nexus to which this data applies.
data_time_markerA marker for the current simulation time for the data.
flow_data_at_tThe nexus flow contribution at this time index (the main data to write).

Implemented in utils::PerNexusCsvOutputMgr.

Referenced by receive_data_entry(), and ngen::SurfaceLayer::update_models().

◆ receive_data_entry() [2/2]

virtual void utils::NexusOutputsMgr::receive_data_entry ( const std::string & nexus_id,
const time_marker & data_time_marker,
const double flow_data_at_t )
inlinevirtual

Receive a data entry for this nexus, specifying details but using the default formulation id (however that is determined).

Parameters
nexus_idThe id for the nexus to which this data applies.
data_time_markerA marker for the current simulation time for the data.
flow_data_at_tThe nexus flow contribution at this time index (the main data to write).
See also
get_default_formulation_id

References get_default_formulation_id(), and receive_data_entry().


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