Verovio
Source code documentation
num.h
1
// Name: num.h
3
// Author: Laurent Pugin
4
// Created: 2018
5
// Copyright (c) Authors and others. All rights reserved.
7
8
#ifndef __VRV_NUM_H__
9
#define __VRV_NUM_H__
10
11
#include "atts_shared.h"
12
#include "text.h"
13
#include "textelement.h"
14
15
namespace
vrv {
16
17
//----------------------------------------------------------------------------
18
// Num (number)
19
//----------------------------------------------------------------------------
20
24
class
Num
:
public
TextElement
{
25
public
:
31
Num
();
32
virtual
~
Num
();
33
Object
*
Clone
()
const override
{
return
new
Num
(*
this
); }
34
void
Reset
()
override
;
35
std::string GetClassName()
const override
{
return
"num"
; }
37
41
bool
IsSupportedChild
(ClassId classId)
override
;
42
47
Text
*
GetCurrentText
() {
return
&m_currentText; }
48
const
Text
*
GetCurrentText
()
const
{
return
&m_currentText; }
50
55
FunctorCode
Accept
(
Functor
&functor)
override
;
56
FunctorCode
Accept
(
ConstFunctor
&functor)
const override
;
57
FunctorCode AcceptEnd(
Functor
&functor)
override
;
58
FunctorCode AcceptEnd(
ConstFunctor
&functor)
const override
;
60
61
private
:
62
//
63
public
:
64
//
65
private
:
70
Text
m_currentText;
71
};
72
73
}
// namespace vrv
74
75
#endif
vrv::ConstFunctor
This abstract class is the base class for all const functors.
Definition:
functor.h:126
vrv::Functor
This abstract class is the base class for all mutable functors.
Definition:
functor.h:101
vrv::Num
This class models the MEI <num> element.
Definition:
num.h:24
vrv::Num::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::Num::GetCurrentText
Text * GetCurrentText()
Return a pointer to the current text object.
Definition:
num.h:47
vrv::Num::IsSupportedChild
bool IsSupportedChild(ClassId classId) override
Add an element (text) to a num.
vrv::Num::Clone
Object * Clone() const override
Method call for copying child classes.
Definition:
num.h:33
vrv::Num::Reset
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
vrv::Object
This class represents a basic object.
Definition:
object.h:61
vrv::TextElement
Definition:
textelement.h:22
vrv::Text
This class models CDATA (text)
Definition:
text.h:23
include
vrv
num.h
Generated on Tue Jun 24 2025 11:27:27 for Verovio by
1.9.1