#pragma once

#include "MetaMidiEvent.h"
#include <fstream>


class MidiMetaEventAdapter
{
public:

    static int ReadEvent(std::ifstream* file, MetaMidiEvent* event, int& lastMidiChannel);

    static int ReadIntEvent(std::ifstream* file, MetaMidiEvent* event, int length=-1);
    static int ReadStringEvent(std::ifstream* file, MetaMidiEvent* event);

    static int ReadChannelPrefixEvent(std::ifstream* file, MetaMidiEvent* event, int& lastMidiChannel);
    static int ReadTimeSignatureEvent(std::ifstream* file, MetaMidiEvent* event);
    static int ReadKeySignatureEvent(std::ifstream* file, MetaMidiEvent* event);
    static int ReadTimeCodeEvent(std::ifstream* file, MetaMidiEvent* event);
    static int ReadUnknownEvent(std::ifstream* file);
};
