pulsar-client-cpp
Loading...
Searching...
No Matches
KeyValue.h
1
19#ifndef KEY_VALUE_HPP_
20#define KEY_VALUE_HPP_
21
22#include <memory>
23#include <string>
24
25#include "Schema.h"
26#include "defines.h"
27
28namespace pulsar {
29
30class KeyValueImpl;
31
35class PULSAR_PUBLIC KeyValue {
36 public:
44 KeyValue(std::string &&key, std::string &&value);
45
51 std::string getKey() const;
52
59 const void *getValue() const;
60
66 size_t getValueLength() const;
67
73 std::string getValueAsString() const;
74
75 private:
76 typedef std::shared_ptr<KeyValueImpl> KeyValueImplPtr;
77 KeyValue(KeyValueImplPtr keyValueImplPtr);
78 KeyValueImplPtr impl_;
79 friend class Message;
80 friend class MessageBuilder;
81};
82} // namespace pulsar
83
84#endif /* KEY_VALUE_HPP_ */
Definition KeyValue.h:35
size_t getValueLength() const
std::string getKey() const
const void * getValue() const
std::string getValueAsString() const
KeyValue(std::string &&key, std::string &&value)
Definition MessageBuilder.h:33
Definition Message.h:44
Definition Authentication.h:31