GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRPossibleBreakState.h
1 #ifndef GRPossibleBreakState_H
2 #define GRPossibleBreakState_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2002-2017 Grame
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 #include "GRStaff.h" // for GRStaffState
19 
20 template <class T> class KF_IVector;
21 template <class T> class KF_IPointerList;
22 
23 class GRRod;
24 class GRStaff;
25 class GRVoiceManager;
26 class GRVoice;
27 class GRStaffManager;
28 class GRTag;
30 
36 {
37 public:
39  {
40  public:
41  // This is just a pointer for the staff.
43 
44  // this is a REAL Copy of the lastrod of the staff, as found when the Possible Break is encountered.
47  GuidoPos tpos; // tailposition of staff
49 
51  {
52  pstaff = 0;
53  lastrod = 0;
54  firstrod = 0;
55  tpos = 0;
56  }
57 
58  virtual ~GRStaffAndState();
59  void setLastRod(GRRod * plastrod);
60  void setFirstRod(GRRod * pfirstrod);
61  };
62 
64  {
65  public:
67  {
68  public:
70  GuidoPos assocpos;
71  };
72 
73  public:
75  int staffnum;
76  void BeginAfterBreak(GRStaff * newstaff, GuidoPos addpos);
77  void EndAtBreak();
78  // this saves the open tags for
79  // a Voice
81  // KF_IPointerList<GRTag> *grtags;
82 
83  // this is the curstaff for a voice at a pbreak. (needed to close the open tags if needed)
85 
86  // the last rod of the voice.
87  // This is needed to restretch the springs, if this break becomes the real newline.
89 
90  // the first rod of the voice in this section.
91  // This is needed, when adding together spf's or doing "real" breaks.
93 
94  // the staffnum is saved so that tags being reopened after a break know, on which staff
95  // they belong ...
96 
98  {
99  grvoicemgr = pvoicemgr;
100  grtags = 0;
101  lastrod = 0;
102  firstrod = 0;
103  staffnum = -1;
104  }
105 
106  virtual ~GRVoiceTagsAndStaff();
107 
109  void setLastRod(GRRod * plastrod);
110  void setFirstRod(GRRod * pfirstrod);
111  };
112 
113 public:
114  float pbreakval;
115 
116  // this variable hold the SpaceForceFunction for the current breakstate.
119 
121  virtual ~GRPossibleBreakState();
122 
123  KF_IVector<GRStaffAndState> * ssvect; // the staff-state-vector
124  KF_IVector<GRVoiceTagsAndStaff> * vtsvect; // the voicetag-vector
125  int springID; // the springID (StaffManager) at this time
126  GuidoPos simplerodspos;
127  GuidoPos complexrodspos;
128  GuidoPos systemelementendpos; // the position of the last element in the system ...
129  TYPE_TIMEPOSITION tp; // The timeposition of this PBreak
130 
131  float force;
132 
133  void SaveState (KF_IVector<GRStaff> * vstaffs, KF_IVector<GRVoiceManager> * vvcemgrs,
134  GRStaffManager * staffmgr, const TYPE_TIMEPOSITION & curtp,
135  float parforce, float breakval);
136 
137  void ChangeStaffPointers (KF_IVector<GRStaff> * newstaves, GRPossibleBreakState * oldpbs);
138 
139 public:
140  // the lastrod and firstrod saves the rods that are created by the GRStaffManger
141  // itself to adjust overlaps ....
144 
145 };
146 
147 #endif
GRPossibleBreakState::firstrod
GRRod * firstrod
Definition: GRPossibleBreakState.h:143
GRPossibleBreakState::GRVoiceTagsAndStaff::lastrod
GRRod * lastrod
Definition: GRPossibleBreakState.h:88
GRPossibleBreakState::GRStaffAndState::lastrod
GRRod * lastrod
Definition: GRPossibleBreakState.h:45
GRPossibleBreakState::GRVoiceTagsAndStaff::setLastRod
void setLastRod(GRRod *plastrod)
GRPossibleBreakState::ssvect
KF_IVector< GRStaffAndState > * ssvect
Definition: GRPossibleBreakState.h:123
GRPossibleBreakState::force
float force
Definition: GRPossibleBreakState.h:131
GRPossibleBreakState::GRStaffAndState::~GRStaffAndState
virtual ~GRStaffAndState()
GRPossibleBreakState::copyofcompletesff
GRSpaceForceFunction2 * copyofcompletesff
Definition: GRPossibleBreakState.h:118
GRPossibleBreakState::GRStaffAndState::setFirstRod
void setFirstRod(GRRod *pfirstrod)
GRStaffManager
This class manages the staffs of a system.
Definition: GRStaffManager.h:160
Fraction
Numerator and denominator.
Definition: Fraction.h:23
GRPossibleBreakState::~GRPossibleBreakState
virtual ~GRPossibleBreakState()
GRPossibleBreakState::GRStaffAndState::tpos
GuidoPos tpos
Definition: GRPossibleBreakState.h:47
GRPossibleBreakState::GRStaffAndState::pstaff
GRStaff * pstaff
Definition: GRPossibleBreakState.h:42
GRPossibleBreakState::GRVoiceTagsAndStaff::GRTagAndPosition::grtag
GRTag * grtag
Definition: GRPossibleBreakState.h:69
GRPossibleBreakState::pbreakval
float pbreakval
Definition: GRPossibleBreakState.h:114
GRRod
Used with springs and space-force functions.
Definition: GRRod.h:33
GRPossibleBreakState::GRVoiceTagsAndStaff::pstaff
GRStaff * pstaff
Definition: GRPossibleBreakState.h:84
GRPossibleBreakState::systemelementendpos
GuidoPos systemelementendpos
Definition: GRPossibleBreakState.h:128
GRPossibleBreakState::GRVoiceTagsAndStaff::firstrod
GRRod * firstrod
Definition: GRPossibleBreakState.h:92
GRPossibleBreakState::GRVoiceTagsAndStaff::~GRVoiceTagsAndStaff
virtual ~GRVoiceTagsAndStaff()
GRVoiceManager
not yet documented
Definition: GRVoiceManager.h:60
GRPossibleBreakState::GRStaffAndState
Definition: GRPossibleBreakState.h:38
GRPossibleBreakState::lastrod
GRRod * lastrod
Definition: GRPossibleBreakState.h:142
GRStaffState
Keeps information about a staff.
Definition: GRStaff.h:98
GRPossibleBreakState::GRVoiceTagsAndStaff::setFirstRod
void setFirstRod(GRRod *pfirstrod)
GRPossibleBreakState::ChangeStaffPointers
void ChangeStaffPointers(KF_IVector< GRStaff > *newstaves, GRPossibleBreakState *oldpbs)
GRPossibleBreakState::GRVoiceTagsAndStaff::BeginAfterBreak
void BeginAfterBreak(GRStaff *newstaff, GuidoPos addpos)
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
GRPossibleBreakState::simplerodspos
GuidoPos simplerodspos
Definition: GRPossibleBreakState.h:126
GRPossibleBreakState::GRVoiceTagsAndStaff
Definition: GRPossibleBreakState.h:63
KF_IPointerList
Definition: ARMusicalVoiceState.h:33
GRPossibleBreakState::GRStaffAndState::setLastRod
void setLastRod(GRRod *plastrod)
GRSpaceForceFunction2
This class realizes the second implementation of the space-force-function.
Definition: GRSpringForceIndex.h:99
GRPossibleBreakState::springID
int springID
Definition: GRPossibleBreakState.h:125
GRPossibleBreakState::GRVoiceTagsAndStaff::GRVoiceTagsAndStaff
GRVoiceTagsAndStaff(GRVoiceManager *pvoicemgr=0)
Definition: GRPossibleBreakState.h:97
GRPossibleBreakState::GRStaffAndState::GRStaffAndState
GRStaffAndState()
Definition: GRPossibleBreakState.h:50
GRVoice
Graphical representation of a voice.
Definition: GRVoice.h:49
GRPossibleBreakState::complexrodspos
GuidoPos complexrodspos
Definition: GRPossibleBreakState.h:127
GRPossibleBreakState::GRStaffAndState::staffstate
GRStaffState staffstate
Definition: GRPossibleBreakState.h:48
GRPossibleBreakState::tp
TYPE_TIMEPOSITION tp
Definition: GRPossibleBreakState.h:129
KF_IVector
Definition: GRPossibleBreakState.h:20
GRTag
The GRTag class is the base class for all GUIDO tags.
Definition: GRTag.h:37
GRPossibleBreakState::GRStaffAndState::firstrod
GRRod * firstrod
Definition: GRPossibleBreakState.h:46
GRPossibleBreakState::GRVoiceTagsAndStaff::GRTagAndPosition
Definition: GRPossibleBreakState.h:66
GRPossibleBreakState::GRVoiceTagsAndStaff::SaveGRTags
void SaveGRTags(KF_IPointerList< GRTag > *grtags)
GRPossibleBreakState::SaveState
void SaveState(KF_IVector< GRStaff > *vstaffs, KF_IVector< GRVoiceManager > *vvcemgrs, GRStaffManager *staffmgr, const TYPE_TIMEPOSITION &curtp, float parforce, float breakval)
GRPossibleBreakState::GRVoiceTagsAndStaff::grvoicemgr
GRVoiceManager * grvoicemgr
Definition: GRPossibleBreakState.h:74
GRPossibleBreakState::GRVoiceTagsAndStaff::staffnum
int staffnum
Definition: GRPossibleBreakState.h:75
GRPossibleBreakState::vtsvect
KF_IVector< GRVoiceTagsAndStaff > * vtsvect
Definition: GRPossibleBreakState.h:124
GRPossibleBreakState::GRPossibleBreakState
GRPossibleBreakState()
GRPossibleBreakState::GRVoiceTagsAndStaff::GRTagAndPosition::assocpos
GuidoPos assocpos
Definition: GRPossibleBreakState.h:70
GRPossibleBreakState::GRVoiceTagsAndStaff::grtags
KF_IPointerList< GRTagAndPosition > * grtags
Definition: GRPossibleBreakState.h:80
GRPossibleBreakState::sff
GRSpaceForceFunction2 * sff
Definition: GRPossibleBreakState.h:117
GRPossibleBreakState
GRPossibleBreakState saves the states of all structures that are important, if it is decided by the B...
Definition: GRPossibleBreakState.h:35
GRPossibleBreakState::GRVoiceTagsAndStaff::EndAtBreak
void EndAtBreak()

Guido Project Copyright © 2019 Grame-CNCM