48 lines
713 B
C++
48 lines
713 B
C++
#ifndef _MUSIC_EMITTER_HPP_
|
|
#define _MUSIC_EMITTER_HPP_
|
|
#ifndef _COMMON_PUREBYTE_HPP_
|
|
#include <common/purebyte.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
#ifndef _COMMON_BLOCK_HPP_
|
|
#include <common/block.hpp>
|
|
#endif
|
|
|
|
namespace Music
|
|
{
|
|
|
|
typedef PureBYTE Byte;
|
|
|
|
class Emitter : public Block<Byte>
|
|
{
|
|
public:
|
|
Emitter();
|
|
virtual ~Emitter();
|
|
void emit(const Byte &key,const Byte &value);
|
|
void emit(const Byte &key,const String &value);
|
|
void emit(const Byte &key);
|
|
String toString(void)const;
|
|
private:
|
|
};
|
|
|
|
inline
|
|
Emitter::Emitter()
|
|
{
|
|
}
|
|
|
|
inline
|
|
Emitter::~Emitter()
|
|
{
|
|
}
|
|
|
|
inline
|
|
void Emitter::emit(const Byte &byte,const Byte &value)
|
|
{
|
|
insert(&byte);
|
|
insert(&value);
|
|
}
|
|
};
|
|
#endif
|