Audacity 3.2.0
|
#include <XMLMethodRegistry.h>
Classes | |
struct | AttributeReaderEntries |
struct | AttributeWriterEntry |
Typically statically constructed. More... | |
struct | ObjectReaderEntry |
struct | ObjectWriterEntry |
Typically statically constructed. More... | |
Public Member Functions | |
XMLTagHandler * | CallObjectAccessor (const std::string_view &tag, Host &host) |
bool | CallAttributeHandler (const std::string_view &tag, Host &host, const XMLAttributeValueView &value) |
void | CallWriters (const Host &host, XMLWriter &writer) |
Public Member Functions inherited from XMLMethodRegistryBase | |
XMLMethodRegistryBase () | |
~XMLMethodRegistryBase () | |
Static Public Member Functions | |
static XMLMethodRegistry & | Get () |
Get the unique instance. More... | |
Additional Inherited Members | |
Public Types inherited from XMLMethodRegistryBase | |
template<typename Substructure > | |
using | Mutator = std::function< void(Substructure &, const XMLAttributeValueView &) > |
A helper type alias for a function taking a structure and a string value. More... | |
template<typename Substructure > | |
using | Mutators = std::vector< std::pair< std::string, Mutator< Substructure > > > |
A helper type alias for a list of mutators, associated with tag strings. More... | |
Protected Types inherited from XMLMethodRegistryBase | |
using | TypeErasedObjectAccessor = std::function< XMLTagHandler *(void *) > |
using | TagTable = std::unordered_map< std::string_view, TypeErasedObjectAccessor > |
using | TypeErasedAccessor = std::function< void *(void *) > |
using | TypeErasedAccessors = std::vector< TypeErasedAccessor > |
using | TypeErasedMutator = std::function< void(void *, const XMLAttributeValueView &) > |
using | MutatorTable = std::unordered_map< std::string_view, std::pair< size_t, TypeErasedMutator > > |
From attribute name, to index in accessor table with a mutator. More... | |
using | TypeErasedWriter = std::function< void(const void *, XMLWriter &) > |
using | WriterTable = std::vector< TypeErasedWriter > |
Protected Member Functions inherited from XMLMethodRegistryBase | |
void | Register (std::string tag, TypeErasedObjectAccessor accessor) |
XMLTagHandler * | CallObjectAccessor (const std::string_view &tag, void *p) |
void | PushAccessor (TypeErasedAccessor accessor) |
void | Register (std::string tag, TypeErasedMutator mutator) |
bool | CallAttributeHandler (const std::string_view &tag, void *p, const XMLAttributeValueView &value) |
void | RegisterAttributeWriter (TypeErasedWriter writer) |
void | CallAttributeWriters (const void *p, XMLWriter &writer) |
void | RegisterObjectWriter (TypeErasedWriter writer) |
void | CallObjectWriters (const void *p, XMLWriter &writer) |
Protected Attributes inherited from XMLMethodRegistryBase | |
TagTable | mTagTable |
std::forward_list< std::string > | mTags |
TypeErasedAccessors | mAccessors |
MutatorTable | mMutatorTable |
std::forward_list< std::string > | mMutatorTags |
WriterTable | mAttributeWriterTable |
WriterTable | mObjectWriterTable |
A class template of inline type-erasing wrapper functions, but one function with linkage is also needed. See the macros that help generate that function.
Definition at line 87 of file XMLMethodRegistry.h.
|
inline |
Definition at line 151 of file XMLMethodRegistry.h.
References XMLMethodRegistryBase::CallAttributeHandler().
|
inline |
Definition at line 111 of file XMLMethodRegistry.h.
References XMLMethodRegistryBase::CallObjectAccessor().
Referenced by ProjectFileIO::HandleXMLChild().
|
inline |
Definition at line 205 of file XMLMethodRegistry.h.
References XMLMethodRegistryBase::CallAttributeWriters(), and XMLMethodRegistryBase::CallObjectWriters().
Referenced by WaveTrack::WriteOneXML(), and ProjectFileIO::WriteXML().
|
static |
Get the unique instance.
Referenced by XMLMethodRegistry< Host >::AttributeReaderEntries::AttributeReaderEntries(), XMLMethodRegistry< Host >::AttributeWriterEntry::AttributeWriterEntry(), ProjectFileIO::HandleXMLChild(), WaveTrack::HandleXMLChild(), ProjectFileIO::HandleXMLTag(), XMLMethodRegistry< Host >::ObjectReaderEntry::ObjectReaderEntry(), XMLMethodRegistry< Host >::ObjectWriterEntry::ObjectWriterEntry(), WaveTrack::WriteOneXML(), and ProjectFileIO::WriteXML().