Generate an accompaniement for a given melody
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Data Class Reference

#include <Database.hpp>

Public Member Functions

 Data (std::string name, ChordProgression c, Melody m)
 constructor for Data More...
 
 Data (std::string name, std::string fileMelody, std::string fileChords)
 constructor for Data from files More...
 
std::string getName () const __attribute__((pure))
 
ChordProgression getChords () const __attribute__((pure))
 
Melody getMelody () const __attribute__((pure))
 
void setName (std::string d)
 Sets the name of the data. More...
 
void setChords (ChordProgression c)
 Sets the chords. More...
 
void setMelody (Melody m)
 Sets the melody. More...
 

Detailed Description

This class is used to store a data in the database. The Chords and the Melody are exactly what their name says. The name is used to find a specific data in the database In fact it will be usefull if and only if there is a mistake. A mistake is storing a pop-music data in jazz.

Constructor & Destructor Documentation

Data::Data ( std::string  name,
ChordProgression  c,
Melody  m 
)

constructor for Data

Parameters
namename of the entry
cchord progression
mmelody
Data::Data ( std::string  name,
std::string  fileMelody,
std::string  fileChords 
)

constructor for Data from files

Parameters
namename of the entry
fileMelodyfile where the melody is stored
fileChordsfile where the chordProgression is stored
Exceptions
std::runtime_errorif something want wrong when reading/parsing the given files

Member Function Documentation

ChordProgression Data::getChords ( ) const

Returns the Chords

Returns
The Chords
Melody Data::getMelody ( ) const

Returns the melody

Returns
The melody
std::string Data::getName ( ) const

Returns the name of the data

Returns
The name of the data
void Data::setChords ( ChordProgression  c)

Sets the chords.

Parameters
kThe Chords.
void Data::setMelody ( Melody  m)

Sets the melody.

Parameters
kThe melody.
void Data::setName ( std::string  d)

Sets the name of the data.

Parameters
kThe Name of the data.

The documentation for this class was generated from the following file: