# FairMQ: fairmq/sdk/DDSTopology.h Source File

DDSTopology.h
/********************************************************************************
* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_SDK_DDSTOPOLOGY_H
#define FAIR_MQ_SDK_DDSTOPOLOGY_H
#include <boost/filesystem.hpp>
#include <fairmq/sdk/DDSCollection.h>
#include <fairmq/sdk/DDSEnvironment.h>
#include <fairmq/sdk/DDSInfo.h>
#include <fairmq/sdk/DDSTask.h>
#include <memory>
#include <string>
#include <vector>
namespace fair {
namespace mq {
namespace sdk {
class DDSTopology
{
public:
using Path = boost::filesystem::path;
DDSTopology() = delete;
explicit DDSTopology(Path topoFile, DDSEnvironment env = DDSEnvironment());
explicit DDSTopology(dds::topology_api::CTopology nativeTopology, DDSEnv env = {});
auto GetEnv() const -> DDSEnvironment;
auto GetTopoFile() const -> Path;
auto GetNumRequiredAgents() const -> int;
auto GetTasks(const std::string& = "") const -> std::vector<DDSTask>;
auto GetCollections() const -> std::vector<DDSCollection>;
auto GetName() const -> std::string;
friend auto operator<<(std::ostream&, const DDSTopology&) -> std::ostream&;
private:
struct Impl;
std::shared_ptr<Impl> fImpl;
};
using DDSTopo = DDSTopology;
} // namespace sdk
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_SDK_DDSTOPOLOGY_H */
fair::mq::sdk::DDSTopology::GetTopoFile
auto GetTopoFile() const -> Path
Get path to DDS topology xml, if it is known.
Definition: DDSTopology.cxx:53
fair::mq::sdk::DDSTopology::GetTasks
auto GetTasks(const std::string &="") const -> std::vector< DDSTask >
Get list of tasks in this topology, optionally matching provided path.
Definition: DDSTopology.cxx:67
fair::mq::sdk::DDSTopology::GetNumRequiredAgents
auto GetNumRequiredAgents() const -> int
Get number of required agents for this topology.
Definition: DDSTopology.cxx:62
fair::mq::sdk::DDSTopology::GetEnv
auto GetEnv() const -> DDSEnvironment
Get associated DDS environment.
Definition: DDSTopology.cxx:51
fair::mq::sdk::DDSTopology::GetName
auto GetName() const -> std::string
Get the name of the topology.
Definition: DDSTopology.cxx:107
fair
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23
fair::mq::sdk::DDSTopology::Impl
Definition: DDSTopology.cxx:25
fair::mq::sdk::DDSTopology::GetCollections
auto GetCollections() const -> std::vector< DDSCollection >
Get list of tasks in this topology.
Definition: DDSTopology.cxx:90
fair::mq::sdk::DDSEnvironment
Sets up the DDS environment (object helper)
Definition: DDSEnvironment.h:24
fair::mq::sdk::DDSTopology
Represents a DDS topology.
Definition: DDSTopology.h:29

privacy