10#if !defined (HPP_ALIB_CONFIG_INMEMORY_PLUGIN)
17namespace alib {
namespace config {
25, allocator ( externalMA ? externalMA :
MonoAllocator::Create(8 * 1024) )
26, plugInName( allocator->EmplaceString(pName) )
27, entryTable( allocator )
28, sections ( allocator )
29, isMAOwner ( externalMA == nullptr )
31 #if ALIB_DEBUG_MONOMEM
32 if( externalMA ==
nullptr )
66std::pair<InMemoryPlugin::Section*, bool>
71 return std::make_pair( s,
false );
84 if( entry !=
nullptr && !searchOnly )
87 return entry !=
nullptr;
98 if ( variable.
Size() == 0 )
101 handle.Mapped().first->entries.Erase( handle.Mapped().second );
110 if ( variable.
Size() == 0 )
178 actualEntry= section->
entries.begin();
181 virtual ~InMemoryPluginIteratorImpl()
override
184 virtual bool Next( Variable& variable )
override
186 if( section ==
nullptr || actualEntry == section->
entries.end() )
189 variable.Declare( section->
Name(), actualEntry->Name() );
198 return new InMemoryPluginIteratorImpl( *
this, sectionName );
String8 FormatAttrAlignment
TValueList::Iterator SetValueCount(integer requestedSize)
TValueList AdditionalValues
TEntryList entries
The list of variables of the section.
const String & Name() 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
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)
virtual ALIB_API ~InMemoryPlugin() override
Entry * searchEntry(const String §ion, const String &name)
ALIB_API InMemoryPlugin(String pName, MonoAllocator *externalMA=nullptr)
void SetFmtHints(FormatHints hints)
void ReplaceFormatAttrAlignment(const String &newValue)
const String & FormatAttrAlignment() const
void ReplaceComments(const String &newValue)
FormatHints FmtHints() const
ALIB_API void Add(const String &value)
const String & Comments() const
const String & Name() const
void SetDelim(character delim)
const String & Category() const
const String & GetString(int idx=0)
TAString & _(const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
constexpr bool IsEmpty() const
constexpr bool IsNotEmpty() const
constexpr bool IsNotNull() const
#define ALIB_ASSERT_WARNING(cond,...)
#define ALIB_ASSERT(cond)
static ALIB_FORCE_INLINE void Destruct(T *object)
constexpr CString EmptyString()
strings::TString< character > String
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.