diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-12-02 13:39:00 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-12-02 13:39:00 +1100 |
| commit | 222c810b07ffc635fc7908d121e97e4d65ccc5c8 (patch) | |
| tree | 91c7b5c72a11770ebf3695bf0c234597b2bc419d /src/cbor/include/cbor_encoder.hpp | |
| parent | 71a4f5166f5491dc0982a18d62c63e28b3a52faa (diff) | |
| download | tangara-fw-222c810b07ffc635fc7908d121e97e4d65ccc5c8.tar.gz | |
fix build errors
Diffstat (limited to 'src/cbor/include/cbor_encoder.hpp')
| -rw-r--r-- | src/cbor/include/cbor_encoder.hpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/cbor/include/cbor_encoder.hpp b/src/cbor/include/cbor_encoder.hpp deleted file mode 100644 index 8f5214f6..00000000 --- a/src/cbor/include/cbor_encoder.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include <cstdint> - -#include "cbor.h" - -namespace cbor { - -class Encoder { - public: - enum ContainerType { CONTAINER_ARRAY, CONTAINER_MAP }; - Encoder(ContainerType type, - uint32_t container_len, - uint8_t* buffer, - size_t buffer_len); - - template <typename T> - auto WriteKeyValue(const std::string& key, const T& val) -> void { - WriteValue(key); - WriteValue(val); - } - - auto WriteValue(const std::string& val) -> void; - auto WriteValue(uint32_t val) -> void; - auto WriteValue(int32_t val) -> void; - - auto Finish() -> cpp::result<size_t, CborError>; - - Encoder(const Encoder&) = delete; - Encoder& operator=(const Encoder&) = delete; - - private: - CborEncoder root_encoder_; - CborEncoder container_encoder_; - - CborError error_ = CborNoError; -}; - -} // namespace cbor |
