LLFIO v2.00
Loading...
Searching...
No Matches
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type > Class Template Reference

#include "path_view.hpp"

Public Types

using value_type = typename _base::value_type
using allocator_type = decltype(detail::is_allocator(std::declval<AllocatorOrDeleter>()))
 Type of the allocator, or void if that was not configured.
using deleter_type = decltype(detail::is_deleter<value_type>(std::declval<AllocatorOrDeleter>()))
 Type of the deleter, or void if that was not configured.
using pointer = const T *
 Type of the pointer type.
using const_pointer = const T *
 Type of the const pointer type.
using reference = const T &
 Type of the reference type.
using const_reference = const T &
 Type of the const reference type.
using iterator = typename _view_type::iterator
 Type of the iterator type.
using const_iterator = typename _view_type::iterator
 Type of the const iterator type.
using reverse_iterator = typename _view_type::reverse_iterator
 Type of the reverse iterator type.
using const_reverse_iterator = typename _view_type::reverse_iterator
 Type of the const reverse iterator type.
using size_type = typename _view_type::size_type
 Type of the size type.
using difference_type = typename _view_type::difference_type
 Type of the difference type.

Public Member Functions

template<class U, class V, typename std::enable_if<(_is_deleter_based< U >), bool >::type = true, typename = decltype( std::declval<U>()((size_t) 1) ), typename = decltype( std::declval<V>()((value_type *) nullptr) )>
 rendered_path (path_view_component view, const std::locale &loc, U &&allocate, V &&deleter=AllocatorOrDeleter(), _custom_callable_deleter_tag={})
template<class U, class V, typename std::enable_if<(_is_deleter_based< U >), bool >::type = true, typename = decltype( std::declval<U>()((size_t) 1) ), typename = decltype( std::declval<V>()((value_type *) nullptr) )>
 rendered_path (path_view_component view, U &&allocate, V &&deleter=AllocatorOrDeleter(), _custom_callable_deleter_tag={})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 rendered_path (path_view_component view, const std::locale &loc, pmr::memory_resource &mr, _memory_resource_tag={})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 rendered_path (path_view_component view, pmr::memory_resource &mr, _memory_resource_tag={})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<class U, typename std::enable_if<(_is_allocator_based< U >), bool >::type = true, typename = decltype( std::declval<U>().allocate((size_t) 1) )>
 rendered_path (path_view_component view, const std::locale &loc, U &&allocate, _stl_allocator_tag={})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<class U, typename std::enable_if<(_is_allocator_based< U >), bool >::type = true, typename = decltype( std::declval<U>().allocate((size_t) 1) )>
 rendered_path (path_view_component view, U &&allocate, _stl_allocator_tag={})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 rendered_path (path_view_component view, const std::locale &loc)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 rendered_path (path_view_component view)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<class AllocatorOrDeleter2, size_t _internal_buffer_size2, typename std::enable_if<(!std::is_same< rendered_path, rendered_path< ZeroTermination, T, AllocatorOrDeleter2, _internal_buffer_size2 > >::value), bool >::type = true, typename std::enable_if<(std::is_constructible< AllocatorOrDeleter, AllocatorOrDeleter2 >::value), bool >::type = true>
 rendered_path (rendered_path< ZeroTermination, T, AllocatorOrDeleter2, _internal_buffer_size2 > &&o) noexcept
 Construct from a compatible rendered_path.
 rendered_path (const rendered_path &)=delete
 rendered_path (rendered_path &&o) noexcept
rendered_path & operator= (const rendered_path &)=delete
rendered_path & operator= (rendered_path &&o) noexcept
void reset ()
 Delete any held resources now.
value_type * release ()
 Release from ownership any resources.
size_t capacity () const noexcept
 The storage capacity, which may be larger than size() if the internal buffer is in use.
bool references_source () const noexcept
 True if this rendered path refers to the source path view.
const AllocatorOrDeleter & deleter () const noexcept
 Access the custom deleter instance passed to the constructor.
AllocatorOrDeleter & deleter () noexcept
 Access the custom deleter instance passed to the constructor.
pmr::memory_resource * memory_resource () noexcept
 The memory resource passed to the constructor.
