This speeds up compile times and will allow reducing header
dependencies.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
return false; /* continue processing */
}
+void JSONFormattable::encode(ceph::buffer::list& bl) const {
+ ENCODE_START(2, 1, bl);
+ encode((uint8_t)type, bl);
+ encode(value.str, bl);
+ encode(arr, bl);
+ encode(obj, bl);
+ encode(value.quoted, bl);
+ ENCODE_FINISH(bl);
+}
+
+void JSONFormattable::decode(ceph::buffer::list::const_iterator& bl) {
+ DECODE_START(2, bl);
+ uint8_t t;
+ decode(t, bl);
+ type = (Type)t;
+ decode(value.str, bl);
+ decode(arr, bl);
+ decode(obj, bl);
+ if (struct_v >= 2) {
+ decode(value.quoted, bl);
+ } else {
+ value.quoted = true;
+ }
+ DECODE_FINISH(bl);
+}
+
}
}
- void encode(ceph::buffer::list& bl) const {
- ENCODE_START(2, 1, bl);
- encode((uint8_t)type, bl);
- encode(value.str, bl);
- encode(arr, bl);
- encode(obj, bl);
- encode(value.quoted, bl);
- ENCODE_FINISH(bl);
- }
-
- void decode(ceph::buffer::list::const_iterator& bl) {
- DECODE_START(2, bl);
- uint8_t t;
- decode(t, bl);
- type = (Type)t;
- decode(value.str, bl);
- decode(arr, bl);
- decode(obj, bl);
- if (struct_v >= 2) {
- decode(value.quoted, bl);
- } else {
- value.quoted = true;
- }
- DECODE_FINISH(bl);
- }
+ void encode(ceph::buffer::list& bl) const;
+ void decode(ceph::buffer::list::const_iterator& bl);
void dump(ceph::Formatter *f) const {
switch (type) {