![]() |
Audacity 3.2.0
|
Implementation helper for ProjectFileIORegistry. More...
#include <XMLMethodRegistry.h>
Public Types | |
| 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... | |
Public Member Functions | |
| XMLMethodRegistryBase () | |
| ~XMLMethodRegistryBase () | |
Protected Types | |
| 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 | |
| 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 | |
| TagTable | mTagTable |
| std::forward_list< std::string > | mTags |
| TypeErasedAccessors | mAccessors |
| MutatorTable | mMutatorTable |
| std::forward_list< std::string > | mMutatorTags |
| WriterTable | mAttributeWriterTable |
| WriterTable | mObjectWriterTable |
Implementation helper for ProjectFileIORegistry.
It makes most of the work non-inline and is used by derived classes that supply thin inline type-erasing wrappers.
Definition at line 30 of file XMLMethodRegistry.h.
| using XMLMethodRegistryBase::Mutator = std::function< void(Substructure&, const XMLAttributeValueView &) > |
A helper type alias for a function taking a structure and a string value.
Definition at line 35 of file XMLMethodRegistry.h.
| using XMLMethodRegistryBase::Mutators = std::vector< std::pair< std::string, Mutator<Substructure> > > |
A helper type alias for a list of mutators, associated with tag strings.
Definition at line 39 of file XMLMethodRegistry.h.
|
protected |
From attribute name, to index in accessor table with a mutator.
Definition at line 61 of file XMLMethodRegistry.h.
|
protected |
Definition at line 45 of file XMLMethodRegistry.h.
|
protected |
Definition at line 53 of file XMLMethodRegistry.h.
|
protected |
Definition at line 54 of file XMLMethodRegistry.h.
|
protected |
Definition at line 59 of file XMLMethodRegistry.h.
|
protected |
Definition at line 44 of file XMLMethodRegistry.h.
|
protected |
Definition at line 71 of file XMLMethodRegistry.h.
|
protected |
Definition at line 72 of file XMLMethodRegistry.h.
|
default |
|
default |
|
protected |
Definition at line 52 of file XMLMethodRegistry.cpp.
References mAccessors, and mMutatorTable.
Referenced by XMLMethodRegistry< Host >::CallAttributeHandler().
|
protected |
Definition at line 72 of file XMLMethodRegistry.cpp.
References fn, and mAttributeWriterTable.
Referenced by XMLMethodRegistry< Host >::CallWriters().
|
protected |
Definition at line 29 of file XMLMethodRegistry.cpp.
Referenced by XMLMethodRegistry< Host >::CallObjectAccessor().
|
protected |
Definition at line 86 of file XMLMethodRegistry.cpp.
References fn, and mObjectWriterTable.
Referenced by XMLMethodRegistry< Host >::CallWriters().
|
protected |
Definition at line 39 of file XMLMethodRegistry.cpp.
References mAccessors.
|
protected |
Definition at line 44 of file XMLMethodRegistry.cpp.
References mAccessors, mMutatorTable, and mMutatorTags.
|
protected |
Definition at line 18 of file XMLMethodRegistry.cpp.
References mTags, and mTagTable.
Referenced by XMLMethodRegistry< Host >::ObjectReaderEntry::ObjectReaderEntry().
|
protected |
Definition at line 67 of file XMLMethodRegistry.cpp.
References mAttributeWriterTable.
Referenced by XMLMethodRegistry< Host >::AttributeWriterEntry::AttributeWriterEntry().
|
protected |
Definition at line 81 of file XMLMethodRegistry.cpp.
References mObjectWriterTable.
Referenced by XMLMethodRegistry< Host >::ObjectWriterEntry::ObjectWriterEntry().
|
protected |
Definition at line 55 of file XMLMethodRegistry.h.
Referenced by CallAttributeHandler(), PushAccessor(), and Register().
|
protected |
Definition at line 74 of file XMLMethodRegistry.h.
Referenced by CallAttributeWriters(), and RegisterAttributeWriter().
|
protected |
Definition at line 63 of file XMLMethodRegistry.h.
Referenced by CallAttributeHandler(), and Register().
|
protected |
Definition at line 64 of file XMLMethodRegistry.h.
Referenced by Register().
|
protected |
Definition at line 78 of file XMLMethodRegistry.h.
Referenced by CallObjectWriters(), and RegisterObjectWriter().
|
protected |
Definition at line 48 of file XMLMethodRegistry.h.
Referenced by Register().
|
protected |
Definition at line 47 of file XMLMethodRegistry.h.
Referenced by CallObjectAccessor(), and Register().