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={})
 
 rendered_path (path_view_component view, pmr::memory_resource &mr, _memory_resource_tag={})
 
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={})
 
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={})
 
 rendered_path (path_view_component view, const std::locale &loc)
 
 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
1060{}

◆ 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.
output_zero_terminationThe zero termination in the output desired
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.

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.

1279 {})
1280 : _deleter1(_invoke_deleter)
1281 , _deleter1arg(&_deleter2)
1282 , _deleter2(static_cast<V &&>(deleter))
1283 {
1284 _init(view, loc, static_cast<U &&>(allocate));
1285 }
const AllocatorOrDeleter & deleter() const noexcept
Access the custom deleter instance passed to the constructor.
Definition path_view.hpp:1427

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

1289 {})
1290 : _deleter1(_invoke_deleter)
1291 , _deleter1arg(&_deleter2)
1292 , _deleter2(static_cast<V &&>(deleter))
1293 {
1294 _init(view, (const std::locale *) nullptr, static_cast<U &&>(allocate));
1295 }

◆ 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
1297 {})
1298 : _deleter1(_memory_resouce_deallocate)
1299 , _deleter1arg(&mr)
1300 {
1301 _init(view, &loc, _memory_resource_allocate{&mr});
1302 }

◆ 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
1304 {})
1305 : _deleter1(_memory_resouce_deallocate)
1306 , _deleter1arg(&mr)
1307 {
1308 _init(view, (const std::locale *) nullptr, _memory_resource_allocate{&mr});
1309 }

◆ 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
1313 {})
1314 : _deleter1(_stl_allocator_deallocate<allocator_type>)
1315 , _deleter1arg(&_deleter2)
1316 , _deleter2(static_cast<U &&>(allocate))
1317 {
1318 _init(view, &loc, _stl_allocator_allocate<std::decay_t<U>>(static_cast<std::decay_t<U> *>(&_deleter2)));
1319 }
decltype(detail::is_allocator(std::declval< AllocatorOrDeleter >())) allocator_type
Type of the allocator, or void if that was not configured.
Definition path_view.hpp:988

◆ 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
1323 {})
1324 : _deleter1(_stl_allocator_deallocate<allocator_type>)
1325 , _deleter1arg(&_deleter2)
1326 , _deleter2(static_cast<U &&>(allocate))
1327 {
1328 _init(view, (const std::locale *) nullptr, _stl_allocator_allocate<std::decay_t<U>>(static_cast<std::decay_t<U> *>(&_deleter2)));
1329 }

◆ 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
1332 : _deleter1(_default_deleter)
1333 , _deleter1arg(&_deleter2)
1334 {
1335 _init(view, &loc, _default_allocate<AllocatorOrDeleter>(&_deleter2));
1336 }

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

1339 : _deleter1(_default_deleter)
1340 , _deleter1arg(&_deleter2)
1341 {
1342 _init(view, nullptr, _default_allocate<AllocatorOrDeleter>(&_deleter2));
1343 }

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

1349 : _base(o)
1350 , _bytes_to_delete(o._bytes_to_delete)
1351 , _deleter1(o._deleter1)
1352 , _deleter1arg(o._deleter1arg)
1353 , _deleter2(std::move(o._deleter2))
1354 {
1355 }

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

◆ 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
1359 : _base(o)
1360 , _bytes_to_delete(o._bytes_to_delete)
1361 , _deleter1(o._deleter1)
1362 , _deleter1arg(o._deleter1arg)
1363 , _deleter2(std::move(o._deleter2))
1364 {
1365 if(this != &o)
1366 {
1367 if(o.data() == o._buffer)
1368 {
1369 memcpy(_buffer, o._buffer, (o.size() + 1) * sizeof(value_type));
1370 _base::_ref = typename _base::_view_type(_buffer, _base::_ref.size());
1371 }
1372 if(o._deleter1arg == &o._deleter2)
1373 {
1374 _deleter1arg = &_deleter2;
1375 }
1376 o._ref = {};
1377 o._bytes_to_delete = 0;
1378 o._deleter1 = nullptr;
1379 o._deleter1arg = nullptr;
1380 }
1381 }

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

1435{ 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>
STL 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.

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

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

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

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

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

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

919{ return _ref.back(); }

◆ back() [2/2]

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

Access.

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

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

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

1422{ 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:1420

◆ cbegin()

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

Begin iteration.

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

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

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

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

923{ return _ref.data(); }

◆ data() [2/2]

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

Access.

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

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

1429{ return _deleter2; }

◆ empty()

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

Empty.

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

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

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

915{ return _ref.front(); }

◆ front() [2/2]

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

Access.

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

1420{ return (_internal_buffer_size > 0) ? _internal_buffer_size : 1; }

◆ length()

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

Size.

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

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

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

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

1462 {
1463 if(this->data() == nullptr && o->data() == nullptr)
1464 {
1465 return false;
1466 }
1467 if(this->data() == nullptr && o->data() != nullptr)
1468 {
1469 return true;
1470 }
1471 if(this->data() != nullptr && o->data() == nullptr)
1472 {
1473 return true;
1474 }
1475 if(this->size() != o.size())
1476 {
1477 return true;
1478 }
1479 return 0 != memcmp(this->data(), o.data(), this->size());
1480 }

◆ 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
1384 {
1385 if(this == &o)
1386 {
1387 return *this;
1388 }
1389 this->~rendered_path();
1390 new(this) rendered_path(std::move(o));
1391 return *this;
1392 }

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

1441 {
1442 if(this->data() == nullptr && o->data() == nullptr)
1443 {
1444 return true;
1445 }
1446 if(this->data() == nullptr && o->data() != nullptr)
1447 {
1448 return false;
1449 }
1450 if(this->data() != nullptr && o->data() == nullptr)
1451 {
1452 return false;
1453 }
1454 if(this->size() != o.size())
1455 {
1456 return false;
1457 }
1458 return 0 == memcmp(this->data(), o.data(), this->size());
1459 }

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

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

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

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

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

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

1406 {
1407 if(_bytes_to_delete > 0)
1408 {
1409 auto *ret = _base::_ref.data();
1410 _base::_ref = typename _base::_view_type{};
1411 _bytes_to_delete = 0;
1412 return ret;
1413 }
1414 return nullptr;
1415 }

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

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

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

1396 {
1397 if(_bytes_to_delete > 0)
1398 {
1399 _deleter1(_deleter1arg, const_cast<value_type *>(_base::_ref.data()), _bytes_to_delete);
1400 _base::_ref = typename _base::_view_type{};
1401 _bytes_to_delete = 0;
1402 }
1403 }

◆ size()

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

Size.

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

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

1483 {
1484 auto sv = v.as_string_view();
1485 using type = typename std::decay<decltype(sv)>::type;
1486 return std::hash<type>()(sv);
1487 }

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