diff options
Diffstat (limited to 'src/devices/bus/hp_hil/hp_hil.h')
-rw-r--r-- | src/devices/bus/hp_hil/hp_hil.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/devices/bus/hp_hil/hp_hil.h b/src/devices/bus/hp_hil/hp_hil.h index 7b805f1528f..178f512e350 100644 --- a/src/devices/bus/hp_hil/hp_hil.h +++ b/src/devices/bus/hp_hil/hp_hil.h @@ -6,10 +6,10 @@ ***************************************************************************/ -#pragma once +#ifndef MAME_BUS_HP_HIL_HP_HIL_H +#define MAME_BUS_HP_HIL_HP_HIL_H -#ifndef __HP_HIL_H__ -#define __HP_HIL_H__ +#pragma once #include "emu.h" @@ -97,8 +97,7 @@ //************************************************************************** -class hp_hil_slot_device : public device_t, - public device_slot_interface +class hp_hil_slot_device : public device_t, public device_slot_interface { public: // construction/destruction @@ -118,7 +117,7 @@ protected: // device type definition -extern const device_type HP_HIL_SLOT; +DECLARE_DEVICE_TYPE(HP_HIL_SLOT, hp_hil_slot_device) class device_hp_hil_interface; @@ -130,8 +129,8 @@ public: hp_hil_mlc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~hp_hil_mlc_device() { m_device_list.detach_all(); } - template<class _Object> static devcb_base &set_int_callback(device_t &device, _Object object) { return downcast<hp_hil_mlc_device &>(device).int_cb.set_callback(object); } - template<class _Object> static devcb_base &set_nmi_callback(device_t &device, _Object object) { return downcast<hp_hil_mlc_device &>(device).nmi_cb.set_callback(object); } + template <class Object> static devcb_base &set_int_callback(device_t &device, Object &&cb) { return downcast<hp_hil_mlc_device &>(device).int_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> static devcb_base &set_nmi_callback(device_t &device, Object &&cb) { return downcast<hp_hil_mlc_device &>(device).nmi_cb.set_callback(std::forward<Object>(cb)); } void add_hp_hil_device(device_hp_hil_interface *device); @@ -157,7 +156,7 @@ private: // device type definition -extern const device_type HP_HIL_MLC; +DECLARE_DEVICE_TYPE(HP_HIL_MLC, hp_hil_mlc_device) // ======================> device_hp_hil_interface @@ -165,10 +164,10 @@ extern const device_type HP_HIL_MLC; class device_hp_hil_interface : public device_slot_card_interface { friend class hp_hil_mlc_device; + template <class ElementType> friend class simple_list; public: // construction/destruction - device_hp_hil_interface(const machine_config &mconfig, device_t &device); virtual ~device_hp_hil_interface(); device_hp_hil_interface *next() const { return m_next; } @@ -181,20 +180,24 @@ public: virtual void hil_write(uint16_t data) { }; int device_id() { return m_device_id; }; - hp_hil_mlc_device *m_hp_hil_mlc; - device_t *m_hp_hil_mlc_dev; - device_hp_hil_interface *m_next; - protected: + device_hp_hil_interface(const machine_config &mconfig, device_t &device); + virtual void device_reset() { } + hp_hil_mlc_device *m_hp_hil_mlc; + device_t *m_hp_hil_mlc_dev; + hp_hil_slot_device *m_slot; int m_device_id; uint16_t m_device_id16; bool m_powerup; bool m_passthru; + +private: + device_hp_hil_interface *m_next; }; -#endif /* __HP_HIL_H__ */ +#endif // MAME_BUS_HP_HIL_HP_HIL_H |