4#include "Stroika/Foundation/StroikaPreComp.h"
7#include "Stroika/Foundation/Streams/TextToBinary.h"
16using namespace Stroika::Foundation::Streams;
21using namespace DataExchange::Variant;
22using Memory::MakeSharedPtr;
32 virtual optional<filesystem::path> GetDefaultFileSuffix ()
const override
42 Write (Convert (v), out);
46#if USE_NOISY_TRACE_IN_THIS_MODULE_
49 Write (nullopt, profile.fUnnamedSection, out);
50 for (
const auto& sectionKVP : profile.fNamedSections) {
51 Write (sectionKVP.fKey, sectionKVP.fValue, out);
58 sb <<
"["sv << *sectionName <<
"]"sv << Characters::kEOL<wchar_t>;
61 sb << kvp.fKey <<
"="sv << kvp.fValue << Characters::kEOL<wchar_t>;
79 Debug::UncheckedDynamicCast<const Rep_&> (_ConstGetRep ()).Write (profile, out);
82void INI::Writer::Write (
const Profile& profile, ostream& out)
const
84 Write (profile, _WrapBinaryOutput (out));
87void INI::Writer::Write (
const Profile& profile, wostream& out)
const
89 Write (profile, _WrapTextOutput (out));
92Memory::BLOB INI::Writer::WriteAsBLOB (
const Profile& profile)
const
97String INI::Writer::WriteAsString (
const Profile& profile)
const
auto MakeSharedPtr(ARGS_TYPE &&... args) -> shared_ptr< T >
same as make_shared, but if type T has block allocation, then use block allocation for the 'shared pa...
conditional_t< qStroika_Foundation_Memory_PreferBlockAllocation and andTrueCheck, BlockAllocationUseHelper< T >, Common::Empty > UseBlockAllocationIfAppropriate
Use this to enable block allocation for a particular class. Beware of subclassing.
Similar to String, but intended to more efficiently construct a String. Mutable type (String is large...
nonvirtual String str() const
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Simple variant-value (case variant union) object, with (variant) basic types analogous to a value in ...
OutputStream<>::Ptr is Smart pointer to a stream-based sink of data.
nonvirtual void WriteLn(ELT_2_WRITE &&arg) const
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
An Iterator<T> is a copyable object which allows traversing the contents of some container.
Ptr New(const Streams::OutputStream::Ptr< byte > &src, const Characters::CodeCvt<> &char2OutputConverter)