preCICE v3.1.1
Loading...
Searching...
No Matches
DataConfiguration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5#include "logging/Logger.hpp"
6#include "mesh/Data.hpp"
7#include "time/Time.hpp"
9#include "xml/XMLTag.hpp"
10
11namespace precice {
12namespace mesh {
13
16public:
28
30
31 const std::vector<ConfiguredData> &data() const;
32
33 ConfiguredData getRecentlyConfiguredData() const;
34
35 virtual void xmlTagCallback(
36 const xml::ConfigurationContext &context,
37 xml::XMLTag & callingTag);
38
39 virtual void xmlEndTagCallback(
40 const xml::ConfigurationContext &context,
41 xml::XMLTag & callingTag);
42
50 void addData(const std::string & name,
51 const Data::typeName typeName,
52 int waveformDegree = time::Time::DEFAULT_WAVEFORM_DEGREE);
53
54private:
55 mutable logging::Logger _log{"mesh::DataConfiguration"};
56
57 const std::string TAG = "data";
58 const std::string ATTR_NAME = "name";
59 const std::string ATTR_DEGREE = "waveform-degree";
60 const std::string VALUE_VECTOR = "vector";
61 const std::string VALUE_SCALAR = "scalar";
62
64
66};
67
68} // namespace mesh
69} // namespace precice
std::string name
This class provides a lightweight logger.
Definition Logger.hpp:16
Performs and provides configuration for Data objects from XML files.
void addData(const std::string &name, const Data::typeName typeName, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Adds data manually.
ConfiguredData getRecentlyConfiguredData() const
virtual void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
Callback at end of XML tag and at end of subtag.
const std::vector< ConfiguredData > & data() const
std::vector< ConfiguredData > _data
virtual void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
Callback at begin of XML tag.
static const int DEFAULT_WAVEFORM_DEGREE
To be used, when the interpolation degree is not defined.
Definition Time.hpp:9
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:31
Main namespace of the precice library.
ConfiguredData(const std::string &name, const Data::typeName typeName, int waveformDegree)
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:24
Callback interface for configuration classes using XMLTag.
Definition XMLTag.hpp:43