Add a convenience constructor which uses the types typename to call setup, eliminating the need to call setup separately.
This commit is contained in:
@@ -61,6 +61,11 @@ public:
|
|||||||
|
|
||||||
SG_DDS_Topic(const char* topic, const dds_topic_descriptor_t *desc, size_t size);
|
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 */
|
/** Destructor */
|
||||||
~SG_DDS_Topic();
|
~SG_DDS_Topic();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user