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

Optional arguments for document creation. More...

#include <DocumentFactory.h>

Classes

struct  EmbeddedGraphicFile
 Raw embedded graphic file payload from a musx archive. More...
 

Public Types

using EmbeddedGraphicFiles = std::vector< EmbeddedGraphicFile >
 Embedded graphic files provided by caller.
 

Public Member Functions

 CreateOptions ()=default
 Default constructor.
 
 CreateOptions (dom::PartVoicingPolicy policy)
 Construct options with a part-voicing policy.
 
 CreateOptions (std::vector< char > &&notationMetadata)
 Construct options by moving in NotationMetadata.xml bytes.
 
 CreateOptions (EmbeddedGraphicFiles &&embeddedGraphicFiles)
 Construct options by moving embedded graphic files.
 
template<typename Container , typename = IsCharContainer<Container>>
 CreateOptions (const Container &notationMetadata)
 Construct options by copying a 1-byte-element metadata buffer.
 
const std::vector< char > & getNotationMetadata () const
 Optional NotationMetadata.xml content.
 
const dom::EmbeddedGraphicsMapgetEmbeddedGraphics () const
 Embedded graphics keyed by graphic cmper.
 
dom::EmbeddedGraphicsMap takeEmbeddedGraphics ()
 Move out embedded graphics.
 
template<typename Container , typename = IsCharContainer<Container>>
void setNotationMetadata (const Container &notationMetadata)
 Set NotationMetadata.xml by copying from a 1-byte-element buffer.
 
void setNotationMetadata (std::vector< char > &&notationMetadata)
 Set NotationMetadata.xml by moving an existing std::vector<char>.
 
void setEmbeddedGraphics (EmbeddedGraphicFiles &&embeddedGraphicFiles)
 Set embedded graphics by parsing moved archive files in cmper.ext form.
 

Public Attributes

dom::PartVoicingPolicy partVoicingPolicy = dom::PartVoicingPolicy::Ignore
 Part voicing behavior for this document.
 

Detailed Description

Optional arguments for document creation.

Constructor & Destructor Documentation

◆ CreateOptions() [1/4]

musx::factory::DocumentFactory::CreateOptions::CreateOptions ( dom::PartVoicingPolicy  policy)
inline

Construct options with a part-voicing policy.

Parameters
policyThe policy to apply for this document.

◆ CreateOptions() [2/4]

musx::factory::DocumentFactory::CreateOptions::CreateOptions ( std::vector< char > &&  notationMetadata)
inline

Construct options by moving in NotationMetadata.xml bytes.

Parameters
notationMetadataBuffer containing NotationMetadata.xml.

◆ CreateOptions() [3/4]

musx::factory::DocumentFactory::CreateOptions::CreateOptions ( EmbeddedGraphicFiles &&  embeddedGraphicFiles)
inline

Construct options by moving embedded graphic files.

Parameters
embeddedGraphicFilesEmbedded graphic files in cmper.ext form.

◆ CreateOptions() [4/4]

template<typename Container , typename = IsCharContainer<Container>>
musx::factory::DocumentFactory::CreateOptions::CreateOptions ( const Container &  notationMetadata)
inline

Construct options by copying a 1-byte-element metadata buffer.

Template Parameters
ContainerA contiguous container with 1-byte element type.
Parameters
notationMetadataBuffer containing NotationMetadata.xml.

Member Function Documentation

◆ setEmbeddedGraphics()

void musx::factory::DocumentFactory::CreateOptions::setEmbeddedGraphics ( EmbeddedGraphicFiles &&  embeddedGraphicFiles)
inline

Set embedded graphics by parsing moved archive files in cmper.ext form.

Parameters
embeddedGraphicFilesEmbedded graphic files from the musx archive.

◆ setNotationMetadata() [1/2]

template<typename Container , typename = IsCharContainer<Container>>
void musx::factory::DocumentFactory::CreateOptions::setNotationMetadata ( const Container &  notationMetadata)
inline

Set NotationMetadata.xml by copying from a 1-byte-element buffer.

Template Parameters
ContainerA contiguous container with 1-byte element type.
Parameters
notationMetadataBuffer containing NotationMetadata.xml.

◆ setNotationMetadata() [2/2]

void musx::factory::DocumentFactory::CreateOptions::setNotationMetadata ( std::vector< char > &&  notationMetadata)
inline

Set NotationMetadata.xml by moving an existing std::vector<char>.

Parameters
notationMetadataBuffer containing NotationMetadata.xml.