36 lines
695 B
C++
Executable File
36 lines
695 B
C++
Executable File
|
|
|
|
#pragma once
|
|
|
|
#include <dds/core/xtypes/StructType.hpp>
|
|
|
|
namespace DDSGeneric
|
|
{
|
|
struct TopicDescription
|
|
{
|
|
TopicDescription()
|
|
: type(dds::core::xtypes::StructType("Unknown")) {}
|
|
TopicDescription(const std::string &name_, const std::string &typeName_, const dds::core::xtypes::StructType &type_)
|
|
: name(name_)
|
|
, typeName(typeName_)
|
|
, type(type_)
|
|
{}
|
|
|
|
std::string name;
|
|
std::string typeName;
|
|
dds::core::xtypes::StructType type;
|
|
|
|
bool operator==(const TopicDescription &ti) const
|
|
{
|
|
return (name.compare(ti.name) == 0) &&
|
|
(typeName.compare(ti.typeName) == 0) &&
|
|
(type == ti.type);
|
|
}
|
|
bool isEmpty() const
|
|
{
|
|
return name.empty();
|
|
}
|
|
};
|
|
|
|
}
|