GUIDOLib  1.7.7
Guido Engine Internal Documentation
NEPointerList.h
1 #ifndef NEPointerList_H
2 #define NEPointerList_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 
24 #include "NEList.h"
25 #include "kf_ilist.h" // for NEList
26 #include "defines.h" // for TYPE_TIMEPOSITION
27 #include "GUIDOScoreMap.h"
28 
29 class VGDevice;
30 class GObject;
31 class NVPoint;
32 class MapInfos;
33 
34 class NEPointerList : public NEList
35 {
36  public:
37 
38  NEPointerList( const NEPointerList & lst, int ownselements = 0);
39  NEPointerList( int ownselements = 0);
40 
41  virtual ~NEPointerList();
42 
43  void print(std::ostream& os) const;
44  std::string reduce_print() const;
45 
46  virtual void setHPosition( float nx );
47  int getMaxSpacing();
48 
50 
53 
54  void setSpacing(const TYPE_TIMEPOSITION & timePosition, NVPoint & position);
55 
56  void setZeroSpacing(const TYPE_TIMEPOSITION & timePosition,
57  NVPoint &position, int addspace = 1);
58 
59  NEPointerList* getElementsWithTimePosition(const TYPE_TIMEPOSITION & timePosition) const;
60 
62 
63  virtual void OnDraw( VGDevice & hdc ) const;
64  virtual void GetMap( GuidoElementSelector sel, MapCollector& f, MapInfos& infos ) const;
65 
66  virtual void setPosition(const NVPoint & newPosition);
67 
68  // tells all list elements the new position.
69  void tellPosition(GObject * caller, const NVPoint & newPosition);
70 
71  // here some functions for time-sorted insert
73  GuidoPos AddAtTimePosition(const TYPE_TIMEPOSITION & tp, GRNotationElement * grne);
74 };
75 
76 std::ostream & operator << ( std::ostream & os, const NEPointerList* l);
77 
78 
79 #endif
80 
81 
NEPointerList::getNextTimePosition
TYPE_TIMEPOSITION getNextTimePosition(const TYPE_TIMEPOSITION &timePosition)
MapCollector
an abstract class to be provided by clients to collect mappings
Definition: GUIDOScoreMap.h:109
NEPointerList::setZeroSpacing
void setZeroSpacing(const TYPE_TIMEPOSITION &timePosition, NVPoint &position, int addspace=1)
GObject
The base class for all graphic objects.
Definition: GObject.h:54
NEPointerList::AddAtTimePosition
GuidoPos AddAtTimePosition(const TYPE_TIMEPOSITION &tp, GRNotationElement *grne)
NEPointerList::AddAtCorrectTimePosition
GuidoPos AddAtCorrectTimePosition(GRNotationElement *grne)
Fraction
Numerator and denominator.
Definition: Fraction.h:23
KF_IPointerList< GRNotationElement >::ownselements
int ownselements
Definition: kf_ilist.h:48
NEPointerList::print
void print(std::ostream &os) const
GRNotationElement
parent class for all notation elements.
Definition: GRNotationElement.h:54
NVPoint
Definition: NVPoint.h:20
MapInfos
A class to propagate device related information.
Definition: GObject.h:42
NEPointerList::NEPointerList
NEPointerList(const NEPointerList &lst, int ownselements=0)
KF_IPointerList< GRNotationElement >
NEPointerList::GetMap
virtual void GetMap(GuidoElementSelector sel, MapCollector &f, MapInfos &infos) const
NEPointerList::tellPosition
void tellPosition(GObject *caller, const NVPoint &newPosition)
NEPointerList::setPosition
virtual void setPosition(const NVPoint &newPosition)
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
NEPointerList::OnDraw
virtual void OnDraw(VGDevice &hdc) const
NEPointerList::setSpacing
void setSpacing(const TYPE_TIMEPOSITION &timePosition, NVPoint &position)
NEPointerList::~NEPointerList
virtual ~NEPointerList()
NEPointerList::getElementsWithShortestDuration
NEPointerList * getElementsWithShortestDuration()
NEPointerList::getMaxSpacing
int getMaxSpacing()
GuidoElementSelector
GuidoElementSelector
Definition: GUIDOScoreMap.h:40
NEPointerList::reduce_print
std::string reduce_print() const
NEPointerList::setHPosition
virtual void setHPosition(float nx)
operator<<
std::ostream & operator<<(std::ostream &os, const svgendl &eol)
NEPointerList
Definition: NEPointerList.h:34
NEPointerList::getElementWithMaxSpacing
GRNotationElement * getElementWithMaxSpacing()
NEPointerList::getElementsWithTimePosition
NEPointerList * getElementsWithTimePosition(const TYPE_TIMEPOSITION &timePosition) const
NEPointerList::getElementsWithShortestDurationNotNull
NEPointerList * getElementsWithShortestDurationNotNull()

Guido Project Copyright © 2019 Grame-CNCM