Class Template¶
Defined in File Template.h
Class Documentation¶
-
class
URI::Template
::
Template
¶ Public Functions
-
Template
() = default¶ Constructor.
Creates empty URI-template. Template should be populated later with EmplaceBack().
-
~Template
() = default¶ Destructor.
-
template<class ...
Args
>
inline Part &EmplaceBack
(Args&&... args)¶ Appends a new part to the end of the template.
- Template Parameters
...Args – Types of
args
.- Parameters
[in] ...args – Arguments to pass to the part constructor.
-
bool
IsTemplated
() const¶ Check if the template has any expressions in it.
- Returns
true if template has at least one expression, false otherwise.
-
std::size_t
Size
() const¶ Get size of the template.
- Returns
The number of parts in the template.
-
std::vector<Part> &
Parts
()¶ Get a vector of parts in the template.
- Returns
A reference to vector of parts.
-
const std::vector<Part> &
Parts
() const¶ Get a vector of parts in the template.
- Returns
A const reference to vector of parts.
-
Part &
operator[]
(std::size_t pos)¶ Get specific part of the template by its index.
Note
Accessing a nonexistent element through this operator is undefined behavior.
- Parameters
[in] pos – Index of the part to return.
- Returns
A reference to the part at specified location
pos
.
-
const Part &
operator[]
(std::size_t pos) const¶ Get specific part of the template by its index.
Note
Accessing a nonexistent element through this operator is undefined behavior.
- Parameters
[in] pos – Index of the part to return.
- Returns
A const reference to the part at specified location
pos
.
-
std::string
String
() const noexcept¶ Get the template string.
-