preCICE v3.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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::action {
13
18public:
20 xml::XMLTag &parent,
22
28 void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override;
29
35 void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override;
36
40 int getUsedMeshID() const;
41
46 {
47 return _actions;
48 }
49
59
60private:
75
76 mutable logging::Logger _log{"config::ActionConfiguration"};
77
78 const std::string TAG = "action";
79
86
93
94 const std::string ATTR_TYPE = "type";
95 const std::string ATTR_TIMING = "timing";
96 const std::string ATTR_NAME = "name";
97 const std::string ATTR_VALUE = "value";
98 const std::string ATTR_MESH = "mesh";
99
102
104
106
108
109 // /**
110 // * @brief Adds all required subtags to the main action tag.
111 // */
112 // void addSubtags (
113 // std::list<xml::XMLTag>& tags,
114 // const std::string& type );
115
119 void createAction();
120
122};
123
124} // namespace precice::action
Configures an Action subclass object.
void createAction()
Creates the Action object.
const std::list< PtrAction > & actions() const
Returns the configured action.
void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
Callback function required for use of automatic configuration.
ActionConfiguration(xml::XMLTag &parent, mesh::PtrMeshConfiguration meshConfig)
void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
Callback function required for use of automatic configuration.
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:17
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:28
T exchange(T... args)
contains actions to modify exchanged data.
Definition Action.hpp:6
Stores configuration information temporarily to create the Action.
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:21
Callback interface for configuration classes using XMLTag.
Definition XMLTag.hpp:46