~s-cecilio/lomse/master

« back to all changes in this revision

Viewing changes to include/lomse_score_iterator.h

  • Committer: cecilios
  • Date: 2010-11-14 17:47:31 UTC
  • Revision ID: git-v1:1fa3764c8c4d338b95b1a537b1e78271170c0025
latest new code. demo_1 tested on linux and win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//--------------------------------------------------------------------------------------
 
1
//---------------------------------------------------------------------------------------
2
2
//  This file is part of the Lomse library.
3
3
//  Copyright (c) 2010 Lomse project
4
4
//
13
13
//  You should have received a copy of the GNU General Public License along
14
14
//  with Lomse; if not, see <http://www.gnu.org/licenses/>.
15
15
//  
16
 
//  
17
 
//
18
16
//  For any comment, suggestion or feature request, please contact the manager of
19
17
//  the project at cecilios@users.sourceforge.net
20
18
//
21
 
//-------------------------------------------------------------------------------------
 
19
//---------------------------------------------------------------------------------------
22
20
 
23
21
#ifndef __LOMSE_SCORE_ITERATOR_H__
24
22
#define __LOMSE_SCORE_ITERATOR_H__
36
34
class ColStaffObjs;
37
35
 
38
36
 
39
 
//-------------------------------------------------------------------------------------
40
37
// ScoreIterator: A cursor to traverse the ColStaffObjs
41
 
//-------------------------------------------------------------------------------------
42
 
 
 
38
//---------------------------------------------------------------------------------------
43
39
class ScoreIterator
44
40
{
45
41
protected:
50
46
    ScoreIterator(ColStaffObjs* pColStaffObjs);
51
47
    ~ScoreIterator();
52
48
 
53
 
 //   inline bool FirstOfCollection() {
54
 
 //                   return (m_pSO && m_pSO == m_pColStaffObjs->GetFirstSO()); }
 
49
    inline bool is_first() { return m_it == m_pColStaffObjs->begin(); }
55
50
 //   inline bool LastOfCollection() {
56
51
 //                   return (m_pSO && m_pSO == m_pColStaffObjs->GetLastSO()); }
57
52
 //   inline bool StartOfCollection() {
58
53
 //                   return FirstOfCollection() || m_pColStaffObjs->IsEmpty(); }
59
 
 //   inline bool EndOfCollection() {
60
 
 //                   return (m_pSO == (lmStaffObj*)NULL || (FirstOfCollection() && m_fEnd)); }
 
54
    inline bool is_end() { return m_it == m_pColStaffObjs->end(); }
61
55
 
62
56
 //   inline bool ChangeOfMeasure() { return m_fChangeOfMeasure; }
63
57
        //inline lmStaffObj* GetCurrent() { return m_pSO; }