25 auto &newtag =
mTags.emplace_front(move(tag));
30 const std::string_view &tag,
void *p )
33 if (
auto iter = table.find( tag ); iter != table.end())
34 if (
auto &
fn = iter->second)
56 if (
auto iter = table.find(tag); iter != table.end())
58 if (
auto &pair = iter->second;
59 pair.second && pair.first <
mAccessors.size() )
63 return pair.second( accessor( p ), value ),
true;
76 for (
auto &
fn : table )
90 for (
auto &
fn : table )
A view into an attribute value. The class does not take the ownership of the data.
WriterTable mObjectWriterTable
MutatorTable mMutatorTable
TypeErasedAccessors mAccessors
void CallAttributeWriters(const void *p, XMLWriter &writer)
std::function< void(const void *, XMLWriter &) > TypeErasedWriter
std::forward_list< std::string > mMutatorTags
void RegisterObjectWriter(TypeErasedWriter writer)
void RegisterAttributeWriter(TypeErasedWriter writer)
std::function< XMLTagHandler *(void *) > TypeErasedObjectAccessor
std::function< void *(void *) > TypeErasedAccessor
bool CallAttributeHandler(const std::string_view &tag, void *p, const XMLAttributeValueView &value)
void PushAccessor(TypeErasedAccessor accessor)
void CallObjectWriters(const void *p, XMLWriter &writer)
std::forward_list< std::string > mTags
std::function< void(void *, const XMLAttributeValueView &) > TypeErasedMutator
WriterTable mAttributeWriterTable
XMLTagHandler * CallObjectAccessor(const std::string_view &tag, void *p)
void Register(std::string tag, TypeErasedObjectAccessor accessor)
This class is an interface which should be implemented by classes which wish to be able to load and s...
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...