preCICE v3.1.2
Loading...
Searching...
No Matches
ActionConfiguration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4#include <string>
5#include <vector>
6#include "action/Action.hpp"
8#include "logging/Logger.hpp"
10#include "xml/XMLTag.hpp"
11
12namespace precice {
13namespace action {
14
19public:
21 xml::XMLTag & parent,
23
29 virtual void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag);
30
36 virtual void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag);
37
41 int getUsedMeshID() const;
42
47 {
48 return _actions;
49 }
50
60
61private:
76
77 mutable logging::Logger _log{"config::ActionConfiguration"};
78
79 const std::string TAG = "action";
80
87
94
95 const std::string ATTR_TYPE = "type";
96 const std::string ATTR_TIMING = "timing";
97 const std::string ATTR_NAME = "name";
98 const std::string ATTR_VALUE = "value";
99 const std::string ATTR_MESH = "mesh";
100
103
105
107
109
110 // /**
111 // * @brief Adds all required subtags to the main action tag.
112 // */
113 // void addSubtags (
114 // std::list<xml::XMLTag>& tags,
115 // const std::string& type );
116
120 void createAction();
121
123};
124
125} // namespace action
126} // namespace precice
Configures an Action subclass object.
void createAction()
Creates the Action object.
virtual void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
Callback function required for use of automatic configuration.
const std::list< PtrAction > & actions() const
Returns the configured action.
virtual void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag)
Callback function required for use of automatic configuration.
ActionConfiguration(xml::XMLTag &parent, mesh::PtrMeshConfiguration meshConfig)
int getUsedMeshID() const
Returns the id of the mesh used in the data action.
std::list< PtrAction > extractActions()
Extracts the configured action.
Timing
Defines the time and place of application of the action.
Definition Action.hpp:17
This class provides a lightweight logger.
Definition Logger.hpp:16
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:31
T exchange(T... args)
Main namespace of the precice library.
Stores configuration information temporarily to create the Action.
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:24
Callback interface for configuration classes using XMLTag.
Definition XMLTag.hpp:43