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"

Inherits llfio_v2_xxx::path_view_component::_rendered_path_base< ZeroTermination, T, bool >.

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_pathoperator= (const rendered_path &)=delete
 
rendered_pathoperator= (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>
constexpr llfio_v2_xxx::path_view_component::rendered_path< ZeroTermination, T, AllocatorOrDeleter, _internal_buffer_size, type >::rendered_path ( )
inlineconstexpr
1126{}

◆ 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.

1361 {})
1362 : _deleter1(_invoke_deleter)
1363 , _deleter1arg(&_deleter2)
1364 , _deleter2(static_cast<V &&>(deleter))
1365 {
1366 _init(view, loc, static_cast<U &&>(allocate));
1367 }
const AllocatorOrDeleter & deleter() const noexcept
Access the custom deleter instance passed to the constructor.
Definition path_view.hpp:1517

◆ 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.

1373 {})
1374 : _deleter1(_invoke_deleter)
1375 , _deleter1arg(&_deleter2)
1376 , _deleter2(static_cast<V &&>(deleter))
1377 {
1378 _init(view, (const std::locale *) nullptr, static_cast<U &&>(allocate));
1379 }

◆ 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.

1381 {})
1382 : _deleter1(_memory_resouce_deallocate)
1383 , _deleter1arg(&mr)
1384 {
1385 _init(view, &loc, _memory_resource_allocate{&mr});
1386 }

◆ 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.

1388 {})
1389 : _deleter1(_memory_resouce_deallocate)
1390 , _deleter1arg(&mr)
1391 {
1392 _init(view, (const std::locale *) nullptr, _memory_resource_allocate{&mr});
1393 }

◆ 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.

1397 {})
1398 : _deleter1(_stl_allocator_deallocate<allocator_type>)
1399 , _deleter1arg(&_deleter2)
1400 , _deleter2(static_cast<U &&>(allocate))
1401 {
1402 _init(view, &loc, _stl_allocator_allocate<std::decay_t<U>>(static_cast<std::decay_t<U> *>(&_deleter2)));
1403 }
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.

1407 {})
1408 : _deleter1(_stl_allocator_deallocate<allocator_type>)
1409 , _deleter1arg(&_deleter2)
1410 , _deleter2(static_cast<U &&>(allocate))
1411 {
1412 _init(view, (const std::locale *) nullptr,
1413 _stl_allocator_allocate<std::decay_t<U>>(static_cast<std::decay_t<U> *>(&_deleter2)));
1414 }

◆ 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.

1417 : _deleter1(_default_deleter)
1418 , _deleter1arg(&_deleter2)
1419 {
1420 _init(view, &loc, _default_allocate<AllocatorOrDeleter>(&_deleter2));
1421 }

◆ 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.

1424 : _deleter1(_default_deleter)
1425 , _deleter1arg(&_deleter2)
1426 {
1427 _init(view, nullptr, _default_allocate<AllocatorOrDeleter>(&_deleter2));
1428 }

◆ 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.

1436 : _base(o)
1437 , _bytes_to_delete(o._bytes_to_delete)
1438 , _deleter1(o._deleter1)
1439 , _deleter1arg(o._deleter1arg)
1440 , _deleter2(std::move(o._deleter2))
1441 {
1442 }

◆ ~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
1443{ reset(); }
void reset()
Delete any held resources now.
Definition path_view.hpp:1482

◆ 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
1446 : _base(o)
1447 , _bytes_to_delete(o._bytes_to_delete)
1448 , _deleter1(o._deleter1)
1449 , _deleter1arg(o._deleter1arg)
1450 , _deleter2(std::move(o._deleter2))
1451 {
1452 if(this != &o)
1453 {
1454 if(o.data() == o._buffer)
1455 {
1456 memcpy(_buffer, o._buffer, (o.size() + 1) * sizeof(value_type));
1457 _base::_ref = typename _base::_view_type(_buffer, _base::_ref.size());
1458 }
1459 if(o._deleter1arg == &o._deleter2)
1460 {
1461 _deleter1arg = &_deleter2;
1462 }
1463 o._ref = {};
1464 o._bytes_to_delete = 0;
1465 o._deleter1 = nullptr;
1466 o._deleter1arg = nullptr;
1467 }
1468 }

Member Function Documentation

◆ _as_string_view()

template<class T >
constexpr 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.

1525{ 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.

1527{ return _deleter2; }

◆ as_span()

template<class T >
constexpr _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>
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr reference llfio_v2_xxx::path_view_component::_rendered_path_base_< T >::back ( )
inlineconstexprnoexceptinherited

Access.

977{ return _ref.back(); }

◆ begin() [1/2]

template<class T >
constexpr 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 >
constexpr 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.

1512{ 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:1507

◆ cbegin()

template<class T >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr 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.

1517{ 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.

1519{ return _deleter2; }

◆ empty()

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

Empty.

991{ return _ref.empty(); }

◆ end() [1/2]

template<class T >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr 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>
static 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.

1508 {
1509 return (_internal_buffer_size > 0) ? _internal_buffer_size : 1;
1510 }

◆ length()

template<class T >
constexpr 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 >
constexpr 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.

1522{ 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.

1552 {
1553 if(this->data() == nullptr && o->data() == nullptr)
1554 {
1555 return false;
1556 }
1557 if(this->data() == nullptr && o->data() != nullptr)
1558 {
1559 return true;
1560 }
1561 if(this->data() != nullptr && o->data() == nullptr)
1562 {
1563 return true;
1564 }
1565 if(this->size() != o.size())
1566 {
1567 return true;
1568 }
1569 return 0 != memcmp(this->data(), o.data(), this->size());
1570 }

◆ 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
1471 {
1472 if(this == &o)
1473 {
1474 return *this;
1475 }
1476 this->~rendered_path();
1477 new(this) rendered_path(std::move(o));
1478 return *this;
1479 }

◆ 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.

1531 {
1532 if(this->data() == nullptr && o->data() == nullptr)
1533 {
1534 return true;
1535 }
1536 if(this->data() == nullptr && o->data() != nullptr)
1537 {
1538 return false;
1539 }
1540 if(this->data() != nullptr && o->data() == nullptr)
1541 {
1542 return false;
1543 }
1544 if(this->size() != o.size())
1545 {
1546 return false;
1547 }
1548 return 0 == memcmp(this->data(), o.data(), this->size());
1549 }

◆ operator[]() [1/2]

template<class T >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr 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.

1514{ 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.

1493 {
1494 if(_bytes_to_delete > 0)
1495 {
1496 auto *ret = _base::_ref.data();
1497 _base::_ref = typename _base::_view_type{};
1498 _bytes_to_delete = 0;
1499 return ret;
1500 }
1501 return nullptr;
1502 }

◆ rend() [1/2]

template<class T >
constexpr 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 >
constexpr 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.

1483 {
1484 if(_bytes_to_delete > 0)
1485 {
1486 _deleter1(_deleter1arg, const_cast<value_type *>(_base::_ref.data()), _bytes_to_delete);
1487 _base::_ref = typename _base::_view_type{};
1488 _bytes_to_delete = 0;
1489 }
1490 }

◆ size()

template<class T >
constexpr 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>
static 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.

1505{ return ZeroTermination; }

Friends And Related Symbol Documentation

◆ 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.

1573 {
1574 auto sv = v.as_string_view();
1575 using type = typename std::decay<decltype(sv)>::type;
1576 return std::hash<type>()(sv);
1577 }

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