mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 11:37:50 +00:00
Add default constructor to Topic
This commit is contained in:
@@ -51,6 +51,14 @@ public:
|
||||
*/
|
||||
static Topic make_non_owning(rd_kafka_topic_t* handle);
|
||||
|
||||
/**
|
||||
* \brief Constructs an empty topic
|
||||
*
|
||||
* Note that using any methods except Topic::get_handle on an empty topic is undefined
|
||||
* behavior
|
||||
*/
|
||||
Topic();
|
||||
|
||||
/**
|
||||
* \brief Constructs a topic using a handle
|
||||
*
|
||||
|
||||
@@ -42,6 +42,11 @@ Topic Topic::make_non_owning(rd_kafka_topic_t* handle) {
|
||||
return Topic(handle, NonOwningTag{});
|
||||
}
|
||||
|
||||
Topic::Topic()
|
||||
: handle_(nullptr, nullptr) {
|
||||
|
||||
}
|
||||
|
||||
Topic::Topic(rd_kafka_topic_t* handle)
|
||||
: handle_(handle, &rd_kafka_topic_destroy) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user