#ifndef ABSL_STRINGS_INTERNAL_CORD_REP_BTREE_H_
#define ABSL_STRINGS_INTERNAL_CORD_REP_BTREE_H_
#include <cassert>
#include <cstdint>
#include <iosfwd>
#include "absl/base/config.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/optimization.h"
#include "absl/strings/internal/cord_data_edge.h"
#include "absl/strings/internal/cord_internal.h"
#include "absl/strings/internal/cord_rep_flat.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace cord_internal {
void SetCordBtreeExhaustiveValidation(bool do_exaustive_validation);
bool IsCordBtreeExhaustiveValidationEnabled();
class CordRepBtreeNavigator;
class CordRepBtree : public CordRep { … };
inline CordRepBtree* CordRep::btree() { … }
inline const CordRepBtree* CordRep::btree() const { … }
inline void CordRepBtree::InitInstance(int height, size_t begin, size_t end) { … }
inline CordRep* CordRepBtree::Edge(size_t index) const { … }
inline CordRep* CordRepBtree::Edge(EdgeType edge_type) const { … }
inline absl::Span<CordRep* const> CordRepBtree::Edges() const { … }
inline absl::Span<CordRep* const> CordRepBtree::Edges(size_t begin,
size_t end) const { … }
inline absl::string_view CordRepBtree::Data(size_t index) const { … }
inline CordRepBtree* CordRepBtree::New(int height) { … }
inline CordRepBtree* CordRepBtree::New(CordRep* rep) { … }
inline CordRepBtree* CordRepBtree::New(CordRepBtree* front,
CordRepBtree* back) { … }
inline void CordRepBtree::Unref(absl::Span<CordRep* const> edges) { … }
inline CordRepBtree* CordRepBtree::CopyRaw(size_t new_length) const { … }
inline CordRepBtree* CordRepBtree::Copy() const { … }
inline CordRepBtree* CordRepBtree::CopyToEndFrom(size_t begin,
size_t new_length) const { … }
inline CordRepBtree* CordRepBtree::CopyBeginTo(size_t end,
size_t new_length) const { … }
inline void CordRepBtree::AlignBegin() { … }
inline void CordRepBtree::AlignEnd() { … }
template <>
inline void CordRepBtree::Add<CordRepBtree::kBack>(CordRep* rep) { … }
template <>
inline void CordRepBtree::Add<CordRepBtree::kBack>(
absl::Span<CordRep* const> edges) { … }
template <>
inline void CordRepBtree::Add<CordRepBtree::kFront>(CordRep* rep) { … }
template <>
inline void CordRepBtree::Add<CordRepBtree::kFront>(
absl::Span<CordRep* const> edges) { … }
template <CordRepBtree::EdgeType edge_type>
inline void CordRepBtree::SetEdge(CordRep* edge) { … }
inline CordRepBtree::OpResult CordRepBtree::ToOpResult(bool owned) { … }
inline CordRepBtree::Position CordRepBtree::IndexOf(size_t offset) const { … }
inline CordRepBtree::Position CordRepBtree::IndexBefore(size_t offset) const { … }
inline CordRepBtree::Position CordRepBtree::IndexBefore(Position front,
size_t offset) const { … }
inline CordRepBtree::Position CordRepBtree::IndexOfLength(size_t n) const { … }
inline CordRepBtree::Position CordRepBtree::IndexBeyond(
const size_t offset) const { … }
inline CordRepBtree* CordRepBtree::Create(CordRep* rep) { … }
inline Span<char> CordRepBtree::GetAppendBuffer(size_t size) { … }
extern template CordRepBtree* CordRepBtree::AddCordRep<CordRepBtree::kBack>(
CordRepBtree* tree, CordRep* rep);
extern template CordRepBtree* CordRepBtree::AddCordRep<CordRepBtree::kFront>(
CordRepBtree* tree, CordRep* rep);
inline CordRepBtree* CordRepBtree::Append(CordRepBtree* tree, CordRep* rep) { … }
inline CordRepBtree* CordRepBtree::Prepend(CordRepBtree* tree, CordRep* rep) { … }
#ifdef NDEBUG
inline CordRepBtree* CordRepBtree::AssertValid(CordRepBtree* tree,
bool ) {
return tree;
}
inline const CordRepBtree* CordRepBtree::AssertValid(const CordRepBtree* tree,
bool ) {
return tree;
}
#endif
}
ABSL_NAMESPACE_END
}
#endif