Browse Source

cmScore.h/c: Added cmScoreSetCount().

master
kevin 11 years ago
parent
commit
ec73cb280b
2 changed files with 15 additions and 6 deletions
  1. 6
    0
      app/cmScore.c
  2. 9
    6
      app/cmScore.h

+ 6
- 0
app/cmScore.c View File

@@ -1330,6 +1330,12 @@ void cmScorePrintLoc( cmScH_t h )
1330 1330
   }
1331 1331
 }
1332 1332
 
1333
+unsigned cmScoreSetCount( cmScH_t h )
1334
+{
1335
+  cmSc_t* p = _cmScHandleToPtr(h);
1336
+  return p->setCnt;
1337
+}
1338
+
1333 1339
 cmScRC_t      cmScoreSeqNotify( cmScH_t h )
1334 1340
 {
1335 1341
   cmScRC_t  rc = kOkScRC;

+ 9
- 6
app/cmScore.h View File

@@ -61,12 +61,12 @@ extern "C" {
61 61
   // The score can be divided into arbitrary non-overlapping sections.
62 62
   typedef struct
63 63
   {
64
-    const cmChar_t*         label;      // section label
65
-    unsigned                index;      // index of this record in the internal section array
66
-    struct cmScoreLoc_str*  locPtr;     // location where this section starts
67
-    unsigned                begEvtIndex;   // score element index where this section starts    
68
-    unsigned                setCnt;     // Count of elements in setArray[]
69
-    struct cmScoreSet_str** setArray;   // Ptrs to sets which are applied to this section.
64
+    const cmChar_t*         label;             // section label
65
+    unsigned                index;             // index of this record in the internal section array
66
+    struct cmScoreLoc_str*  locPtr;            // location where this section starts
67
+    unsigned                begEvtIndex;       // score element index where this section starts    
68
+    unsigned                setCnt;            // Count of elements in setArray[]
69
+    struct cmScoreSet_str** setArray;          // Ptrs to sets which are applied to this section.
70 70
     double                  vars[ kScVarCnt ]; // Set to DBL_MAX by default.
71 71
   } cmScoreSection_t;
72 72
 
@@ -154,6 +154,9 @@ extern "C" {
154 154
   cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx );
155 155
   void          cmScorePrintLoc( cmScH_t h );
156 156
 
157
+  // Return the count of sets.
158
+  unsigned      cmScoreSetCount( cmScH_t h );
159
+
157 160
   // Make callbacks for all events in the score. The callbacks
158 161
   // contain cmScMsg_t records serialized as a byte stream.
159 162
   // Use cmScoreDecode() to convert the byte string to a

Loading…
Cancel
Save