mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
SDK: Implement Topology ctor
This commit is contained in:
parent
53be96d93c
commit
44da054e78
|
@ -47,12 +47,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
|
||||
|
|
|
@ -14,7 +14,8 @@ namespace fair {
|
|||
namespace mq {
|
||||
namespace sdk {
|
||||
|
||||
Topology::Topology()
|
||||
Topology::Topology(dds::topology_api::CTopology topo)
|
||||
: fDDSTopology(std::move(topo))
|
||||
{}
|
||||
|
||||
} // namespace sdk
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#ifndef FAIR_MQ_SDK_TOPOLOGY_H
|
||||
#define FAIR_MQ_SDK_TOPOLOGY_H
|
||||
|
||||
#include <DDS/Topology.h>
|
||||
#include <memory>
|
||||
|
||||
namespace fair {
|
||||
|
@ -23,11 +24,12 @@ class Topology
|
|||
{
|
||||
public:
|
||||
|
||||
/// Construct a FairMQ topology from a existing DDS session via the dds::topology_api
|
||||
/// @param topo a shared_ptr to an initialized CTopology object
|
||||
explicit Topology();
|
||||
/// 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;
|
||||
};
|
||||
|
||||
} // namespace sdk
|
||||
|
|
|
@ -14,9 +14,9 @@ namespace {
|
|||
|
||||
using Topology = fair::mq::test::TopologyFixture;
|
||||
|
||||
TEST_F(Topology, Basic)
|
||||
TEST_F(Topology, Construction)
|
||||
{
|
||||
fair::mq::sdk::Topology topo;
|
||||
fair::mq::sdk::Topology topo(mDDSTopology);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in New Issue
Block a user