Class Part¶
Defined in File Template.h
Class Documentation¶
-
class
URI::Template::Part¶ URI-template part.
This class represent type-safe union for template part instances. The part can hold either Literal or Expression instance.
Public Functions
-
template<typename ...
Args, typename = std::enable_if_t<!std::is_same<detail::typelist<Part>, detail::typelist<std::decay_t<Args>...>>::value>>
inlinePart(Args&&... args)¶ Parametrized constructor.
Creates a template part. Type of the part deduced from
args.- Template Parameters
...Args – Types of
args.- Parameters
[in] ...args – Arguments to pass to the part constructor.
-
~Part() = default¶ Destructor.
-
template<class
T>
inline T &Get()¶ Get specific representation.
- Template Parameters
T – Type of the representation to get. Either:
- Throws
std::bad_variant_access – if type mismatch.
- Returns
A reference of
Tto stored instance.
-
template<class
T>
inline const T &Get() const¶ Get specific representation.
- Template Parameters
T – Type of the representation to get. Either Literal or Expression.
- Throws
std::bad_variant_access – if type mismatch.
- Returns
A const reference of
Tto stored instance.
-
inline std::string
String() const noexcept¶ Get the part string.
-
template<typename ...