const AllocatorOrDeleter & allocator () const noexcept
 Access the custom allocator instance passed to the constructor.
AllocatorOrDeleter & allocator () noexcept
 Access the custom allocator instance passed to the constructor.
bool operator== (const rendered_path &o) const noexcept
 True if the bits backing the rendered path are identical.
bool operator!= (const rendered_path &o) const noexcept
 True if the bits backing the rendered path are non-identical.
constexpr basic_string_view< T > as_string_view () const
 As string view.
constexpr iterator begin () noexcept
 Begin iteration.
constexpr const_iterator begin () const noexcept
 Begin iteration.
constexpr const_iterator cbegin () const noexcept
 Begin iteration.
constexpr iterator end () noexcept
 End iteration.
constexpr const_iterator end () const noexcept
 End iteration.
constexpr const_iterator cend () const noexcept
 End iteration.
constexpr reverse_iterator rbegin () noexcept
 Begin reverse iteration.
constexpr const_reverse_iterator rbegin () const noexcept
 Begin reverse iteration.
constexpr const_reverse_iterator crbegin () const noexcept
 Begin reverse iteration.
constexpr reverse_iterator rend () noexcept
 End reverse iteration.
constexpr const_reverse_iterator rend () const noexcept
 End reverse iteration.
constexpr const_reverse_iterator crend () const noexcept
 End reverse iteration.
constexpr reference operator[] (size_type idx) noexcept
 Access.
constexpr const_reference operator[] (size_type idx) const noexcept
 Access.
constexpr reference at (size_type idx)
 Access.
constexpr const_reference at (size_type idx) const
 Access.
constexpr reference front () noexcept
 Access.
constexpr const_reference front () const noexcept
 Access.
constexpr reference back () noexcept
 Access.
constexpr const_reference back () const noexcept
 Access.
constexpr pointer data () noexcept
 Access.
constexpr const_pointer data () const noexcept
 Access.
constexpr size_type size () const noexcept
 Size.
constexpr size_type length () const noexcept
 Size.
constexpr size_type max_size () const noexcept
 Max size.
constexpr bool empty () const noexcept
 Empty.
constexpr _view_type as_span () const noexcept
 As span.

Static Public Member Functions

static constexpr enum termination termination () noexcept
 The zero termination of this rendered path.
static constexpr size_t internal_buffer_size () noexcept
 The size of the internal buffer.

Protected Types

using _view_type = span<const T>

Protected Member Functions

constexpr basic_string_view< T > _as_string_view () const

Protected Attributes

_view_type _ref

Friends

template<class DestT, class _Deleter, size_t _internal_buffer_size_, class Char1T, class Char2T>
int path_view_component::_compare (basic_string_view< Char1T > a, enum termination a_zt, basic_string_view< Char2T > b, enum termination b_zt, const std::locale *loc) noexcept
size_t hash_value (const rendered_path &v) noexcept
 Returns the hash value for the bits backing the rendered path.

Detailed Description

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
class llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >

Instantiate from a path_view_component to get a path suitable for feeding to other code.

Template Parameters
TThe destination encoding required.
DeleterA custom deleter OR STL allocator for any temporary buffer.
_internal_buffer_sizeOverride the size of the internal temporary buffer, thus reducing stack space consumption (most compilers optimise away the internal temporary buffer if it can be proved it will never be used). The default is 1024 values of T.

This makes the input to the path view component into a destination format suitable for consumption by other code. If the source has the same format as the destination, and the zero termination requirements are the same, the source is used directly without memory copying nor reencoding.

If the format is compatible, but the destination requires zero termination, and the source is not zero terminated, a straight memory copy is performed into the temporary buffer.

rendered_path contains a temporary buffer sized according to the template parameter. Output below that amount involves no dynamic memory allocation. Output above that amount calls operator new[]. You can use an externally supplied larger temporary buffer to avoid dynamic memory allocation in all situations.

Constructor & Destructor Documentation

