// Note: Instrumentation statements are highlighted in green 

#ifndef __FRET_HPP
#define __FRET_HPP

#include "note.hpp"
#include "guitar_string.hpp"

///////////////////////////////////////////////////////////////////////////////
// Fret class
///////////////////////////////////////////////////////////////////////////////

class Fret : public VObject  // Add VObject to the inheritance chain
{
DECLARE_VISIBILITY(Fret)  // Instrumentation statement

public:    // data
  unsigned short number;
  float xPosition;

public:    // functions
  Fret(void);
  Fret(unsigned short fret_numunber, float x_position);
  Fret(const Fret & fret);
  virtual ~Fret(void);
  Fret & operator=(const Fret & fret);
   bool operator==(const Fret & fret) const;

  virtual unsigned short getPosition(float x_origin, float y_origin,
                             float & object_x, float & object_y,
                             unsigned short coord_type);
  virtual unsigned short setPosition(float x_origin, float y_origin,
                             float object_x, float object_y,
                             unsigned short coord_type);
};
DECLARE_VISIBILITY_CREATOR(Fret)  // Instrumentation statement

///////////////////////////////////////////////////////////////////////////////
// FretTable class
///////////////////////////////////////////////////////////////////////////////

typedef vvector<Fret> FretVector;

class FretTable : public VObject  // Add VObject to the inheritance chain
{
DECLARE_VISIBILITY(FretTable)  // Instrumentation statement

public:    // data

  FretVector fretTable;

public:    // functions
  FretTable(void);
  FretTable(const FretTable & fret);
  virtual ~FretTable(void);
  FretTable & operator=(const FretTable &fret);
  void AddFret(Fret & a_fret);
};
DECLARE_VISIBILITY_CREATOR(FretTable)  // Instrumentation statement

///////////////////////////////////////////////////////////////////////////////
// FrettedNote class 
///////////////////////////////////////////////////////////////////////////////

class FrettedNote : public Note  // Add VObject to the inheritance chain
{
DECLARE_VISIBILITY(FrettedNote)  // Instrumentation statement

public:    // data
  GuitarString guitarString;
  Fret guitarFret;

public:    // functions
  FrettedNote(void);
  FrettedNote(Note & note, Fret & guitar_fret, GuitarString & guitar_string);
  FrettedNote(const FrettedNote & fretted_note);
  virtual ~FrettedNote(void);
  FrettedNote & operator=(const FrettedNote &fretted_note);
  bool operator==(const FrettedNote &fretted_note) const;
  unsigned short GetFretNumber(void) {return guitarFret.number;};

  virtual unsigned short getPosition(float x_origin, float y_origin,
                             float & object_x, float & object_y,
                             unsigned short coord_type);
  virtual unsigned short setPosition(float x_origin, float y_origin,
                             float object_x, float object_y,
                             unsigned short coord_type);

};
DECLARE_VISIBILITY_CREATOR(FrettedNote)  // Instrumentation statement

///////////////////////////////////////////////////////////////////////////////
// FrettedNoteTable class
///////////////////////////////////////////////////////////////////////////////

typedef vvector<FrettedNote> FrettedNoteVector;

class FrettedNoteTable : public VObject  // Add VObject to the inheritance chain
{
DECLARE_VISIBILITY(FrettedNoteTable)  // Instrumentation statement

public:    // data

  typedef FrettedNoteVector::iterator iterator;
  FrettedNoteVector frettedNoteTable;

public:    // functions
  FrettedNoteTable(void);
  FrettedNoteTable(const FrettedNoteTable & fretted_note);
  virtual ~FrettedNoteTable(void);
  virtual void populateEditView(void);
  virtual void depopulateEditView(void);
  FrettedNoteTable & operator=(const FrettedNoteTable &fretted_note);
  void AddNote(FrettedNote & note);
  void Clear(void);
  FrettedNote * FindFrettedNote(unsigned short midi_number);
  iterator begin(void) {return frettedNoteTable.begin();};
  iterator end(void) {return frettedNoteTable.end();};
};
DECLARE_VISIBILITY_CREATOR(FrettedNoteTable)  // Instrumentation statement

#endif // __FRET_HPP



Copyright 2002-2007 Outerface Technologies, Inc.