Add a convenience constructor which uses the types typename to call setup, eliminating the need to call setup separately.

This commit is contained in:
Erik Hofman 2021-03-28 08:57:37 +02:00
parent 8e97b5e414
commit 17c79caea3

View File

@ -61,6 +61,11 @@ public:
SG_DDS_Topic(const char* topic, const dds_topic_descriptor_t *desc, size_t size);
template<typename T>
SG_DDS_Topic(T& type, const dds_topic_descriptor_t *desc) : SG_DDS_Topic() {
setup<T>(desc);
}
/** Destructor */
~SG_DDS_Topic();