mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
devfind: Allow set_tag() with a reference or a pointer to a device [O. Galibert]
This commit is contained in:
parent
919346b469
commit
796abaf7f3
@ -515,6 +515,32 @@ public:
|
|||||||
/// remains valid until resolution time.
|
/// remains valid until resolution time.
|
||||||
device_finder(device_t &base, char const *tag) : object_finder_base<DeviceClass, Required>(base, tag) { }
|
device_finder(device_t &base, char const *tag) : object_finder_base<DeviceClass, Required>(base, tag) { }
|
||||||
|
|
||||||
|
/// \brief Set search tag
|
||||||
|
///
|
||||||
|
/// Allows search tag to be changed after construction. Note that
|
||||||
|
/// this must be done before resolution time to take effect.
|
||||||
|
/// \param [in] object Object to refer to.
|
||||||
|
void set_tag(DeviceClass &object)
|
||||||
|
{
|
||||||
|
assert(!this->m_resolved);
|
||||||
|
finder_base::m_base = object.mconfig().root_device();
|
||||||
|
finder_base::m_tag = object.tag();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// \brief Set search tag
|
||||||
|
///
|
||||||
|
/// Allows search tag to be changed after construction. Note that
|
||||||
|
/// this must be done before resolution time to take effect.
|
||||||
|
/// \param [in] object Object to refer to.
|
||||||
|
void set_tag(DeviceClass *object)
|
||||||
|
{
|
||||||
|
assert(!this->m_resolved);
|
||||||
|
finder_base::m_base = object->mconfig().root_device();
|
||||||
|
finder_base::m_tag = object->tag();
|
||||||
|
}
|
||||||
|
|
||||||
|
using object_finder_base<DeviceClass, Required>::set_tag;
|
||||||
|
|
||||||
/// \brief Set target during configuration
|
/// \brief Set target during configuration
|
||||||
///
|
///
|
||||||
/// During configuration, device_finder instances may be assigned
|
/// During configuration, device_finder instances may be assigned
|
||||||
|
Loading…
Reference in New Issue
Block a user