Event.h
/*
* This file is part of libsidplayfp, a SID player engine.
*
* Copyright 2011-2015 Leandro Nini <drfiemost@users.sourceforge.net>
* Copyright 2007-2010 Antti Lankila
* Copyright 2001 Simon White
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef EVENT_H
#define EVENT_H
#include <stdint.h>
namespace libsidplayfp
{
using event_clock_t = int_fast64_t;
class Event
{
friend class EventScheduler;
private:
Event *next;
event_clock_t triggerTime;
const char * const m_name;
public:
Event(const char * const name) :
m_name(name) {}
virtual void event() = 0;
const char* name() const { return m_name; }
protected:
~Event() = default;
};
}
#endif // EVENT_H
libsidplayfp::Event
Definition Event.h:39
libsidplayfp::Event::Event
Event(const char *const name)
Definition Event.h:58
libsidplayfp::Event::name
const char * name() const
Definition Event.h:72
libsidplayfp::Event::event
virtual void event()=0