//
// Programmer:    Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Creation Date: Tue Mar 24 18:16:19 PST 2009
// Last Modified: Tue Mar 24 18:16:21 PST 2009
// Filename:      ...sig/examples/all/scorerecordtest.cpp
// Web Address:   http://sig.sapp.org/examples/museinfo/score/scorerecordtest.cpp
// Syntax:        C++; museinfo
//
// Description:   
//

#include "ScorePage.h"
#include "Options.h"
#include "museinfo.h"

#ifndef OLDCPP
   #include <iostream>
#else
   #include <iostream.h>
#endif

// function declarations:
void      checkOptions(Options& opts, int argc, char** argv);
void      example(void);
void      usage(const char* command);

// User interface variables:
Options   options;

//////////////////////////////////////////////////////////////////////////

int main(int argc, char** argv) {
   ScorePage scorepage;

   ScoreRecord srecord;

   srecord.setPValue(1, P1_Staff);
   srecord.setPValue(2, 1);
   srecord.setPValue(5, 0.75);

   scorepage.addItem(srecord);

   srecord.setPValue(1, P1_Note);
   srecord.setPValue(2, 1);
   srecord.setPValue(3, 100.0);
   srecord.setPValue(4, 7.0);
   srecord.setPValue(5, 21.0);

   scorepage.addItem(srecord);


   scorepage.printAscii(cout);


   return 0;
}

//////////////////////////////////////////////////////////////////////////


//////////////////////////////
//
// checkOptions -- 
//

void checkOptions(Options& opts, int argc, char* argv[]) {

   opts.define("author=b",  "author of program"); 
   opts.define("version=b", "compilation info");
   opts.define("example=b", "example usages");   
   opts.define("help=b",  "short description");
   opts.process(argc, argv);
   
   // handle basic options:
   if (opts.getBoolean("author")) {
      cout << "Written by Craig Stuart Sapp, "
           << "craig@ccrma.stanford.edu, Mar 2009" << endl;
      exit(0);
   } else if (opts.getBoolean("version")) {
      cout << argv[0] << ", version: 23 Mar 2009" << endl;
      cout << "compiled: " << __DATE__ << endl;
      cout << MUSEINFO_VERSION << endl;
      exit(0);
   } else if (opts.getBoolean("help")) {
      usage(opts.getCommand());
      exit(0);
   } else if (opts.getBoolean("example")) {
      example();
      exit(0);
   }
   
}



//////////////////////////////
//
// example --
//

void example(void) {


}



//////////////////////////////
//
// usage --
//

void usage(const char* command) {

}



// md5sum: b17f9fee811c0f042b1d011ef0b71bfa scorerecordtest.cpp [20080202]