#ifndef _GUITAR_ELEMENT_HPP_ #define _GUITAR_ELEMENT_HPP_ #ifndef _COMMON_STRING_HPP_ #include #endif #ifndef _GUITAR_ACTION_HPP_ #include #endif class Element { public: Element(); Element(int fret,Action action=Action::None); virtual ~Element(); Action::Attribute getAction(void)const; void setAction(Action::Attribute action); void setFret(int fret); int getFret(void)const; String toString(void)const; private: int mFret; Action mAction; }; inline Element::Element() : mFret(0) { } inline Element::Element(int fret,Action action) : mFret(fret), mAction(action) { } inline Element::~Element() { } inline Action::Attribute Element::getAction(void)const { return mAction.getAction(); } inline void Element::setAction(Action::Attribute action) { mAction.setAction(action); } inline int Element::getFret(void)const { return mFret; } inline void Element::setFret(int fret) { mFret=fret; } inline String Element::toString(void)const { return mAction.toString()+String(" ")+String().fromInt(mFret); } #endif