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
27
namespace
musx
{
28
namespace
dom {
29
34
namespace
header {
35
39
enum class
WordOrder
40
{
41
LittleEndian
,
42
BigEndian
43
};
44
48
enum class
TextEncoding
49
{
50
Mac
,
51
Windows
,
52
Other
53
};
54
58
enum class
Platform
59
{
60
Mac
,
61
Windows
,
62
Other
63
};
64
68
struct
FinaleVersion
69
{
70
int
major
{};
71
int
minor
{};
72
std::optional<int>
maint
;
73
std::string
devStatus
;
74
std::optional<int>
build
;
75
};
76
80
struct
FileInfo
81
{
82
int
year
{};
83
int
month
{};
84
int
day
{};
85
std::string
modifiedBy
;
86
FinaleVersion
finaleVersion
;
87
std::string
application
;
88
Platform
platform
=
Platform::Other
;
89
FinaleVersion
appVersion
;
90
FinaleVersion
fileVersion
;
91
std::string
appRegion
;
92
};
93
97
struct
Header
98
{
99
WordOrder
wordOrder
=
WordOrder::LittleEndian
;
100
TextEncoding
textEncoding
=
TextEncoding::Other
;
101
FileInfo
created
;
102
FileInfo
modified
;
103
};
104
106
using
HeaderPtr
= std::shared_ptr<Header>;
107
108
}
// namespace header
109
}
// namespace dom
110
}
// namespace musx
musx::dom::header::TextEncoding
TextEncoding
Enum representing the text encoding used in the document.
Definition
Header.h:49
musx::dom::header::TextEncoding::Mac
@ Mac
Mac text encoding.
musx::dom::header::TextEncoding::Other
@ Other
Other/unknown text encoding.
musx::dom::header::TextEncoding::Windows
@ Windows
Windows text encoding.
musx::dom::header::WordOrder
WordOrder
Enum representing the word order used in the document.
Definition
Header.h:40
musx::dom::header::WordOrder::BigEndian
@ BigEndian
Big-endian word order.
musx::dom::header::WordOrder::LittleEndian
@ LittleEndian
Little-endian word order.
musx::dom::header::Platform
Platform
Enum representing the platform on which the document was created.
Definition
Header.h:59
musx::dom::header::Platform::Other
@ Other
Other/unknown platform.
musx::dom::header::HeaderPtr
std::shared_ptr< Header > HeaderPtr
Shared Header pointer.
Definition
Header.h:106
musx
object model for musx file (enigmaxml)
Definition
BaseClasses.h:32
musx::dom::header::FileInfo
Struct representing a date with associated metadata.
Definition
Header.h:81
musx::dom::header::FileInfo::year
int year
Year (4 digits)
Definition
Header.h:82
musx::dom::header::FileInfo::modifiedBy
std::string modifiedBy
Initials of person who modified the file (often blank)
Definition
Header.h:85
musx::dom::header::FileInfo::fileVersion
FinaleVersion fileVersion
Version of the file format.
Definition
Header.h:90
musx::dom::header::FileInfo::platform
Platform platform
Platform on which the file was created.
Definition
Header.h:88
musx::dom::header::FileInfo::appRegion
std::string appRegion
Region information (e.g., "US")
Definition
Header.h:91
musx::dom::header::FileInfo::month
int month
Month (1-12)
Definition
Header.h:83
musx::dom::header::FileInfo::appVersion
FinaleVersion appVersion
Version of the application.
Definition
Header.h:89
musx::dom::header::FileInfo::day
int day
Day (1-31)
Definition
Header.h:84
musx::dom::header::FileInfo::finaleVersion
FinaleVersion finaleVersion
Version of the Finale software.
Definition
Header.h:86
musx::dom::header::FileInfo::application
std::string application
Application that created or modified the file.
Definition
Header.h:87
musx::dom::header::FinaleVersion
Struct representing version information.
Definition
Header.h:69
musx::dom::header::FinaleVersion::minor
int minor
Minor version number.
Definition
Header.h:71
musx::dom::header::FinaleVersion::major
int major
Major version number.
Definition
Header.h:70
musx::dom::header::FinaleVersion::devStatus
std::string devStatus
Development status (e.g., "dev", "release")
Definition
Header.h:73
musx::dom::header::FinaleVersion::build
std::optional< int > build
Optional build number.
Definition
Header.h:74
musx::dom::header::FinaleVersion::maint
std::optional< int > maint
Optional maintenance version number.
Definition
Header.h:72
musx::dom::header::Header
Struct representing the header of a document.
Definition
Header.h:98
musx::dom::header::Header::wordOrder
WordOrder wordOrder
Word order used in the document.
Definition
Header.h:99
musx::dom::header::Header::created
FileInfo created
Creation date and associated metadata.
Definition
Header.h:101
musx::dom::header::Header::textEncoding
TextEncoding textEncoding
Text encoding used in the document.
Definition
Header.h:100
musx::dom::header::Header::modified
FileInfo modified
Modification date and associated metadata.
Definition
Header.h:102
src
musx
dom
Header.h
Generated by
1.9.8