Stroika Library
3.0d18
Help-Home
Loading...
Searching...
No Matches
IfNoneMatch.h
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3
*/
4
#ifndef _Stroika_Foundation_IO_Network_HTTP_IfNoneMatch_h_
5
#define _Stroika_Foundation_IO_Network_HTTP_IfNoneMatch_h_ 1
6
7
#include "Stroika/Foundation/StroikaPreComp.h"
8
9
#include "
Stroika/Foundation/Characters/String.h
"
10
#include "Stroika/Foundation/Containers/Sequence.h"
11
12
#include "ETag.h"
13
14
/**
15
*/
16
17
namespace
Stroika::Foundation::IO::Network::HTTP
{
18
19
using
Characters::String;
20
21
/**
22
* If-None-Match is typically a list of just one ETag (@see https://tools.ietf.org/html/rfc7232#section-3.2)
23
*/
24
struct
IfNoneMatch
{
25
26
IfNoneMatch
(
const
Containers::Sequence<ETag>
& etags);
27
28
/**
29
* If ill-format or missing, return nullopt, no exception.
30
*/
31
static
optional<IfNoneMatch>
Parse
(
const
String
& wireFormat);
32
33
Containers::Sequence<ETag>
fETags;
34
35
// true iff fETags is empty
36
bool
IsAsterisk ()
const
;
37
38
/**
39
* This As<> encodes the ETag as specified in HTTP SPEC (URL)
40
*
41
* T can be among these:
42
* o String
43
*/
44
template
<
typename
T>
45
T
As
()
const
;
46
47
/**
48
* @see Characters::ToString ();
49
*/
50
nonvirtual
String
ToString
()
const
;
51
52
/**
53
*/
54
nonvirtual strong_ordering operator<=> (
const
IfNoneMatch
& rhs)
const
=
default
;
55
};
56
57
}
58
59
/*
60
********************************************************************************
61
***************************** Implementation Details ***************************
62
********************************************************************************
63
*/
64
#include "IfNoneMatch.inl"
65
66
#endif
/*_Stroika_Foundation_IO_Network_HTTP_IfNoneMatch_h_*/
String.h
Stroika::Foundation::Characters::String
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Definition
String.h:201
Stroika::Foundation::Containers::Sequence
A generalization of a vector: a container whose elements are keyed by the natural numbers.
Definition
Library/Sources/Stroika/Foundation/Containers/Sequence.h:187
Stroika::Foundation::IO::Network::HTTP
Definition
CacheControl.h:17
Stroika::Foundation::IO::Network::HTTP::IfNoneMatch
Definition
IfNoneMatch.h:24
Stroika::Foundation::IO::Network::HTTP::IfNoneMatch::As
T As() const
Stroika::Foundation::IO::Network::HTTP::IfNoneMatch::Parse
static optional< IfNoneMatch > Parse(const String &wireFormat)
Definition
IfNoneMatch.inl:20
Stroika::Foundation::IO::Network::HTTP::IfNoneMatch::ToString
nonvirtual String ToString() const
Definition
IfNoneMatch.inl:76
Library
Sources
Stroika
Foundation
IO
Network
HTTP
IfNoneMatch.h
Generated by
1.9.8