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

Creates and finalizes musxdom documents from XML or client-provided data. More...

#include <DocumentFactory.h>

Classes

struct  ConstructionOptions
 Normalized inputs for a non-XML document construction session. More...
 
class  ConstructionSession
 A move-only draft document that can be populated and finalized exactly once. More...
 
struct  CreateOptions
 Optional inputs accepted by the existing XML creation interface. More...
 

Public Types

template<typename Container >
using IsCharContainer = std::enable_if_t<(sizeof(std::remove_cv_t< typename Container::value_type >)==1) &&!std::is_same_v< std::remove_cv_t< typename Container::value_type >, bool > >
 

Static Public Member Functions

static ConstructionSession begin ()
 Begins construction of a document from client-provided data.
 
static ConstructionSession begin (ConstructionOptions options)
 
template<typename XmlDocumentType >
static DocumentPtr create (const char *data, size_t size)
 
template<typename XmlDocumentType , typename Container , typename = IsCharContainer<Container>>
static DocumentPtr create (const Container &xmlBuffer)
 
template<typename XmlDocumentType >
static DocumentPtr create (const char *data, size_t size, CreateOptions &&createOptions)
 
template<typename XmlDocumentType , typename Container , typename = IsCharContainer<Container>>
static DocumentPtr create (const Container &xmlBuffer, CreateOptions &&createOptions)
 

Detailed Description

Creates and finalizes musxdom documents from XML or client-provided data.