Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
INI/Writer.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_INI_Writer_h_
5#define _Stroika_Foundation_DataExchange_Variant_INI_Writer_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
9#include "Stroika/Foundation/Common/Common.h"
13
14#include "Profile.h"
15
16/**
17 * \file
18 */
19
20namespace Stroika::Foundation::DataExchange::Variant::INI {
21
22 /**
23 */
24 class Writer : public Variant::Writer {
25 private:
26 using inherited = Variant::Writer;
27
28 private:
29 class Rep_;
30
31 public:
32 Writer ();
33
34 public:
35 /**
36 * @See Variant::Writer::Write, but overloaded to also take array of array of strings to write.
37 *
38 * \note Could have been called WriteMatrix (additional overloads) - but seemed best to emphasize connection
39 * to other Writers instead of similarity to Reader (where we call it ReadMatrix due to not being
40 * able to overload on return type).
41 */
42 using inherited::Write;
43 nonvirtual void Write (const Profile& profile, const Streams::OutputStream::Ptr<byte>& out);
44 nonvirtual void Write (const Profile& profile, const Streams::OutputStream::Ptr<Characters::Character>& out);
45 nonvirtual void Write (const Profile& profile, ostream& out);
46 nonvirtual void Write (const Profile& profile, wostream& out);
47
48 public:
49 /**
50 * @See Variant::Writer::WriteAsString, but overloaded to also take array of array of strings to write.
51 */
53 nonvirtual String WriteAsString (const Profile& profile);
54
55 public:
56 /**
57 * @See Variant::Writer::WriteAsBLOB, but overloaded to also take array of array of strings to write.
58 */
60 nonvirtual Memory::BLOB WriteAsBLOB (const Profile& profile);
61
62 private:
63 nonvirtual shared_ptr<Rep_> GetRep_ () const;
64 };
65
66}
67
68/*
69 ********************************************************************************
70 ***************************** Implementation Details ***************************
71 ********************************************************************************
72 */
73
74#endif /*_Stroika_Foundation_DataExchange_Variant_INI_Writer_h_*/
nonvirtual String WriteAsString(const VariantValue &v) const
Definition Writer.cpp:53
nonvirtual Memory::BLOB WriteAsBLOB(const VariantValue &v) const
Definition Writer.cpp:48
nonvirtual void Write(const VariantValue &v, const Streams::OutputStream::Ptr< byte > &out) const
Definition Writer.inl:30
Writer(const shared_ptr< _IRep > &rep)
Definition Writer.inl:22