preCICE v3.2.0
Loading...
Searching...
No Matches
precice::mesh::DataConfiguration Class Reference

Performs and provides configuration for Data objects from XML files. More...

#include <DataConfiguration.hpp>

Inheritance diagram for precice::mesh::DataConfiguration:
[legend]
Collaboration diagram for precice::mesh::DataConfiguration:
[legend]

Classes

struct  ConfiguredData

Public Member Functions

 DataConfiguration (xml::XMLTag &parent)
const std::vector< ConfiguredData > & data () const
ConfiguredData getRecentlyConfiguredData () const
void xmlTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
 Callback at begin of XML tag.
void xmlEndTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
 Callback at end of XML tag and at end of subtag.
void addData (const std::string &name, const Data::typeName typeName, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
 Adds data manually.
Public Member Functions inherited from precice::xml::XMLTag::Listener
Listeneroperator= (Listener &&)=delete
virtual ~Listener ()=default

Private Attributes

logging::Logger _log {"mesh::DataConfiguration"}
const std::string TAG = "data"
const std::string ATTR_NAME = "name"
const std::string ATTR_DEGREE = "waveform-degree"
const std::string VALUE_VECTOR = "vector"
const std::string VALUE_SCALAR = "scalar"
std::vector< ConfiguredData_data
int _indexLastConfigured = -1

Detailed Description

Performs and provides configuration for Data objects from XML files.

Definition at line 14 of file DataConfiguration.hpp.

Constructor & Destructor Documentation

◆ DataConfiguration()

precice::mesh::DataConfiguration::DataConfiguration ( xml::XMLTag & parent)

Definition at line 10 of file DataConfiguration.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addData()

void precice::mesh::DataConfiguration::addData ( const std::string & name,
const Data::typeName typeName,
int waveformDegree = time::Time::DEFAULT_WAVEFORM_DEGREE )

Adds data manually.

Parameters
[in]nameUnique name of the data.
[in]dataDimensionsDimensionality (1: scalar, 2,3: vector) of data.
[in]waveformDegreeDegree of waveform associated with this data.

Definition at line 79 of file DataConfiguration.cpp.

◆ data()

const std::vector< DataConfiguration::ConfiguredData > & precice::mesh::DataConfiguration::data ( ) const

Definition at line 35 of file DataConfiguration.cpp.

◆ getRecentlyConfiguredData()

DataConfiguration::ConfiguredData precice::mesh::DataConfiguration::getRecentlyConfiguredData ( ) const

Definition at line 40 of file DataConfiguration.cpp.

◆ xmlEndTagCallback()

void precice::mesh::DataConfiguration::xmlEndTagCallback ( const xml::ConfigurationContext & context,
xml::XMLTag & callingTag )
overridevirtual

Callback at end of XML tag and at end of subtag.

At this callback, the attributes and all subtags of callingTag are parsed. This callback is first done for the listener, and then for the parent tag listener (if existing).

Implements precice::xml::XMLTag::Listener.

Definition at line 73 of file DataConfiguration.cpp.

◆ xmlTagCallback()

void precice::mesh::DataConfiguration::xmlTagCallback ( const xml::ConfigurationContext & context,
xml::XMLTag & callingTag )
overridevirtual

Callback at begin of XML tag.

At this callback, the attributes of the callingTag are already parsed and available, while the subtags are not yet parsed.

Implements precice::xml::XMLTag::Listener.

Definition at line 48 of file DataConfiguration.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _data

std::vector<ConfiguredData> precice::mesh::DataConfiguration::_data
private

Definition at line 62 of file DataConfiguration.hpp.

◆ _indexLastConfigured

int precice::mesh::DataConfiguration::_indexLastConfigured = -1
private

Definition at line 64 of file DataConfiguration.hpp.

◆ _log

logging::Logger precice::mesh::DataConfiguration::_log {"mesh::DataConfiguration"}
mutableprivate

Definition at line 54 of file DataConfiguration.hpp.

◆ ATTR_DEGREE

const std::string precice::mesh::DataConfiguration::ATTR_DEGREE = "waveform-degree"
private

Definition at line 58 of file DataConfiguration.hpp.

◆ ATTR_NAME

const std::string precice::mesh::DataConfiguration::ATTR_NAME = "name"
private

Definition at line 57 of file DataConfiguration.hpp.

◆ TAG

const std::string precice::mesh::DataConfiguration::TAG = "data"
private

Definition at line 56 of file DataConfiguration.hpp.

◆ VALUE_SCALAR

const std::string precice::mesh::DataConfiguration::VALUE_SCALAR = "scalar"
private

Definition at line 60 of file DataConfiguration.hpp.

◆ VALUE_VECTOR

const std::string precice::mesh::DataConfiguration::VALUE_VECTOR = "vector"
private

Definition at line 59 of file DataConfiguration.hpp.


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