MUSX Document Model
|
A registry of types for mapping XML node names to types. More...
#include <TypeRegistry.h>
Static Public Member Functions | |
template<typename PoolPtr , typename... Args> | |
static std::shared_ptr< Base > | createInstance (const PoolPtr &pool, const XmlElementPtr &node, ElementLinker &elementLinker, const DocumentPtr &document, Args &&... args) |
Creates an instance of the registered type corresponding to the provided node name. | |
A registry of types for mapping XML node names to types.
This template struct provides a mechanism to map XML node names to their corresponding types and supports instantiation of types based on these names.
Types | The list of types to be registered. |
|
inlinestatic |
Creates an instance of the registered type corresponding to the provided node name.
Uses the node name to look up the registered type and create an instance of it.
PoolPtr | The object pool type for getting score versions (when doing part linkage) |
Args | The argument types required by the constructor of the target type. |
pool | The object pool for getting score versions (when doing part linkage) |
node | The XML node from which an instance is to be created. |
elementLinker | The ElementLinker instance that is used to resolve all internal connections after the document is created. |
document | The document that we are creating the instance for. |
args | Arguments to be forwarded to the constructor of the target type. |