preCICE v3.1.2
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
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
 
virtual void xmlTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
 Callback at begin of XML tag.
 
virtual void xmlEndTagCallback (const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
 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 ()
 

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 15 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 80 of file DataConfiguration.cpp.

◆ data()

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

Definition at line 36 of file DataConfiguration.cpp.

◆ getRecentlyConfiguredData()

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

Definition at line 41 of file DataConfiguration.cpp.

◆ xmlEndTagCallback()

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

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 74 of file DataConfiguration.cpp.

◆ xmlTagCallback()

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

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 49 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 63 of file DataConfiguration.hpp.

◆ _indexLastConfigured

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

Definition at line 65 of file DataConfiguration.hpp.

◆ _log

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

Definition at line 55 of file DataConfiguration.hpp.

◆ ATTR_DEGREE

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

Definition at line 59 of file DataConfiguration.hpp.

◆ ATTR_NAME

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

Definition at line 58 of file DataConfiguration.hpp.

◆ TAG

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

Definition at line 57 of file DataConfiguration.hpp.

◆ VALUE_SCALAR

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

Definition at line 61 of file DataConfiguration.hpp.

◆ VALUE_VECTOR

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

Definition at line 60 of file DataConfiguration.hpp.


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