xentara-plugin v2.0.4
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::config::CustomResolver< Reference >::NameProjection Struct Referencefinal

A projection that gets the name of an object using name() More...

#include <xentara/config/CustomResolver.hpp>

Public Member Functions

template<typename Object >
requires requires(const Object &object) { object.name(); }
constexpr auto operator() (const Object &object) const -> decltype(auto)
 Gets the name by calling object.name().
 
template<typename Pointer >
requires requires(const Pointer &pointer) { pointer->name(); }
constexpr auto operator() (const Pointer &pointer) const -> decltype(auto)
 Gets the name by calling pointer->name().
 
template<typename ReferenceWrapper >
requires requires(const ReferenceWrapper &referenceWrapper) { referenceWrapper.get().name(); }
constexpr auto operator() (const ReferenceWrapper &referenceWrapper) const -> decltype(auto)
 Gets the name by calling object.get().name().
 

Detailed Description

template<typename Reference>
struct xentara::config::CustomResolver< Reference >::NameProjection

A projection that gets the name of an object using name()

Member Function Documentation

◆ operator()() [1/3]

template<typename Reference >
template<typename Object >
requires requires(const Object &object) { object.name(); }
constexpr auto xentara::config::CustomResolver< Reference >::NameProjection::operator() ( const Object &  object) const -> decltype(auto)
constexpr

Gets the name by calling object.name().

◆ operator()() [2/3]

template<typename Reference >
template<typename Pointer >
requires requires(const Pointer &pointer) { pointer->name(); }
constexpr auto xentara::config::CustomResolver< Reference >::NameProjection::operator() ( const Pointer &  pointer) const -> decltype(auto)
constexpr

Gets the name by calling pointer->name().

This overload is used for pointer-like references.

◆ operator()() [3/3]

template<typename Reference >
template<typename ReferenceWrapper >
requires requires(const ReferenceWrapper &referenceWrapper) { referenceWrapper.get().name(); }
constexpr auto xentara::config::CustomResolver< Reference >::NameProjection::operator() ( const ReferenceWrapper &  referenceWrapper) const -> decltype(auto)
constexpr

Gets the name by calling object.get().name().

This overload is used for std::reference_wrapper and similar references.