Verovio
Source code documentation
facsimilefunctor.h
1
// Name: facsimilefunctor.h
3
// Author: Laurent Pugin
4
// Created: 2023
5
// Copyright (c) Authors and others. All rights reserved.
7
8
#ifndef __VRV_FACSIMILEFUNCTOR_H__
9
#define __VRV_FACSIMILEFUNCTOR_H__
10
11
#include "functor.h"
12
#include "view.h"
13
14
namespace
vrv {
15
16
class
LayerElement;
17
class
Measure;
18
class
Page;
19
class
Pb;
20
class
Sb;
21
class
Staff;
22
class
Surface;
23
class
System;
24
25
//----------------------------------------------------------------------------
26
// SyncFromFacsimileFunctor
27
//----------------------------------------------------------------------------
28
32
class
SyncFromFacsimileFunctor
:
public
Functor
{
33
public
:
37
SyncFromFacsimileFunctor
(
Doc
*doc);
39
virtual
~
SyncFromFacsimileFunctor
() =
default
;
41
42
/*
43
* Abstract base implementation
44
*/
45
bool
ImplementsEndInterface
()
const override
{
return
true
; }
46
47
/*
48
* Functor interface
49
*/
51
FunctorCode VisitLayerElement(
LayerElement
*layerElement)
override
;
52
FunctorCode VisitMeasure(
Measure
*measure)
override
;
53
FunctorCode VisitPage(
Page
*page)
override
;
54
FunctorCode VisitPageEnd(
Page
*page)
override
;
55
FunctorCode VisitPb(
Pb
*pb)
override
;
56
FunctorCode VisitSb(
Sb
*sb)
override
;
57
FunctorCode VisitStaff(
Staff
*staff)
override
;
58
FunctorCode VisitSystem(
System
*system)
override
;
60
61
protected
:
62
//
63
private
:
64
//
65
public
:
66
//
67
private
:
69
Doc
*m_doc;
70
//
71
View
m_view;
72
//
73
Page
*m_currentPage;
74
System
*m_currentSystem;
75
Measure
*m_currentNeumeLine;
77
std::map<Staff *, Zone *> m_staffZones;
78
//
79
int
m_pageMarginTop;
80
int
m_pageMarginLeft;
81
//
82
double
m_ppuFactor;
83
};
84
85
//----------------------------------------------------------------------------
86
// SyncToFacsimileFunctor
87
//----------------------------------------------------------------------------
88
92
class
SyncToFacsimileFunctor
:
public
Functor
{
93
public
:
97
SyncToFacsimileFunctor
(
Doc
*doc,
double
ppuFactor);
99
virtual
~
SyncToFacsimileFunctor
() =
default
;
101
102
/*
103
* Abstract base implementation
104
*/
105
bool
ImplementsEndInterface
()
const override
{
return
true
; }
106
107
/*
108
* Functor interface
109
*/
111
FunctorCode VisitLayerElement(
LayerElement
*layerElement)
override
;
112
FunctorCode VisitMeasure(
Measure
*measure)
override
;
113
FunctorCode VisitPage(
Page
*page)
override
;
114
FunctorCode VisitPageEnd(
Page
*page)
override
;
115
FunctorCode VisitPb(
Pb
*pb)
override
;
116
FunctorCode VisitSb(
Sb
*sb)
override
;
117
FunctorCode VisitStaff(
Staff
*staff)
override
;
118
FunctorCode VisitSystem(
System
*system)
override
;
120
121
protected
:
122
//
123
private
:
125
Zone
*GetZone(
FacsimileInterface
*interface, std::string type);
126
127
public
:
128
//
129
private
:
131
Doc
*m_doc;
132
//
133
View
m_view;
135
Surface
*m_surface;
136
//
137
Page
*m_currentPage;
138
System
*m_currentSystem;
139
//
140
int
m_pageMarginTop;
141
int
m_pageMarginLeft;
142
// A flag indicating we are dealing with a neume line
143
bool
m_currentNeumeLine;
144
//
145
double
m_ppuFactor;
146
};
147
148
}
// namespace vrv
149
150
#endif // __VRV_FACSIMILEFUNCTOR_H__
vrv::Staff
This class represents a staff in a laid-out score (Doc).
Definition:
staff.h:102
vrv::Measure
This class represents a measure in a page-based score (Doc).
Definition:
measure.h:37
vrv::SyncToFacsimileFunctor::ImplementsEndInterface
bool ImplementsEndInterface() const override
Return true if the functor implements the end interface.
Definition:
facsimilefunctor.h:105
vrv::SyncToFacsimileFunctor
This class sync the layout calculated to the facsimile.
Definition:
facsimilefunctor.h:92
vrv::Zone
Implements the zone element in MEI.
Definition:
zone.h:30
vrv::Doc
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition:
doc.h:41
vrv::Surface
Implements the surface element in MEI.
Definition:
surface.h:30
vrv::SyncFromFacsimileFunctor
This class sync the layout encoded in the facsimile to m_Abs members.
Definition:
facsimilefunctor.h:32
vrv::Functor
This abstract class is the base class for all mutable functors.
Definition:
functor.h:101
vrv::Pb
This class represents a MEI pb in score-based MEI.
Definition:
pb.h:25
vrv::Page
This class represents a page in a laid-out score (Doc).
Definition:
page.h:31
vrv::Sb
This class represents a MEI sb in score-based MEI.
Definition:
sb.h:25
vrv::FacsimileInterface
Definition:
facsimileinterface.h:27
vrv::System
This class represents a system in a laid-out score (Doc).
Definition:
system.h:36
vrv::SyncFromFacsimileFunctor::ImplementsEndInterface
bool ImplementsEndInterface() const override
Return true if the functor implements the end interface.
Definition:
facsimilefunctor.h:45
vrv::View
This class is a drawing context and corresponds to the view of a MVC design pattern.
Definition:
view.h:105
vrv::LayerElement
This class is a base class for the Layer (<layer>) content.
Definition:
layerelement.h:46
include
vrv
facsimilefunctor.h
Generated on Fri Apr 4 2025 06:58:35 for Verovio by
1.8.17