40 lines
926 B
C++
Executable File
40 lines
926 B
C++
Executable File
|
|
|
|
#pragma once
|
|
|
|
#include <DDS/DDSConnector/ddsconnector_export.h>
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <dds/domain/DomainParticipant.hpp>
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
|
|
namespace DDSConnector
|
|
{
|
|
class DDSCONNECTOR_EXPORT PubSubBase
|
|
{
|
|
protected:
|
|
PubSubBase(const dds::domain::DomainParticipant &domainParticipant,
|
|
const std::string &partition,
|
|
const char *loggerName);
|
|
public:
|
|
virtual ~PubSubBase() = default;
|
|
|
|
void setDomainParticipant(const dds::domain::DomainParticipant &domainParticipant) { m_domainParticipant = domainParticipant; }
|
|
const dds::domain::DomainParticipant &getDomainParticipant() const { return m_domainParticipant; }
|
|
|
|
protected:
|
|
template<typename P>
|
|
void updatePartitionQoS(P &pubSub);
|
|
|
|
protected:
|
|
dds::domain::DomainParticipant m_domainParticipant;
|
|
std::vector<std::string> m_partitions;
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
}
|