#pragma once

#include <memory>

class MidiEvent
{
    static const int META_EVENT = 0xFF;  // 1111 1111
    static const int SYSEX_EVENT = 0xF0;
    static const int DIVIDED_SYSEX_EVENT = 0xF7;

public:

    MidiEvent();
    virtual ~MidiEvent() = default;

    static std::unique_ptr<MidiEvent> Create();

    void SetTimeDelta(int delta);

    static bool IsMetaEvent(char c);
    static bool IsSysExEvent(char c);
    static bool IsNormalSysExEvent(char c);
    static bool IsDividedSysExEvent(char c);

private:
    int mTimeDelta{0};
};

using MidiEventPtr = std::unique_ptr<MidiEvent>;
