8#ifndef HPP_ALIB_CONFIG_INMEMORY_PLUGIN
9#define HPP_ALIB_CONFIG_INMEMORY_PLUGIN 1
11#if !defined (HPP_ALIB_CONFIG_PLUGINS)
14#if !defined(HPP_ALIB_MONOMEM_HASHMAP)
17#if !defined(HPP_ALIB_MONOMEM_LIST)
21namespace alib {
namespace config {
49 #if !defined(ALIB_DOX)
50 friend class InMemoryPluginIteratorImpl;
75 #if !defined(ALIB_DOX)
118 TValueList::TSharedRecycler& recycler )
149 while (valSize < requestedSize )
155 while (valSize > requestedSize )
172 #if !defined(ALIB_DOX)
174 friend class InMemoryPluginIteratorImpl;
194 TEntryList::TSharedRecycler& recycler )
195 :
entries( pAllocator, recycler )
365 virtual void Clear();
387 std::pair<Section*, bool>
445 virtual bool Load(
Variable& variable,
bool searchOnly=
false )
override;
498 return &*it.Mapped().second;
515 std::make_pair(section, entryIt) );
virtual bool Store(Variable &variable)
virtual ALIB_API bool Load(Variable &variable, bool searchOnly=false)=0
String8 FormatAttrAlignment
TValueList::Iterator SetValueCount(integer requestedSize)
TValueList AdditionalValues
Entry(const String &pName, MonoAllocator *pAllocator, TValueList::TSharedRecycler &recycler)
const String & Name() const
TEntryList entries
The list of variables of the section.
String32 name
The name of the section.
const String & Name() const
const TEntryList & Entries() const
Section(const String §ionName, MonoAllocator *pAllocator, TEntryList::TSharedRecycler &recycler)
List< Entry, Recycling::Shared > TEntryList
Entry * SearchEntry(const String §ion, const String &name)
List< String32, Recycling::Shared > TValueList
const List< Section > & Sections() const
virtual ALIB_API void ToVariable(Entry &entry, Variable &variable) const
ALIB_API Entry * createEntry(Section *section, const String &name)
ALIB_API std::pair< Section *, bool > SearchOrCreateSection(const String §ionName)
virtual ALIB_API bool Load(Variable &variable, bool searchOnly=false) override
virtual ALIB_API Iterator * GetIterator(const String §ionName) override
virtual Section * createSection(const String §ionName)
monomem::HashMap< EntryKey, std::pair< Section *, TEntryList::Iterator >, EntryKey::Hash, EntryKey::EqualTo > entryTable
virtual ALIB_API void Clear()
MonoAllocator * allocator
Entry * SearchEntry(Section *section, const String &name)
virtual String Name() const override
virtual ALIB_API void FromVariable(Entry &entry, Variable &variable) const
virtual ALIB_API bool Store(Variable &variable) override
ALIB_API const Section * SearchSection(const String §ionName)
TEntryList::TSharedRecycler entryRecycler
virtual ALIB_API ~InMemoryPlugin() override
TValueList::TSharedRecycler valueRecycler
Entry * searchEntry(const String §ion, const String &name)
void DbgDisableBufferReplacementWarning()
constexpr bool IsEmpty() const
std::size_t HashcodeIgnoreCase() const
bool Equals(const TString< TChar > &rhs) const
characters::character character
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
config::InMemoryPlugin InMemoryPlugin
Type alias in namespace alib.
bool operator()(const EntryKey &lhs, const EntryKey &rhs) const
std::size_t operator()(const EntryKey &key) const
const String & EntryName
The name of the entry.
const String & SectionName
The name of the section.
EntryKey(const String §ionName, const String &entryName)