16 #ifndef INCLUDE_NN_NLIB_URITEMPLATE_H_ 17 #define INCLUDE_NN_NLIB_URITEMPLATE_H_ 22 #include "nn/nlib/Swap.h" 31 static bool IsUriTemplate(
const char* first,
const char* last)
NLIB_NOEXCEPT;
48 return Resolve(written, str, N);
52 errno_t e = Resolve(&written, str, n);
53 return std::make_pair(e, written);
58 errno_t e = Resolve(&written, str, N);
59 return std::make_pair(e, written);
63 struct UriTemplatePrivate;
64 mutable UriTemplatePrivate* prv_;
69 #ifndef __cpp_rvalue_references 72 #endif // INCLUDE_NN_NLIB_URITEMPLATE_H_ #define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
~UriTemplate() noexcept
Destructor.
The class that supports URI Template (RFC 6570, Level 3).
std::pair< errno_t, size_t > Resolve(char *str, size_t n) const noexcept
Takes the string with assigned values in the URI template and writes it to str.
constexpr UriTemplate() noexcept
Instantiates the object with default parameters (default constructor).
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
#define NLIB_CEXPR
Defines constexpr if it is available for use. If not, holds an empty string.
Defines the class for handling URIs.
std::pair< errno_t, size_t > Resolve(char(&str)[N]) const noexcept
A template overload of the above function.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
static bool IsUriTemplate(const char *str) noexcept
A parameter omitted version of the above function which receives a null terminated string...