mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Get rid of some init_object calls.
This commit is contained in:
parent
521353d8d7
commit
71d2cf2625
@ -300,9 +300,8 @@ void netlist_mame_device_t::device_start()
|
||||
|
||||
//printf("clock is %d\n", clock());
|
||||
|
||||
m_netlist = global_alloc(netlist_mame_t(*this));
|
||||
m_netlist = global_alloc(netlist_mame_t(*this, "netlist"));
|
||||
m_setup = global_alloc(netlist::setup_t(m_netlist));
|
||||
netlist().init_object(*m_netlist, "netlist");
|
||||
m_setup->init();
|
||||
|
||||
// register additional devices
|
||||
|
@ -85,8 +85,8 @@ class netlist_mame_t : public netlist::netlist_t
|
||||
{
|
||||
public:
|
||||
|
||||
netlist_mame_t(netlist_mame_device_t &parent)
|
||||
: netlist::netlist_t(),
|
||||
netlist_mame_t(netlist_mame_device_t &parent, const pstring &aname)
|
||||
: netlist::netlist_t(aname),
|
||||
m_parent(parent)
|
||||
{}
|
||||
virtual ~netlist_mame_t() { };
|
||||
|
@ -74,13 +74,12 @@ logic_family_desc_t *family_CD4XXX = palloc(logic_family_cd4xxx_t);
|
||||
|
||||
queue_t::queue_t(netlist_t &nl)
|
||||
: timed_queue<net_t *, netlist_time>(512)
|
||||
, object_t(QUEUE, GENERIC)
|
||||
, object_t(nl, "QUEUE", QUEUE, GENERIC)
|
||||
, pstate_callback_t()
|
||||
, m_qsize(0)
|
||||
, m_times(512)
|
||||
, m_names(512)
|
||||
{
|
||||
this->init_object(nl, "QUEUE");
|
||||
}
|
||||
|
||||
void queue_t::register_state(pstate_manager_t &manager, const pstring &module)
|
||||
@ -131,6 +130,23 @@ ATTR_COLD object_t::object_t(const type_t atype, const family_t afamily)
|
||||
, m_netlist(NULL)
|
||||
{}
|
||||
|
||||
ATTR_COLD object_t::object_t(const pstring &aname, const type_t atype, const family_t afamily)
|
||||
: m_name(aname)
|
||||
, m_objtype(atype)
|
||||
, m_family(afamily)
|
||||
{
|
||||
// FIXME:
|
||||
m_netlist = reinterpret_cast<netlist_t *>(this);
|
||||
}
|
||||
|
||||
ATTR_COLD object_t::object_t(netlist_t &nl, const pstring &aname, const type_t atype, const family_t afamily)
|
||||
: m_name(aname)
|
||||
, m_objtype(atype)
|
||||
, m_family(afamily)
|
||||
, m_netlist(&nl)
|
||||
{
|
||||
}
|
||||
|
||||
ATTR_COLD object_t::~object_t()
|
||||
{
|
||||
}
|
||||
@ -171,8 +187,8 @@ ATTR_COLD void device_object_t::init_object(core_device_t &dev,
|
||||
// netlist_t
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
netlist_t::netlist_t()
|
||||
: object_t(NETLIST, GENERIC), pstate_manager_t(),
|
||||
netlist_t::netlist_t(const pstring &aname)
|
||||
: object_t(aname, NETLIST, GENERIC), pstate_manager_t(),
|
||||
m_stop(netlist_time::zero),
|
||||
m_time(netlist_time::zero),
|
||||
m_use_deactivate(0),
|
||||
|
@ -405,6 +405,8 @@ namespace netlist
|
||||
};
|
||||
|
||||
ATTR_COLD object_t(const type_t atype, const family_t afamily);
|
||||
ATTR_COLD object_t(const pstring &aname, const type_t atype, const family_t afamily);
|
||||
ATTR_COLD object_t(netlist_t &nl, const pstring &aname, const type_t atype, const family_t afamily);
|
||||
|
||||
virtual ~object_t();
|
||||
|
||||
@ -1188,7 +1190,7 @@ namespace netlist
|
||||
P_PREVENT_COPYING(netlist_t)
|
||||
public:
|
||||
|
||||
netlist_t();
|
||||
netlist_t(const pstring &aname);
|
||||
virtual ~netlist_t();
|
||||
|
||||
ATTR_COLD void start();
|
||||
|
@ -145,8 +145,8 @@ class netlist_tool_t : public netlist::netlist_t
|
||||
{
|
||||
public:
|
||||
|
||||
netlist_tool_t()
|
||||
: netlist::netlist_t(), m_opts(NULL), m_setup(NULL)
|
||||
netlist_tool_t(const pstring &aname)
|
||||
: netlist::netlist_t(aname), m_opts(NULL), m_setup(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@ -159,7 +159,6 @@ public:
|
||||
void init()
|
||||
{
|
||||
m_setup = palloc(netlist::setup_t(this));
|
||||
this->init_object(*this, "netlist");
|
||||
m_setup->init();
|
||||
}
|
||||
|
||||
@ -281,7 +280,7 @@ pvector_t<input_t> *read_input(netlist::netlist_t *netlist, pstring fname)
|
||||
|
||||
static void run(tool_options_t &opts)
|
||||
{
|
||||
netlist_tool_t nt;
|
||||
netlist_tool_t nt("netlist");
|
||||
osd_ticks_t t = osd_ticks();
|
||||
|
||||
nt.m_opts = &opts;
|
||||
@ -326,7 +325,7 @@ static void run(tool_options_t &opts)
|
||||
|
||||
static void listdevices()
|
||||
{
|
||||
netlist_tool_t nt;
|
||||
netlist_tool_t nt("netlist");
|
||||
nt.init();
|
||||
const netlist::factory_list_t &list = nt.setup().factory();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user