llvm/lldb/include/lldb/Utility/DataEncoder.h

//===-- DataEncoder.h -------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_UTILITY_DATAENCODER_H
#define LLDB_UTILITY_DATAENCODER_H

#include "lldb/lldb-defines.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-forward.h"
#include "lldb/lldb-types.h"

#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"

#include <cstddef>
#include <cstdint>

namespace lldb_private {

/// \class DataEncoder
///
/// An binary data encoding class.
///
/// DataEncoder is a class that can encode binary data (swapping if needed) to
/// a data buffer. The DataEncoder can be constructed with data that will be
/// copied into the internally owned buffer. This allows data to be modified
/// in the internal buffer. The DataEncoder object can also be constructed with
/// just a byte order and address size and data can be appended to the
/// internally owned buffer.
///
/// Clients can get a shared pointer to the data buffer when done modifying or
/// creating the data to keep the data around after the lifetime of a
/// DataEncoder object. \see GetDataBuffer
///
/// Client can get a reference to the object owned data as an array by calling
/// the GetData method. \see GetData
class DataEncoder {};

} // namespace lldb_private

#endif // LLDB_UTILITY_DATAENCODER_H