From 5d69778988ed44f62edbaaa4f95cf8dcdb0e8b45 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 24 Dec 2025 11:41:44 +0100 Subject: feat! final API design for basic_rope. Signed-off-by: Amlal El Mahrouss --- include/ocl/tproc/detail/rope_fwd.hpp | 19 +++++++------------ include/ocl/tproc/detail/rope_fwd.inl | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 include/ocl/tproc/detail/rope_fwd.inl (limited to 'include') diff --git a/include/ocl/tproc/detail/rope_fwd.hpp b/include/ocl/tproc/detail/rope_fwd.hpp index f46d0f4..c9c3567 100644 --- a/include/ocl/tproc/detail/rope_fwd.hpp +++ b/include/ocl/tproc/detail/rope_fwd.hpp @@ -6,8 +6,8 @@ #ifndef OCL_TPROC_ROPE_FWD_HPP #define OCL_TPROC_ROPE_FWD_HPP -#include #include +#include /// \file rope_fwd.hpp /// \brief Basic forward definitions of the `rope` type. @@ -31,23 +31,16 @@ public: using const_pointer = std::allocator_traits::pointer; CharT *begin(); - CharT *end(); - size_type size(); - bool empty() const; - ~basic_rope() = default; - basic_rope(const boost::string_view& in = {}); + ~basic_rope(); + basic_rope(const boost::basic_string_view &in = {}); private: - struct impl; - std::unique_ptr impl_; - -#if !defined(OCL_ROPE_IMPL) - struct impl {}; -#endif + struct tree_impl; + std::unique_ptr impl_; }; #if __cplusplus >= 201811L @@ -59,4 +52,6 @@ using wrope = basic_rope; } // namespace ocl +#include "rope_fwd.inl" + #endif diff --git a/include/ocl/tproc/detail/rope_fwd.inl b/include/ocl/tproc/detail/rope_fwd.inl new file mode 100644 index 0000000..5ca6bf4 --- /dev/null +++ b/include/ocl/tproc/detail/rope_fwd.inl @@ -0,0 +1,20 @@ +// Copyright 2025, Amlal El Mahrouss (amlal@nekernel.org) +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// Official repository: https://github.com/ocl-org/tproc + +#ifndef OCL_TPROC_ROPE_FWD_INL +#define OCL_TPROC_ROPE_FWD_INL + +namespace ocl { + +template struct basic_rope::tree_impl {}; + +template basic_rope::~basic_rope() = default; + +template +basic_rope::basic_rope(const boost::basic_string_view &in) {} + +} // namespace ocl + +#endif \ No newline at end of file -- cgit v1.2.3