◆ rendered_path() [1/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( )
inlineconstexpr
1133{}

◆ rendered_path() [2/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
template<class U, class V, typename std::enable_if<(_is_deleter_based< U >), bool >::type = true, typename = decltype( std::declval<U>()((size_t) 1) ), typename = decltype( std::declval<V>()((value_type *) nullptr) )>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
const std::locale & loc,
U && allocate,
V && deleter = AllocatorOrDeleter(),
_custom_callable_deleter_tag = {} )
inline

Construct, performing any reencoding or memory copying required.

Parameters
viewThe path component view to use as source.
locThe locale to use to perform reencoding.
allocateEither a callable with prototype value_type *(size_t length) which is defaulted to return static_cast<value_type *>(operator new[](length * sizeof(value_type)));, or a pmr::memory_resource *. You can return nullptr if you wish, the consumer of rendered_path will see a buffer set to nullptr.
deleterEither an Allocator or a Deleter.

If loc is defaulted, and an error occurs during any conversion from UTF-8 or UTF-16, an exception of system_error(errc::illegal_byte_sequence) is thrown. This is because if you tell path_view that its source is UTF-8 or UTF-16, then that must be valid UTF. If you wish to supply UTF-invalid paths (which are legal on most filesystems), use native narrow or wide encoded source, or binary.

1370 {})
1371 : _deleter1(_invoke_deleter)
1372 , _deleter1arg(&_deleter2)
1373 , _deleter2(static_cast<V &&>(deleter))
1374 {
1375 _init(view, loc, static_cast<U &&>(allocate));
1376 }
const AllocatorOrDeleter & deleter() const noexcept
Access the custom deleter instance passed to the constructor.
Definition path_view.hpp:1526

◆ rendered_path() [3/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
template<class U, class V, typename std::enable_if<(_is_deleter_based< U >), bool >::type = true, typename = decltype( std::declval<U>()((size_t) 1) ), typename = decltype( std::declval<V>()((value_type *) nullptr) )>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
U && allocate,
V && deleter = AllocatorOrDeleter(),
_custom_callable_deleter_tag = {} )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1382 {})
1383 : _deleter1(_invoke_deleter)
1384 , _deleter1arg(&_deleter2)
1385 , _deleter2(static_cast<V &&>(deleter))
1386 {
1387 _init(view, (const std::locale *) nullptr, static_cast<U &&>(allocate));
1388 }

◆ rendered_path() [4/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
const std::locale & loc,
pmr::memory_resource & mr,
_memory_resource_tag = {} )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1390 {})
1391 : _deleter1(_memory_resouce_deallocate)
1392 , _deleter1arg(&mr)
1393 {
1394 _init(view, &loc, _memory_resource_allocate{&mr});
1395 }

◆ rendered_path() [5/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
pmr::memory_resource & mr,
_memory_resource_tag = {} )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1397 {})
1398 : _deleter1(_memory_resouce_deallocate)
1399 , _deleter1arg(&mr)
1400 {
1401 _init(view, (const std::locale *) nullptr, _memory_resource_allocate{&mr});
1402 }

◆ rendered_path() [6/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
template<class U, typename std::enable_if<(_is_allocator_based< U >), bool >::type = true, typename = decltype( std::declval<U>().allocate((size_t) 1) )>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
const std::locale & loc,
U && allocate,
_stl_allocator_tag = {} )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1406 {})
1407 : _deleter1(_stl_allocator_deallocate<allocator_type>)
1408 , _deleter1arg(&_deleter2)
1409 , _deleter2(static_cast<U &&>(allocate))
1410 {
1411 _init(view, &loc, _stl_allocator_allocate<std::decay_t<U>>(static_cast<std::decay_t<U> *>(&_deleter2)));
1412 }
decltype(detail::is_allocator(std::declval< AllocatorOrDeleter >())) allocator_type
Type of the allocator, or void if that was not configured.
Definition path_view.hpp:1052

◆ rendered_path() [7/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
template<class U, typename std::enable_if<(_is_allocator_based< U >), bool >::type = true, typename = decltype( std::declval<U>().allocate((size_t) 1) )>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
U && allocate,
_stl_allocator_tag = {} )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1416 {})
1417 : _deleter1(_stl_allocator_deallocate<allocator_type>)
1418 , _deleter1arg(&_deleter2)
1419 , _deleter2(static_cast<U &&>(allocate))
1420 {
1421 _init(view, (const std::locale *) nullptr,
1422 _stl_allocator_allocate<std::decay_t<U>>(static_cast<std::decay_t<U> *>(&_deleter2)));
1423 }

