preCICE v3.2.0
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::mesh {
12
15public:
27
29
30 const std::vector<ConfiguredData> &data() const;
31
32 ConfiguredData getRecentlyConfiguredData() const;
33
34 void xmlTagCallback(
35 const xml::ConfigurationContext &context,
36 xml::XMLTag &callingTag) override;
37
39 const xml::ConfigurationContext &context,
40 xml::XMLTag &callingTag) override;
41
49 void addData(const std::string &name,
50 const Data::typeName typeName,
51 int waveformDegree = time::Time::DEFAULT_WAVEFORM_DEGREE);
52
53private:
54 mutable logging::Logger _log{"mesh::DataConfiguration"};
55
56 const std::string TAG = "data";
57 const std::string ATTR_NAME = "name";
58 const std::string ATTR_DEGREE = "waveform-degree";
59 const std::string VALUE_VECTOR = "vector";
60 const std::string VALUE_SCALAR = "scalar";
61
63
65};
66
67} // namespace precice::mesh
This class provides a lightweight logger.
Definition Logger.hpp:17
void addData(const std::string &name, const Data::typeName typeName, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Adds data manually.
void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
Callback at begin of XML tag.
ConfiguredData getRecentlyConfiguredData() const
const std::vector< ConfiguredData > & data() const
std::vector< ConfiguredData > _data
void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
Callback at end of XML tag and at end of subtag.
static const int DEFAULT_WAVEFORM_DEGREE
To be used, when the interpolation degree is not defined.
Definition Time.hpp:8
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:28
provides Mesh, Data and primitives.
ConfiguredData(const std::string &name, const Data::typeName typeName, int waveformDegree)
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:21
Callback interface for configuration classes using XMLTag.
Definition XMLTag.hpp:46