summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nlid_system.h
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2017-01-02 13:56:16 +0100
committer couriersud <couriersud@arcor.de>2017-01-02 17:33:20 +0100
commit9a7b32f29d916e0f70ae934008315b66885f7c4c (patch)
treeeb3ab5c1f77a1ba58d285ef7baf48c9e993cd4e0 /src/lib/netlist/devices/nlid_system.h
parenta64328499ca0e94c94bb81e51ff5a7e5c0df4336 (diff)
Simplify code. Introduce consistent approach to loading macro devices.
Changed nltool "listdevices" command accordingly. Fix some bugs which surfaced by this exercise. (nw)
Diffstat (limited to 'src/lib/netlist/devices/nlid_system.h')
-rw-r--r--src/lib/netlist/devices/nlid_system.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index ff08177cfdb..13812b50ec7 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -429,23 +429,25 @@ namespace netlist
class wrapper : public device_t
{
public:
- wrapper(const pstring &devname, netlist_t &anetlist, const pstring &name)
- : device_t(anetlist, name), m_devname(devname)
+ wrapper(netlist_t &anetlist, const pstring &name)
+ : device_t(anetlist, name)
{
- anetlist.setup().namespace_push(name);
- anetlist.setup().include(m_devname);
- anetlist.setup().namespace_pop();
}
protected:
NETLIB_RESETI() { }
NETLIB_UPDATEI() { }
-
- pstring m_devname;
};
plib::owned_ptr<device_t> Create(netlist_t &anetlist, const pstring &name) override
{
- return plib::owned_ptr<device_t>::Create<wrapper>(this->name(), anetlist, name);
+ return plib::owned_ptr<device_t>::Create<wrapper>(anetlist, name);
+ }
+
+ void macro_actions(netlist_t &anetlist, const pstring &name) override
+ {
+ anetlist.setup().namespace_push(name);
+ anetlist.setup().include(this->name());
+ anetlist.setup().namespace_pop();
}
private: