]>
git.proxmox.com Git - ceph.git/blob - ceph/src/tools/ceph-dencoder/str.h
4 #include "common/Formatter.h"
6 // wrapper for std::string that implements the dencoder interface
10 string_wrapper() = default;
11 string_wrapper(string s1
)
15 void encode(ceph::buffer::list
& bl
) const {
20 void decode(ceph::buffer::list::const_iterator
&bl
) {
25 void dump(Formatter
* f
) {
26 f
->dump_string("s", s
);
29 static void generate_test_instances(std::list
<string_wrapper
*>& ls
) {
30 ls
.push_back(new string_wrapper());
31 // initialize strings that fit in internal storage
32 std::string s1
= "abcdef";
33 ls
.push_back(new string_wrapper(s1
));
36 WRITE_CLASS_ENCODER(string_wrapper
)