Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
Variant/FormURLEncoded/Reader.h
Go to the documentation of this file.
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_DataExchange_Variant_FormURLEncoded_Reader_h_
5#define _Stroika_Foundation_DataExchange_Variant_FormURLEncoded_Reader_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
9#include "Stroika/Foundation/Common/Common.h"
10#include "Stroika/Foundation/Containers/Association.h"
14
15/**
16 * \file
17 *
18 * \note Code-Status: <a href="Code-Status.md#Beta">Beta</a>
19 *
20 * TODO:
21 */
22
23namespace Stroika::Foundation::DataExchange::Variant::FormURLEncoded {
24
25 using Characters::Character;
26 using Characters::String;
27 using Containers::Association;
28 using Traversal::Iterable;
29
30 /**
31 * \brief Read a stream into an Association (or VariantValue) - following https://url.spec.whatwg.org/#application/x-www-form-urlencoded
32 *
33 * \see InternetMediaTypes::kWWWFormURLEncoded
34 *
35 * \par Example Usage
36 * \code
37 *
38 * \endcode
39 */
40 class Reader : public Variant::Reader {
41 private:
43
44 private:
45 class Rep_;
46
47 public:
48 Reader ();
49
50 public:
51 /**
52 * Alternative reading API for this file type, which maybe helpful, to read as a series of lines.
53 */
57 nonvirtual Association<String, String> ReadAssociation (istream& in);
58 nonvirtual Association<String, String> ReadAssociation (wistream& in);
59 };
60
61}
62
63/*
64 ********************************************************************************
65 ***************************** Implementation Details ***************************
66 ********************************************************************************
67 */
68#include "Reader.inl"
69
70#endif /*_Stroika_Foundation_DataExchange_Variant_FormURLEncoded_Reader_h_*/
An Association pairs key values with (possibly multiple or none) mapped_type values....
Read a stream into an Association (or VariantValue) - following https://url.spec.whatwg....
nonvirtual Association< String, String > ReadAssociation(const Streams::InputStream::Ptr< byte > &in) const
abstract class specifying interface for readers that map a source like XML or JSON to a VariantValue ...
InputStream<>::Ptr is Smart pointer (with abstract Rep) class defining the interface to reading from ...
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
Definition Iterable.h:237