Files
Work/guitar/backup/20030501/TabEntry.hpp
2024-08-07 09:16:27 -04:00

74 lines
1.4 KiB
C++

#ifndef _GUITAR_TABENTRY_HPP_
#define _GUITAR_TABENTRY_HPP_
#ifndef _COMMON_BLOCK_HPP_
#include <common/block.hpp>
#endif
#ifndef _GUITAR_FRETTEDNOTE_HPP_
#include <guitar/FrettedNote.hpp>
#endif
#ifndef _GUITAR_NOTETYPE_HPP_
#include <guitar/NoteType.hpp>
#endif
#ifndef _GUITAR_TIMING_HPP_
#include <guitar/timing.hpp>
#endif
class MIDIOutputDevice;
class TabEntry;
typedef Block<TabEntry> TabEntries;
class TabEntry : public Block<FrettedNote>
{
public:
TabEntry();
TabEntry(const TabEntry &entry);
virtual ~TabEntry();
bool play(MIDIOutputDevice &midiDevice,bool useDelay=true);
bool operator==(const TabEntry &entry)const;
TabEntry &operator=(const TabEntry &entry);
const NoteType &getNoteType(void)const;
void setNoteType(const NoteType &noteType);
String toString(void)const;
bool fromString(String strText);
bool contains(int string,int &entryIndex);
bool contains(int string);
bool remove(int string,int fret);
void remove(void);
bool addFrettedNote(int string,const FrettedNote &frettedNote);
bool setFrettedNote(int string,const FrettedNote &frettedNote);
private:
void delay(void);
NoteType mNoteType;
};
inline
TabEntry::TabEntry()
{
}
inline
TabEntry::~TabEntry()
{
}
inline
const NoteType &TabEntry::getNoteType(void)const
{
return mNoteType;
}
inline
void TabEntry::setNoteType(const NoteType &noteType)
{
mNoteType=noteType;
}
inline
void TabEntry::remove(void)
{
Block<FrettedNote>::remove();
}
#endif