Initial
This commit is contained in:
104
midiwrt/PUREINST.HPP
Normal file
104
midiwrt/PUREINST.HPP
Normal file
@@ -0,0 +1,104 @@
|
||||
#ifndef _PUREINSTRUMENT_HPP_
|
||||
#define _PUREINSTRUMENT_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#include <common/string.hpp>
|
||||
|
||||
class PureInstrument
|
||||
{
|
||||
public:
|
||||
PureInstrument(void);
|
||||
PureInstrument(const PureInstrument &somePureInstrument);
|
||||
PureInstrument(WORD ordinal,String category,String name);
|
||||
~PureInstrument();
|
||||
WORD operator==(const PureInstrument &somePureInstrument)const;
|
||||
PureInstrument &operator=(const PureInstrument &somePureInstrument);
|
||||
WORD ordinal(void)const;
|
||||
String category(void)const;
|
||||
String name(void)const;
|
||||
void ordinal(WORD ordinal);
|
||||
void category(String category);
|
||||
void name(String name);
|
||||
private:
|
||||
enum {Semicolon=';'};
|
||||
WORD mOrdinal;
|
||||
String mCategory;
|
||||
String mName;
|
||||
};
|
||||
|
||||
inline
|
||||
PureInstrument::PureInstrument(void)
|
||||
: mOrdinal(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PureInstrument::PureInstrument(const PureInstrument &somePureInstrument)
|
||||
: mOrdinal(somePureInstrument.mOrdinal), mCategory(somePureInstrument.mCategory),
|
||||
mName(somePureInstrument.mName)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PureInstrument::PureInstrument(WORD ordinal,String category,String name)
|
||||
: mOrdinal(ordinal), mCategory(category), mName(name)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PureInstrument::~PureInstrument()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
WORD PureInstrument::ordinal(void)const
|
||||
{
|
||||
return mOrdinal;
|
||||
}
|
||||
|
||||
inline
|
||||
String PureInstrument::category(void)const
|
||||
{
|
||||
return mCategory;
|
||||
}
|
||||
|
||||
inline
|
||||
String PureInstrument::name(void)const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureInstrument::ordinal(WORD ordinal)
|
||||
{
|
||||
mOrdinal=ordinal;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureInstrument::category(String category)
|
||||
{
|
||||
mCategory=category;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureInstrument::name(String name)
|
||||
{
|
||||
mName=name;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD PureInstrument::operator==(const PureInstrument &somePureInstrument)const
|
||||
{
|
||||
return (mOrdinal==somePureInstrument.mOrdinal&&
|
||||
mCategory==somePureInstrument.mCategory&&
|
||||
mName==somePureInstrument.mName);
|
||||
}
|
||||
|
||||
inline
|
||||
PureInstrument &PureInstrument::operator=(const PureInstrument &somePureInstrument)
|
||||
{
|
||||
mOrdinal=somePureInstrument.mOrdinal;
|
||||
mCategory=somePureInstrument.mCategory;
|
||||
mName=somePureInstrument.mName;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user