Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
XML/Writer.h
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_DataExchange_Variant_XML_Writer_h_
5#define _Stroika_Foundation_DataExchange_Variant_XML_Writer_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
10#include "Stroika/Foundation/Common/Common.h"
14#include "Stroika/Foundation/DataExchange/XML/SerializationConfiguration.h"
16
17/*
18 * TODO:
19 * @todo Probably wrong, and certainly incomplete, but it is now at the point of being testable.
20 *
21 * @todo Add SerializationOptions (distingished from SerializationConfiguariton cuz thats used for
22 * both reader and writer).
23 * o include?xml... header
24 * o Pretty print (spacing/tabs etc)
25 * o POSSIBLY option for characterset to write wiith?
26 *
27 * @todo fix thread-safety - cloning rep - lock for access config data
28 */
29
30namespace Stroika::Foundation::DataExchange::Variant::XML {
31
32 using Characters::String;
33
34 using DataExchange::XML::SerializationConfiguration;
35
36 /**
37 * @todo
38 * add options for stuff like - special for xml - assumed-outer-doc, stuff abotu namespaces, and st
39 *... todo namespaces - store in string (elt name a:b) and fill in namespace object accordingly.
40 *
41 * The argument VariantValue must be composed of any combination of these types:
42 * o VariantValue::eBoolean
43 * o VariantValue::eInteger
44 * o VariantValue::eFloat
45 * o VariantValue::eString
46 * o VariantValue::eMap
47 * o VariantValue::eArray
48 * or it can be the type:
49 * o VariantValue::eNull
50 *
51 * Other types are illegal an XML and will trigger a 'Require' failure.
52 */
53 class Writer : public Variant::Writer {
54 private:
56
57 private:
58 class Rep_;
59
60 public:
62
63 public:
64 nonvirtual SerializationConfiguration GetConfiguration () const;
65 nonvirtual void SetConfiguration (const SerializationConfiguration& config);
66
67 private:
68 nonvirtual const Rep_& GetRep_ () const;
69 nonvirtual Rep_& GetRep_ ();
70 };
71
72}
73
74/*
75 ********************************************************************************
76 ***************************** Implementation Details ***************************
77 ********************************************************************************
78 */
79#include "Writer.inl"
80
81#endif /*_Stroika_Foundation_DataExchange_Variant_XML_Writer_h_*/
abstract class specifying interface for writers VariantValue objects to serialized formats like JSON,...
Definition Writer.h:37