◆ rendered_path() [8/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view,
const std::locale & loc )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1426 : _deleter1(_default_deleter)
1427 , _deleter1arg(&_deleter2)
1428 {
1429 _init(view, &loc, _default_allocate<AllocatorOrDeleter>(&_deleter2));
1430 }

◆ rendered_path() [9/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( path_view_component view)
inlineexplicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

1433 : _deleter1(_default_deleter)
1434 , _deleter1arg(&_deleter2)
1435 {
1436 _init(view, nullptr, _default_allocate<AllocatorOrDeleter>(&_deleter2));
1437 }

◆ rendered_path() [10/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
template<class AllocatorOrDeleter2, size_t _internal_buffer_size2, typename std::enable_if<(!std::is_same< rendered_path, rendered_path< ZeroTermination, T, AllocatorOrDeleter2, _internal_buffer_size2 > >::value), bool >::type = true, typename std::enable_if<(std::is_constructible< AllocatorOrDeleter, AllocatorOrDeleter2 >::value), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( rendered_path< ZeroTermination, T, AllocatorOrDeleter2, _internal_buffer_size2 > && o)
inlineexplicitnoexcept

Construct from a compatible rendered_path.

1445 : _base(o)
1446 , _bytes_to_delete(o._bytes_to_delete)
1447 , _deleter1(o._deleter1)
1448 , _deleter1arg(o._deleter1arg)
1449 , _deleter2(std::move(o._deleter2))
1450 {
1451 }

◆ ~rendered_path()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::~rendered_path ( )
inline
1452{ reset(); }
void reset()
Delete any held resources now.
Definition path_view.hpp:1491

◆ rendered_path() [11/11]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type > && o)
inlinenoexcept
1455 : _base(o)
1456 , _bytes_to_delete(o._bytes_to_delete)
1457 , _deleter1(o._deleter1)
1458 , _deleter1arg(o._deleter1arg)
1459 , _deleter2(std::move(o._deleter2))
1460 {
1461 if(this != &o)
1462 {
1463 if(o.data() == o._buffer)
1464 {
1465 memcpy(_buffer, o._buffer, (o.size() + 1) * sizeof(value_type));
1466 _base::_ref = typename _base::_view_type(_buffer, _base::_ref.size());
1467 }
1468 if(o._deleter1arg == &o._deleter2)
1469 {
1470 _deleter1arg = &_deleter2;
1471 }
1472 o._ref = {};
1473 o._bytes_to_delete = 0;
1474 o._deleter1 = nullptr;
1475 o._deleter1arg = nullptr;
1476 }
1477 }

Member Function Documentation

◆ _as_string_view()

template<class T>
basic_string_view< T > llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::_as_string_view ( ) const
inlineconstexprprotectedinherited
908{ return {_ref.data(), _ref.size()}; }

◆ allocator() [1/2]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
const AllocatorOrDeleter & llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::allocator ( ) const
inlinenoexcept

Access the custom allocator instance passed to the constructor.

1534{ return _deleter2; }

◆ allocator() [2/2]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
AllocatorOrDeleter & llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::allocator ( )
inlinenoexcept

Access the custom allocator instance passed to the constructor.

1536{ return _deleter2; }

◆ as_span()

template<class T>
_view_type llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::as_span ( ) const
inlineconstexprnoexceptinherited

As span.

993{ return _ref; }

◆ as_string_view()

template<enum path_view_component::termination ZeroTermination, class T, bool = false>
basic_string_view< T > llfio_v2_xxx::path_view_component::_rendered_path_base< ZeroTermination, T, bool >::as_string_view ( ) const
inlineconstexprinherited

As string view.

999{ return {this->_ref.data(), this->_ref.size()}; }

◆ at() [1/2]

template<class T>
reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::at ( size_type idx)
inlineconstexprinherited

Access.

969{ return _ref.at(idx); }

◆ at() [2/2]

template<class T>
const_reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::at ( size_type idx) const
inlineconstexprinherited

Access.

971{ return _ref.at(idx); }

◆ back() [1/2]

template<class T>
const_reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::back ( ) const
inlineconstexprnoexceptinherited

Access.

979{ return _ref.back(); }

◆ back() [2/2]

template<class T>
reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::back ( )
inlineconstexprnoexceptinherited

Access.

977{ return _ref.back(); }

◆ begin() [1/2]

template<class T>
const_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::begin ( ) const
inlineconstexprnoexceptinherited

Begin iteration.

942{ return _ref.begin(); }

◆ begin() [2/2]

template<class T>
iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::begin ( )
inlineconstexprnoexceptinherited

Begin iteration.

940{ return _ref.begin(); }

◆ capacity()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
size_t llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::capacity ( ) const
inlinenoexcept

The storage capacity, which may be larger than size() if the internal buffer is in use.

1521{ return (this->data() == _buffer) ? internal_buffer_size() : this->size(); }
static constexpr size_t internal_buffer_size() noexcept
The size of the internal buffer.
Definition path_view.hpp:1516

◆ cbegin()

template<class T>
const_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::cbegin ( ) const
inlineconstexprnoexceptinherited

Begin iteration.

944{ return _ref.cbegin(); }

◆ cend()

template<class T>
const_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::cend ( ) const
inlineconstexprnoexceptinherited

End iteration.

950{ return _ref.cend(); }

◆ crbegin()

template<class T>
const_reverse_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::crbegin ( ) const
inlineconstexprnoexceptinherited

Begin reverse iteration.

956{ return _ref.crbegin(); }

◆ crend()

template<class T>
const_reverse_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::crend ( ) const
inlineconstexprnoexceptinherited

End reverse iteration.

962{ return _ref.crend(); }

◆ data() [1/2]

template<class T>
const_pointer llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::data ( ) const
inlineconstexprnoexceptinherited

Access.

983{ return _ref.data(); }

◆ data() [2/2]

template<class T>
pointer llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::data ( )
inlineconstexprnoexceptinherited

Access.

981{ return _ref.data(); }

◆ deleter() [1/2]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
const AllocatorOrDeleter & llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::deleter ( ) const
inlinenoexcept

Access the custom deleter instance passed to the constructor.

1526{ return _deleter2; }

◆ deleter() [2/2]

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
AllocatorOrDeleter & llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::deleter ( )
inlinenoexcept

Access the custom deleter instance passed to the constructor.

1528{ return _deleter2; }

◆ empty()

template<class T>
bool llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::empty ( ) const
inlinenodiscardconstexprnoexceptinherited

Empty.

991{ return _ref.empty(); }

◆ end() [1/2]

template<class T>
const_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::end ( ) const
inlineconstexprnoexceptinherited

End iteration.

948{ return _ref.end(); }

◆ end() [2/2]

template<class T>
iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::end ( )
inlineconstexprnoexceptinherited

End iteration.

946{ return _ref.end(); }

◆ front() [1/2]

template<class T>
const_reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::front ( ) const
inlineconstexprnoexceptinherited

Access.

975{ return _ref.front(); }

◆ front() [2/2]

template<class T>
reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::front ( )
inlineconstexprnoexceptinherited

Access.

973{ return _ref.front(); }

◆ internal_buffer_size()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
constexpr size_t llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::internal_buffer_size ( )
inlinestaticconstexprnoexcept

The size of the internal buffer.

1517 {
1519 }

◆ length()

template<class T>
size_type llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::length ( ) const
inlineconstexprnoexceptinherited

Size.

987{ return _ref.length(); }

◆ max_size()

template<class T>
size_type llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::max_size ( ) const
inlineconstexprnoexceptinherited

Max size.

989{ return _ref.max_size(); }

◆ memory_resource()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
pmr::memory_resource * llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::memory_resource ( )
inlinenoexcept

The memory resource passed to the constructor.

1531{ return (pmr::memory_resource *) _deleter1arg; }

◆ operator!=()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
bool llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::operator!= ( const rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type > & o) const
inlinenoexcept

True if the bits backing the rendered path are non-identical.

1561 {
1562 if(this->data() == nullptr && o->data() == nullptr)
1563 {
1564 return false;
1565 }
1566 if(this->data() == nullptr && o->data() != nullptr)
1567 {
1568 return true;
1569 }
1570 if(this->data() != nullptr && o->data() == nullptr)
1571 {
1572 return true;
1573 }
1574 if(this->size() != o.size())
1575 {
1576 return true;
1577 }
1578 return 0 != memcmp(this->data(), o.data(), this->size());
1579 }

◆ operator=()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
rendered_path & llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::operator= ( rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type > && o)
inlinenoexcept
1480 {
1481 if(this == &o)
1482 {
1483 return *this;
1484 }
1485 this->~rendered_path();
1486 new(this) rendered_path(std::move(o));
1487 return *this;
1488 }

◆ operator==()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
bool llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::operator== ( const rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type > & o) const
inlinenoexcept

True if the bits backing the rendered path are identical.

1540 {
1541 if(this->data() == nullptr && o->data() == nullptr)
1542 {
1543 return true;
1544 }
1545 if(this->data() == nullptr && o->data() != nullptr)
1546 {
1547 return false;
1548 }
1549 if(this->data() != nullptr && o->data() == nullptr)
1550 {
1551 return false;
1552 }
1553 if(this->size() != o.size())
1554 {
1555 return false;
1556 }
1557 return 0 == memcmp(this->data(), o.data(), this->size());
1558 }

◆ operator[]() [1/2]

template<class T>
const_reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::operator[] ( size_type idx) const
inlineconstexprnoexceptinherited

Access.

967{ return _ref[idx]; }

◆ operator[]() [2/2]

template<class T>
reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::operator[] ( size_type idx)
inlineconstexprnoexceptinherited

Access.

965{ return _ref[idx]; }

◆ rbegin() [1/2]

template<class T>
const_reverse_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::rbegin ( ) const
inlineconstexprnoexceptinherited

Begin reverse iteration.

954{ return _ref.rbegin(); }

◆ rbegin() [2/2]

template<class T>
reverse_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::rbegin ( )
inlineconstexprnoexceptinherited

Begin reverse iteration.

952{ return _ref.rbegin(); }

◆ references_source()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
bool llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::references_source ( ) const
inlinenoexcept

True if this rendered path refers to the source path view.

1523{ return this->data() != _buffer && _bytes_to_delete == 0; }

◆ release()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
value_type * llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::release ( )
inline

Release from ownership any resources.

1502 {
1503 if(_bytes_to_delete > 0)
1504 {
1505 auto *ret = _base::_ref.data();
1506 _base::_ref = typename _base::_view_type{};
1507 _bytes_to_delete = 0;
1508 return ret;
1509 }
1510 return nullptr;
1511 }

◆ rend() [1/2]

template<class T>
const_reverse_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::rend ( ) const
inlineconstexprnoexceptinherited

End reverse iteration.

960{ return _ref.rend(); }

◆ rend() [2/2]

template<class T>
reverse_iterator llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::rend ( )
inlineconstexprnoexceptinherited

End reverse iteration.

958{ return _ref.rend(); }

◆ reset()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
void llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::reset ( )
inline

Delete any held resources now.

1492 {
1493 if(_bytes_to_delete > 0)
1494 {
1495 _deleter1(_deleter1arg, const_cast<value_type *>(_base::_ref.data()), _bytes_to_delete);
1496 _base::_ref = typename _base::_view_type{};
1497 _bytes_to_delete = 0;
1498 }
1499 }

◆ size()

template<class T>
size_type llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::size ( ) const
inlineconstexprnoexceptinherited

Size.

985{ return _ref.size(); }

◆ termination()

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
constexpr enum termination llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::termination ( )
inlinestaticconstexprnoexcept

The zero termination of this rendered path.

1514{ return ZeroTermination; }

◆ hash_value

template<enum path_view_component::termination ZeroTermination, class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter<T[]>, size_t _internal_buffer_size = default_internal_buffer_size, typename std::enable_if<(is_source_acceptable< T >), bool >::type = true>
size_t hash_value ( const rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type > & v)
friend

Returns the hash value for the bits backing the rendered path.

1582 {
1583 auto sv = v.as_string_view();
1584 using type = typename std::decay<decltype(sv)>::type;
1585 return std::hash<type>()(sv);
1586 }

The documentation for this class was generated from the following file: