SDK: Add ctors to adopt existing DDS API objects

This commit is contained in:
Dennis Klein
2019-07-25 10:40:31 +02:00
parent ac8cd19915
commit 5ab328b01f
8 changed files with 77 additions and 11 deletions

View File

@@ -34,6 +34,11 @@ struct DDSTopology::Impl
, fTopo(fTopoFile.string())
{}
explicit Impl(dds::topology_api::CTopology nativeTopology, DDSEnvironment env)
: fEnv(std::move(env))
, fTopo(std::move(nativeTopology))
{}
DDSEnvironment fEnv;
Path fTopoFile;
dds::topology_api::CTopology fTopo;
@@ -43,6 +48,10 @@ DDSTopology::DDSTopology(Path topoFile, DDSEnvironment env)
: fImpl(std::make_shared<Impl>(std::move(topoFile), std::move(env)))
{}
DDSTopology::DDSTopology(dds::topology_api::CTopology nativeTopology, DDSEnv env)
: fImpl(std::make_shared<Impl>(std::move(nativeTopology), std::move(env)))
{}
auto DDSTopology::GetEnv() const -> DDSEnvironment { return fImpl->fEnv; }
auto DDSTopology::GetTopoFile() const -> Path