mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
SDK: Forward declare types where possible
This commit is contained in:
parent
eb9dcdd1f9
commit
a9b4788756
|
@ -48,12 +48,12 @@ target_link_libraries(${target}
|
|||
Boost::filesystem
|
||||
FairLogger::FairLogger
|
||||
StateMachine
|
||||
DDS::dds_topology_lib # TODO Eventually hide this in the future
|
||||
|
||||
PRIVATE
|
||||
Boost::boost
|
||||
DDS::dds_intercom_lib
|
||||
DDS::dds_tools_lib
|
||||
DDS::dds_topology_lib
|
||||
Tools
|
||||
)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
********************************************************************************/
|
||||
|
||||
#include "DDSSession.h"
|
||||
#include "DDSEnvironment.h"
|
||||
|
||||
#include <DDS/Tools.h>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
@ -157,7 +158,6 @@ auto DDSSession::ActivateTopology(Path topologyFile) -> void
|
|||
dds::tools_api::STopologyRequestData topologyInfo;
|
||||
topologyInfo.m_updateType = dds::tools_api::STopologyRequestData::EUpdateType::ACTIVATE;
|
||||
topologyInfo.m_topologyFile = topologyFile.string();
|
||||
LOG(warn) << topologyFile.string() << " :::: " << topologyFile;
|
||||
|
||||
tools::Semaphore blocker;
|
||||
auto topologyRequest = dds::tools_api::STopologyRequest::makeRequest(topologyInfo);
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <cstdint>
|
||||
#include <fairmq/sdk/DDSEnvironment.h>
|
||||
#include <fairmq/sdk/DDSInfo.h>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
|
@ -23,6 +22,8 @@ namespace fair {
|
|||
namespace mq {
|
||||
namespace sdk {
|
||||
|
||||
class DDSEnvironment;
|
||||
|
||||
/**
|
||||
* @enum DDSRMSPlugin DDSSession.h <fairmq/sdk/DDSSession.h>
|
||||
* @brief Supported DDS resource management system plugins
|
||||
|
|
|
@ -8,14 +8,24 @@
|
|||
|
||||
#include "Topology.h"
|
||||
|
||||
#include <DDS/Topology.h>
|
||||
#include <utility>
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
namespace sdk {
|
||||
|
||||
Topology::Topology(dds::topology_api::CTopology topo)
|
||||
struct Topology::Impl
|
||||
{
|
||||
Impl(dds::topology_api::CTopology topo)
|
||||
: fDDSTopology(std::move(topo))
|
||||
{}
|
||||
|
||||
dds::topology_api::CTopology fDDSTopology;
|
||||
};
|
||||
|
||||
Topology::Topology(dds::topology_api::CTopology topo)
|
||||
: fImpl(std::make_shared<Impl>(std::move(topo)))
|
||||
{}
|
||||
|
||||
} // namespace sdk
|
||||
|
|
|
@ -9,8 +9,20 @@
|
|||
#ifndef FAIR_MQ_SDK_TOPOLOGY_H
|
||||
#define FAIR_MQ_SDK_TOPOLOGY_H
|
||||
|
||||
#include <DDS/Topology.h>
|
||||
#include <fairmq/States.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace dds {
|
||||
namespace topology_api {
|
||||
|
||||
class CTopology;
|
||||
|
||||
} // namespace topology_api
|
||||
} // namespace dds
|
||||
|
||||
namespace fair {
|
||||
namespace mq {
|
||||
|
@ -24,12 +36,13 @@ class Topology
|
|||
{
|
||||
public:
|
||||
|
||||
/// Construct a FairMQ topology from an existing DDS session via the dds::topology_api
|
||||
/// @brief Construct a FairMQ topology from an existing DDS session via the dds::topology_api
|
||||
/// @param topo An initialized CTopology object
|
||||
explicit Topology(dds::topology_api::CTopology topo);
|
||||
|
||||
private:
|
||||
dds::topology_api::CTopology fDDSTopology;
|
||||
struct Impl;
|
||||
std::shared_ptr<Impl> fImpl;
|
||||
};
|
||||
|
||||
} // namespace sdk
|
||||
|
|
Loading…
Reference in New Issue
Block a user