#ifndef CPPKAFKA_TOPIC_H #define CPPKAFKA_TOPIC_H #include #include #include #include namespace cppkafka { class Topic { public: static Topic make_non_owning(rd_kafka_topic_t* handle); Topic(rd_kafka_topic_t* handle); std::string get_name() const; rd_kafka_topic_t* get_handle() const; private: using HandlePtr = std::unique_ptr; struct NonOwningTag { }; Topic(rd_kafka_topic_t* handle, NonOwningTag); HandlePtr handle_; }; } // cppkafka #endif // CPPKAFKA_TOPIC_H