// Device.h: interface for the CDevice class.
//


#pragma once

class CDevice : public CObject
{
	protected:
		ULONGLONG           m_tickCount; // Device ticks
		CDevice            *m_pParent;

	public:
		CDevice();
		virtual ~CDevice();

		void AttachParent(CDevice *pParent)
		{
			m_pParent = pParent;
		};
		// Method for count device ticks
		void                Reset();
		virtual void        NextTick();

		// Virtual method called after reset command
		virtual void        OnReset() = NULL;

		// Methods for Set/Get byte/word
		virtual void        GetByte(WORD addr, BYTE *pValue) = NULL;
		virtual void        GetWord(WORD addr, WORD *pValue) = NULL;
		virtual void        SetByte(WORD addr, BYTE value) = NULL;
		virtual void        SetWord(WORD addr, WORD value) = NULL;
};

