FairMQ  1.4.14
C++ Message Queuing Library and Framework
DDSTopology.h
1 /********************************************************************************
2  * Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef FAIR_MQ_SDK_DDSTOPOLOGY_H
10 #define FAIR_MQ_SDK_DDSTOPOLOGY_H
11 
12 #include <boost/filesystem.hpp>
13 #include <fairmq/sdk/DDSCollection.h>
14 #include <fairmq/sdk/DDSEnvironment.h>
15 #include <fairmq/sdk/DDSInfo.h>
16 #include <fairmq/sdk/DDSTask.h>
17 #include <memory>
18 #include <string>
19 #include <vector>
20 
21 namespace fair {
22 namespace mq {
23 namespace sdk {
24 
30 {
31  public:
32  using Path = boost::filesystem::path;
33 
34  DDSTopology() = delete;
35 
39  explicit DDSTopology(Path topoFile, DDSEnvironment env = DDSEnvironment());
40 
44  explicit DDSTopology(dds::topology_api::CTopology nativeTopology, DDSEnv env = {});
45 
47  auto GetEnv() const -> DDSEnvironment;
48 
51  auto GetTopoFile() const -> Path;
52 
54  auto GetNumRequiredAgents() const -> int;
55 
57  auto GetTasks(const std::string& = "") const -> std::vector<DDSTask>;
58 
60  auto GetCollections() const -> std::vector<DDSCollection>;
61 
63  auto GetName() const -> std::string;
64 
65  friend auto operator<<(std::ostream&, const DDSTopology&) -> std::ostream&;
66 
67  private:
68  struct Impl;
69  std::shared_ptr<Impl> fImpl;
70 };
71 
72 using DDSTopo = DDSTopology;
73 
74 } // namespace sdk
75 } // namespace mq
76 } // namespace fair
77 
78 #endif /* FAIR_MQ_SDK_DDSTOPOLOGY_H */
auto GetTopoFile() const -> Path
Get path to DDS topology xml, if it is known.
Definition: DDSTopology.cxx:53
auto GetTasks(const std::string &="") const -> std::vector< DDSTask >
Get list of tasks in this topology, optionally matching provided path.
Definition: DDSTopology.cxx:67
auto GetNumRequiredAgents() const -> int
Get number of required agents for this topology.
Definition: DDSTopology.cxx:62
auto GetEnv() const -> DDSEnvironment
Get associated DDS environment.
Definition: DDSTopology.cxx:51
auto GetName() const -> std::string
Get the name of the topology.
Definition: DDSTopology.cxx:107
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23
Definition: DDSTopology.cxx:25
auto GetCollections() const -> std::vector< DDSCollection >
Get list of tasks in this topology.
Definition: DDSTopology.cxx:90
Sets up the DDS environment (object helper)
Definition: DDSEnvironment.h:24
Represents a DDS topology.
Definition: DDSTopology.h:29

privacy