A value that references an object via a (usually string-like) "path"; it lazily resolves the pointer to the object, and caches it.
More...
|
|
| caching_path_reference (caching_path_reference const &) noexcept=default |
|
| caching_path_reference (caching_path_reference &&) noexcept=default |
|
caching_path_reference & | operator= (caching_path_reference const &obj) noexcept=default |
|
caching_path_reference & | operator= (caching_path_reference &&obj) noexcept=default |
| template<typename T> |
| | caching_path_reference (T &&p) |
| | Construction from path.
|
| template<typename T> |
| auto & | operator= (T &&p) |
| | Assignment from path.
|
| template<typename T> |
| | caching_path_reference (T &&p) |
| | Construction from pointer.
|
| template<typename T> |
| auto & | operator= (T &&p) |
| | Assignment from pointer.
|
| pointer_type | operator-> () const |
| auto & | operator* () const |
template<typename T>
requires ( (std::same_as<std::remove_cvref_t<T>, caching_path_reference>) || (std::same_as<std::remove_cvref_t<T>, pointer_type>) || (std::same_as<std::remove_cvref_t<T>, path_type>) || (std::constructible_from<std::string_view, T const&> && std::equality_comparable_with<path_type const&, std::string_view>) ) |
| bool | operator== (T const &other) const |
template<typename T>
requires ( (std::same_as<std::remove_cvref_t<T>, caching_path_reference>) || (std::same_as<std::remove_cvref_t<T>, pointer_type>) || (std::same_as<std::remove_cvref_t<T>, path_type>) || (std::constructible_from<std::string_view, T const&> && std::equality_comparable_with<path_type const&, std::string_view>) ) |
| auto | operator<=> (T const &other) const |
| void | reset () |
| | Sets both the path and pointer to their defaults.
|
| path_type const & | path () const & |
| bool | path_empty () const |
| path_type | path () && |
| pointer_type const & | pointer () const & |
| pointer_type | pointer () && |
| | operator bool () const noexcept |
| | operator path_type () const noexcept |
template<typename POINTER_TYPE, typename PATH_TYPE = std::string, typename RESOLVER_TYPE = detail::flyweight_resolver<POINTER_TYPE, PATH_TYPE>, typename... TAGS>
struct ghassanpl::caching_path_reference< POINTER_TYPE, PATH_TYPE, RESOLVER_TYPE, TAGS >
A value that references an object via a (usually string-like) "path"; it lazily resolves the pointer to the object, and caches it.
\usage TODO
- Template Parameters
-
| POINTER_TYPE | the type to store the pointer in - must be copyable, so should be a pointer of some sort |
| PATH_TYPE | (optional) the type to store the path in; if not given, will use std::string |
| RESOLVER_TYPE | (optional) type used to resolve the pointer from the path; if not given, will use a thread-safe global storage for these pointer+path types |
| TAGS... | a list of tags that modify the behavior of this type; currently none are available |
Definition at line 94 of file path_reference.h.
template<typename POINTER_TYPE, typename PATH_TYPE = std::string, typename RESOLVER_TYPE = detail::flyweight_resolver<POINTER_TYPE, PATH_TYPE>, typename... TAGS>
template<typename T>
requires ( (std::same_as<std::remove_cvref_t<T>, caching_path_reference>) || (std::same_as<std::remove_cvref_t<T>, pointer_type>) || (std::same_as<std::remove_cvref_t<T>, path_type>) || (std::constructible_from<std::string_view, T const&> && std::equality_comparable_with<path_type const&, std::string_view>) )
template<typename POINTER_TYPE, typename PATH_TYPE = std::string, typename RESOLVER_TYPE = detail::flyweight_resolver<POINTER_TYPE, PATH_TYPE>, typename... TAGS>
template<typename T>
requires ( (std::same_as<std::remove_cvref_t<T>, caching_path_reference>) || (std::same_as<std::remove_cvref_t<T>, pointer_type>) || (std::same_as<std::remove_cvref_t<T>, path_type>) || (std::constructible_from<std::string_view, T const&> && std::equality_comparable_with<path_type const&, std::string_view>) )
template<typename POINTER_TYPE, typename PATH_TYPE = std::string, typename RESOLVER_TYPE = detail::flyweight_resolver<POINTER_TYPE, PATH_TYPE>, typename... TAGS>
Doesn't work for some reason... static_assert(detail::valid_resolver<resolver_type, path_type, pointer_type, TAGS...>, "Invalid resolver type - must implement the ResolveReferenceFromPath function template as specified by the valid_resolver concept");.
Definition at line 108 of file path_reference.h.