src/HumdrumFileBase.cpp
vector<int> HumdrumFileBase::getMeasureNumbers(void) {
	HumdrumFileBase& infile = *this;
	vector<int> output(infile.getLineCount(), -1);
	int lastmeasure = -1;
	int current;
	for (int i=0; i<infile.getLineCount(); i++) {
		if (infile[i].isBarline()) {
			current = infile.getMeasureNumber(i);
			if (current >= 0) {
				lastmeasure = current;
			}
		}
		output[i] = lastmeasure;
	}
	return output;
}
//////////////////////////////
//
// HumdrumFileBase::getMeasureNumbers -- Return a list of measures numbers
//    in the file indexed by line. A value of -1 means no measure number.
//
:getMeasureNumbers -- Return a list of measures numbers
in the file indexed by line. A value of -1 means no measure number.
: getMeasureNumbers -- Return a list of measures numbers in the file indexed by line . A value of - 1 means no measure number .
vector<int> HumdrumFileBase::getMeasureNumbers(void) {
	HumdrumFileBase& infile = *this;
	vector<int> output(infile.getLineCount(), -1);
	int lastmeasure = -1;
	int current;
	for (int i=0; i<infile.getLineCount(); i++) {
		if (infile[i].isBarline()) {
			current = infile.getMeasureNumber(i);
			if (current >= 0) {
				lastmeasure = current;
			}
		}
		output[i] = lastmeasure;
	}
	return output;
}
vector < int > HumdrumFileBase :: getMeasureNumbers ( void ) { HumdrumFileBase & infile = * this ; vector < int > output ( infile . getLineCount ( ) , -1 ) ; int lastmeasure = -1 ; int current ; for ( int i = 0 ; i < infile . getLineCount ( ) ; i ++ ) { if ( infile [ i ] . isBarline ( ) ) { current = infile . getMeasureNumber ( i ) ; if ( current >= 0 ) { lastmeasure = current ; } } output [ i ] = lastmeasure ; } return output ; }
HumdrumFileBase::getMeasureNumbers -- Return a list of measures numbers
in the file indexed by line.
HumdrumFileBase :: getMeasureNumbers -- Return a list of measures numbers in the file indexed by line .