MUSX Document Model
Loading...
Searching...
No Matches
musx::factory::DocumentFactory Class Reference

Factory class for creating Document objects from XML. More...

#include <DocumentFactory.h>

+ Inheritance diagram for musx::factory::DocumentFactory:

Static Public Member Functions

template<typename XmlDocumentType >
static DocumentPtr create (const char *data, size_t size)
 Creates a Document object from an XML buffer.
 
template<typename XmlDocumentType >
static DocumentPtr create (const std::vector< char > &xmlBuffer)
 Creates a Document object from an XML buffer.
 

Detailed Description

Factory class for creating Document objects from XML.

Member Function Documentation

◆ create() [1/2]

template<typename XmlDocumentType >
static DocumentPtr musx::factory::DocumentFactory::create ( const char *  data,
size_t  size 
)
inlinestatic

Creates a Document object from an XML buffer.

Parameters
dataPointer to a buffer containing EnigmaXML for a musx file.
sizeThe size of the buffer.
Returns
A fully populated Document object.
Exceptions
std::invalid_argumentIf required nodes or attributes are missing or invalid.

◆ create() [2/2]

template<typename XmlDocumentType >
static DocumentPtr musx::factory::DocumentFactory::create ( const std::vector< char > &  xmlBuffer)
inlinestatic

Creates a Document object from an XML buffer.

Parameters
xmlBufferBuffer containing EnigmaXML for a musx file.
Returns
A fully populated Document object.
Exceptions
std::invalid_argumentIf required nodes or attributes are missing or invalid.