preCICE v3.2.0
Loading...
Searching...
No Matches
M2NConfiguration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "logging/Logger.hpp"
5#include "xml/XMLTag.hpp"
6
7#include <tuple>
8
9#include <memory>
10#include <string>
11#include <vector>
12
13namespace precice::m2n {
14
17public:
27
28public:
29 explicit M2NConfiguration(xml::XMLTag &parent);
30
31 ~M2NConfiguration() override = default;
32
40 const std::string &acceptor,
41 const std::string &connector);
42
45 {
46 return _m2ns;
47 }
48
49 bool isM2NConfigured(const std::string &acceptor, const std::string &connector);
50
51 void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override;
52
53 void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override {}
54
55private:
56 logging::Logger _log{"m2n::M2NConfiguration"};
57
58 const std::string TAG = "m2n";
59 const std::string ATTR_EXCHANGE_DIRECTORY = "exchange-directory";
60 const std::string ATTR_ENFORCE_GATHER_SCATTER = "enforce-gather-scatter";
61 const std::string ATTR_USE_TWO_LEVEL_INIT = "use-two-level-initialization";
62
64
65 void checkDuplicates(
66 const std::string &acceptor,
67 const std::string &connector);
68};
69
70} // namespace precice::m2n
This class provides a lightweight logger.
Definition Logger.hpp:17
const std::string ATTR_EXCHANGE_DIRECTORY
bool isM2NConfigured(const std::string &acceptor, const std::string &connector)
std::vector< ConfiguredM2N > _m2ns
const std::string ATTR_USE_TWO_LEVEL_INIT
m2n::PtrM2N getM2N(const std::string &acceptor, const std::string &connector)
Returns the communication object for the given user names.
std::vector< ConfiguredM2N > & m2ns()
Returns all configured communication objects.
M2NConfiguration(xml::XMLTag &parent)
void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
Callback at begin of XML tag.
~M2NConfiguration() override=default
std::shared_ptr< M2NConfiguration > SharedPointer
void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &callingTag) override
Callback at end of XML tag and at end of subtag.
void checkDuplicates(const std::string &acceptor, const std::string &connector)
const std::string ATTR_ENFORCE_GATHER_SCATTER
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:28
contains the logic of the parallel communication between participants.
Definition BoundM2N.cpp:12
std::shared_ptr< M2N > PtrM2N
std::string acceptor
The name of the acceptor.
std::string connector
The name of the connector.
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:21
Callback interface for configuration classes using XMLTag.
Definition XMLTag.hpp:46