MUSX Document Model
Loading...
Searching...
No Matches
Header.h
1/*
2 * Copyright (C) 2025, Robert Patterson
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22#pragma once
23
24#include <string>
25#include <optional>
26
27namespace musx {
28namespace dom {
29
34namespace header {
35
39enum class WordOrder
40{
43};
44
48enum class TextEncoding
49{
50 Mac,
51 Windows,
52 Other
53};
54
58enum class Platform
59{
60 Mac,
61 Windows,
62 Other
63};
64
69{
70 int major{};
71 int minor{};
72 std::optional<int> maint;
73 std::string devStatus;
74 std::optional<int> build;
75};
76
93
104
106using HeaderPtr = std::shared_ptr<Header>;
107
108} // namespace header
109} // namespace dom
110} // namespace musx
TextEncoding
Enum representing the text encoding used in the document.
Definition Header.h:49
@ Other
Other/unknown text encoding.
@ Windows
Windows text encoding.
WordOrder
Enum representing the word order used in the document.
Definition Header.h:40
@ BigEndian
Big-endian word order.
@ LittleEndian
Little-endian word order.
Platform
Enum representing the platform on which the document was created.
Definition Header.h:59
@ Other
Other/unknown platform.
std::shared_ptr< Header > HeaderPtr
Shared Header pointer.
Definition Header.h:106
object model for musx file (enigmaxml)
Definition BaseClasses.h:32
Struct representing a date with associated metadata.
Definition Header.h:81
int year
Year (4 digits)
Definition Header.h:82
std::string modifiedBy
Initials of person who modified the file (often blank)
Definition Header.h:85
FinaleVersion fileVersion
Version of the file format.
Definition Header.h:90
Platform platform
Platform on which the file was created.
Definition Header.h:88
std::string appRegion
Region information (e.g., "US")
Definition Header.h:91
int month
Month (1-12)
Definition Header.h:83
FinaleVersion appVersion
Version of the application.
Definition Header.h:89
int day
Day (1-31)
Definition Header.h:84
FinaleVersion finaleVersion
Version of the Finale software.
Definition Header.h:86
std::string application
Application that created or modified the file.
Definition Header.h:87
Struct representing version information.
Definition Header.h:69
int minor
Minor version number.
Definition Header.h:71
int major
Major version number.
Definition Header.h:70
std::string devStatus
Development status (e.g., "dev", "release")
Definition Header.h:73
std::optional< int > build
Optional build number.
Definition Header.h:74
std::optional< int > maint
Optional maintenance version number.
Definition Header.h:72
Struct representing the header of a document.
Definition Header.h:98
WordOrder wordOrder
Word order used in the document.
Definition Header.h:99
FileInfo created
Creation date and associated metadata.
Definition Header.h:101
TextEncoding textEncoding
Text encoding used in the document.
Definition Header.h:100
FileInfo modified
Modification date and associated metadata.
Definition Header.h:102