netlist: use initializer_list. (nw)

- Use initializer_list in object_array_t.
- Added constructor which accepts a format string for object names.
- Started work on logic_input8 which provides 8 logic outputs.
This commit is contained in:
couriersud 2020-03-02 14:23:32 +01:00
parent 635f469c7d
commit eac1218d59
36 changed files with 114 additions and 56 deletions

View File

@ -49,6 +49,7 @@ namespace devices
LIB_ENTRY(MOSFET)
LIB_ENTRY(logic_input_ttl)
LIB_ENTRY(logic_input)
LIB_ENTRY(logic_input8)
LIB_ENTRY(analog_input)
LIB_ENTRY(log)
LIB_ENTRY(logD)

View File

@ -19,7 +19,7 @@ namespace netlist
NETLIB_OBJECT(2102A)
{
NETLIB_CONSTRUCTOR(2102A)
, m_A(*this, {{"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9" }})
, m_A(*this, {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9" })
, m_CEQ(*this, "CEQ")
, m_RWQ(*this, "RWQ")
, m_DI(*this, "DI")

View File

@ -16,10 +16,10 @@ namespace netlist
NETLIB_OBJECT(2716)
{
NETLIB_CONSTRUCTOR(2716)
, m_A(*this, {{ "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10" }})
, m_A(*this, { "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10" })
, m_GQ(*this, "GQ")
, m_EPQ(*this, "EPQ")
, m_D(*this, {{ "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7" }})
, m_D(*this, { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7" })
, m_last_EPQ(*this, "m_last_EPQ", 1)
, m_ROM(*this, "ROM")
, m_power_pins(*this)

View File

@ -17,8 +17,8 @@ namespace netlist
NETLIB_CONSTRUCTOR(CD4006)
NETLIB_FAMILY("CD4XXX")
, m_CLOCK(*this, "CLOCK")
, m_I(*this, {{"D1", "D2", "D3", "D4"}})
, m_Q(*this, {{"D1P4", "D1P4S", "D2P4", "D2P5", "D3P4", "D4P4", "D3P5"}})
, m_I(*this, {"D1", "D2", "D3", "D4"})
, m_Q(*this, {"D1P4", "D1P4S", "D2P4", "D2P5", "D3P4", "D4P4", "D3P5"})
, m_d(*this, "m_d", 0)
, m_last_clock(*this, "m_last_clock", 0)
, m_supply(*this, "VDD", "VSS")

View File

@ -17,8 +17,8 @@ namespace netlist
NETLIB_CONSTRUCTOR(CD4020_sub)
NETLIB_FAMILY("CD4XXX")
, m_IP(*this, "IP")
, m_Q(*this, {{"Q1", "_Q2", "_Q3", "Q4", "Q5", "Q6", "Q7", "Q8", "Q9",
"Q10", "Q11", "Q12", "Q13", "Q14"}})
, m_Q(*this, {"Q1", "_Q2", "_Q3", "Q4", "Q5", "Q6", "Q7", "Q8", "Q9",
"Q10", "Q11", "Q12", "Q13", "Q14"})
, m_cnt(*this, "m_cnt", 0)
, m_supply(*this, "VDD", "VSS")
{

View File

@ -22,7 +22,7 @@ namespace devices
NETLIB_OBJECT(74153)
{
NETLIB_CONSTRUCTOR(74153)
, m_C(*this, {{"C0", "C1", "C2", "C3"}}, NETLIB_DELEGATE(74153, sub))
, m_C(*this, {"C0", "C1", "C2", "C3"}, NETLIB_DELEGATE(74153, sub))
, m_G(*this, "G", NETLIB_DELEGATE(74153, sub))
, m_Y(*this, "AY") //FIXME: Change netlists
, m_chan(*this, "m_chan", 0)

View File

@ -32,7 +32,7 @@ namespace netlist
, m_ENABLET(*this, "ENABLET")
, m_cnt(*this, "m_cnt", 0)
, m_last_CLK(*this, "m_last_CLK", 0)
, m_Q(*this, {{"QA", "QB", "QC", "QD"}})
, m_Q(*this, {"QA", "QB", "QC", "QD"})
, m_RCO(*this, "RCO")
, m_power_pins(*this)
{

View File

@ -25,7 +25,7 @@ namespace netlist
, m_CLK(*this, "CLK")
, m_cnt(*this, "m_cnt", 0)
, m_last_CLK(*this, "m_last_CLK", 0)
, m_Q(*this, {{"QA", "QB", "QC", "QD", "QE", "QF", "QG", "QH"}})
, m_Q(*this, {"QA", "QB", "QC", "QD", "QE", "QF", "QG", "QH"})
, m_power_pins(*this)
{
}

View File

@ -16,7 +16,7 @@ namespace netlist
NETLIB_OBJECT(74165)
{
NETLIB_CONSTRUCTOR(74165)
, m_DATA(*this, {{ "H", "G", "F", "E", "D", "C", "B", "A" }})
, m_DATA(*this, { "H", "G", "F", "E", "D", "C", "B", "A" })
, m_SER(*this, "SER")
, m_SH_LDQ(*this, "SH_LDQ")
, m_CLK(*this, "CLK")

View File

@ -16,7 +16,7 @@ namespace netlist
NETLIB_OBJECT(74166)
{
NETLIB_CONSTRUCTOR(74166)
, m_DATA(*this, {{ "H", "G", "F", "E", "D", "C", "B", "A" }})
, m_DATA(*this, { "H", "G", "F", "E", "D", "C", "B", "A" })
, m_SER(*this, "SER")
, m_CLRQ(*this, "CLRQ")
, m_SH_LDQ(*this, "SH_LDQ")

View File

@ -17,10 +17,10 @@ namespace devices
{
NETLIB_CONSTRUCTOR(74174)
, m_CLK(*this, "CLK", NETLIB_DELEGATE(74174, sub))
, m_Q(*this, {{"Q1", "Q2", "Q3", "Q4", "Q5", "Q6"}})
, m_Q(*this, {"Q1", "Q2", "Q3", "Q4", "Q5", "Q6"})
, m_clrq(*this, "m_clr", 0)
, m_data(*this, "m_data", 0)
, m_D(*this, {{"D1", "D2", "D3", "D4", "D5", "D6"}})
, m_D(*this, {"D1", "D2", "D3", "D4", "D5", "D6"})
, m_CLRQ(*this, "CLRQ")
, m_power_pins(*this)
{

View File

@ -17,11 +17,11 @@ namespace netlist
NETLIB_OBJECT(74175)
{
NETLIB_CONSTRUCTOR(74175)
, m_D(*this, {{"D1", "D2", "D3", "D4"}})
, m_D(*this, {"D1", "D2", "D3", "D4"})
, m_CLRQ(*this, "CLRQ")
, m_CLK(*this, "CLK", NETLIB_DELEGATE(74175, clk))
, m_Q(*this, {{"Q1", "Q2", "Q3", "Q4"}})
, m_QQ(*this, {{"Q1Q", "Q2Q", "Q3Q", "Q4Q"}})
, m_Q(*this, {"Q1", "Q2", "Q3", "Q4"})
, m_QQ(*this, {"Q1Q", "Q2Q", "Q3Q", "Q4Q"})
, m_data(*this, "m_data", 0)
, m_power_pins(*this)
{

View File

@ -26,7 +26,7 @@ namespace netlist
, m_cnt(*this, "m_cnt", 0)
, m_last_CU(*this, "m_last_CU", 0)
, m_last_CD(*this, "m_last_CD", 0)
, m_Q(*this, {{"QA", "QB", "QC", "QD"}})
, m_Q(*this, {"QA", "QB", "QC", "QD"})
, m_BORROWQ(*this, "BORROWQ")
, m_CARRYQ(*this, "CARRYQ")
, m_A(*this, "A", NETLIB_DELEGATE(74192, sub))

View File

@ -29,7 +29,7 @@ namespace netlist
, m_cnt(*this, "m_cnt", 0)
, m_last_CU(*this, "m_last_CU", 0)
, m_last_CD(*this, "m_last_CD", 0)
, m_Q(*this, {{"QA", "QB", "QC", "QD"}})
, m_Q(*this, {"QA", "QB", "QC", "QD"})
, m_BORROWQ(*this, "BORROWQ")
, m_CARRYQ(*this, "CARRYQ")
, m_power_pins(*this)

View File

@ -16,14 +16,14 @@ namespace netlist
NETLIB_OBJECT(74194)
{
NETLIB_CONSTRUCTOR(74194)
, m_DATA(*this, {{"D", "C", "B", "A"}})
, m_DATA(*this, {"D", "C", "B", "A"})
, m_SLIN(*this, "SLIN")
, m_SRIN(*this, "SRIN")
, m_CLK(*this, "CLK")
, m_S0(*this, "S0")
, m_S1(*this, "S1")
, m_CLRQ(*this, "CLRQ")
, m_Q(*this, {{"QD", "QC", "QB", "QA"}})
, m_Q(*this, {"QD", "QC", "QB", "QA"})
, m_last_CLK(*this, "m_last_CLK", 0)
, m_last_Q(*this, "m_last_Q", 0)
, m_power_pins(*this)

View File

@ -26,8 +26,8 @@ namespace netlist
NETLIB_CONSTRUCTOR(74365)
, m_G1Q(*this, "G1Q")
, m_G2Q(*this, "G2Q")
, m_A(*this, {{ "A1", "A2", "A3", "A4", "A5", "A6" }})
, m_Y(*this, {{ "Y1", "Y2", "Y3", "Y4", "Y5", "Y6" }})
, m_A(*this, { "A1", "A2", "A3", "A4", "A5", "A6" })
, m_Y(*this, { "Y1", "Y2", "Y3", "Y4", "Y5", "Y6" })
, m_power_pins(*this)
{
}

View File

@ -24,7 +24,7 @@ namespace devices
, m_D(*this, "D")
, m_val(*this, "m_val", 0)
, m_last_val(*this, "m_last_val", 0)
, m_Q(*this, {{"Q0", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7", "Q8", "Q9"}})
, m_Q(*this, {"Q0", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7", "Q8", "Q9"})
, m_power_pins(*this)
{
}

View File

@ -27,7 +27,7 @@ namespace netlist
, m_BIQ(*this, "BIQ")
, m_RBIQ(*this, "RBIQ")
, m_state(*this, "m_state", 0)
, m_Q(*this, {{"a", "b", "c", "d", "e", "f", "g"}})
, m_Q(*this, {"a", "b", "c", "d", "e", "f", "g"})
, m_power_pins(*this)
{
}

View File

@ -20,8 +20,8 @@ namespace netlist
, m_C1C2(*this, "C1C2")
, m_C3C4(*this, "C3C4")
, m_last_Q(*this, "m_last_Q", 0)
, m_D(*this, {{"D1", "D2", "D3", "D4"}})
, m_Q(*this, {{"Q1", "Q2", "Q3", "Q4"}})
, m_D(*this, {"D1", "D2", "D3", "D4"})
, m_Q(*this, {"Q1", "Q2", "Q3", "Q4"})
, m_power_pins(*this)
{
register_subalias("Q1", m_Q[0]);
@ -44,7 +44,7 @@ namespace netlist
NETLIB_OBJECT_DERIVED(7475, 7477)
{
NETLIB_CONSTRUCTOR_DERIVED(7475, 7477)
, m_QQ(*this, {{"QQ1", "QQ2", "QQ3", "QQ4"}})
, m_QQ(*this, {"QQ1", "QQ2", "QQ3", "QQ4"})
{
}

View File

@ -16,8 +16,8 @@ namespace netlist
NETLIB_OBJECT(7485)
{
NETLIB_CONSTRUCTOR(7485)
, m_A(*this, {{"A0", "A1", "A2", "A3"}})
, m_B(*this, {{"B0", "B1", "B2", "B3"}})
, m_A(*this, {"A0", "A1", "A2", "A3"})
, m_B(*this, {"B0", "B1", "B2", "B3"})
, m_LTIN(*this, "LTIN")
, m_EQIN(*this, "EQIN")
, m_GTIN(*this, "GTIN")

View File

@ -34,7 +34,7 @@ namespace devices
, m_cnt(*this, "m_cnt", 0)
, m_last_A(*this, "m_last_A", 0)
, m_last_B(*this, "m_last_B", 0)
, m_Q(*this, {{"QA", "QB", "QC", "QD"}})
, m_Q(*this, {"QA", "QB", "QC", "QD"})
, m_power_pins(*this)
{
}

View File

@ -32,7 +32,7 @@ namespace devices
, m_cnt(*this, "m_cnt", 0)
, m_last_A(*this, "m_last_A", 0)
, m_last_B(*this, "m_last_B", 0)
, m_Q(*this, {{"QA", "QB", "QC", "QD"}})
, m_Q(*this, {"QA", "QB", "QC", "QD"})
, m_power_pins(*this)
{
}

View File

@ -24,7 +24,7 @@ namespace netlist
NETLIB_OBJECT(7497)
{
NETLIB_CONSTRUCTOR(7497)
, m_B(*this, {{"B5", "B4", "B3", "B2", "B1", "B0"}})
, m_B(*this, {"B5", "B4", "B3", "B2", "B1", "B0"})
, m_CLK(*this, "CLK", NETLIB_DELEGATE(7497, clk_strb))
, m_STRBQ(*this, "STRBQ", NETLIB_DELEGATE(7497, clk_strb))
, m_ENQ(*this, "ENQ")

View File

@ -16,11 +16,11 @@ namespace netlist
NETLIB_OBJECT(82S115)
{
NETLIB_CONSTRUCTOR(82S115)
, m_A(*this, {{"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8"}})
, m_A(*this, {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8"})
, m_CE1Q(*this, "CE1Q")
, m_CE2(*this, "CE2")
, m_STROBE(*this, "STROBE")
, m_O(*this, {{"O1", "O2", "O3", "O4", "O5", "O6", "O7", "O8"}})
, m_O(*this, {"O1", "O2", "O3", "O4", "O5", "O6", "O7", "O8"})
, m_last_O(*this, "m_last_O", 0)
, m_ROM(*this, "ROM")
, m_power_pins(*this)

View File

@ -16,9 +16,9 @@ namespace netlist
NETLIB_OBJECT(82S123)
{
NETLIB_CONSTRUCTOR(82S123)
, m_A(*this, {{"A0", "A1", "A2", "A3", "A4"}})
, m_A(*this, {"A0", "A1", "A2", "A3", "A4"})
, m_CEQ(*this, "CEQ")
, m_O(*this, {{"O1", "O2", "O3", "O4", "O5", "O6", "O7", "O8"}})
, m_O(*this, {"O1", "O2", "O3", "O4", "O5", "O6", "O7", "O8"})
, m_ROM(*this, "ROM")
, m_power_pins(*this)
{

View File

@ -16,10 +16,10 @@ namespace netlist
NETLIB_OBJECT(82S126)
{
NETLIB_CONSTRUCTOR(82S126)
, m_A(*this, {{"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7" }})
, m_A(*this, {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7" })
, m_CE1Q(*this, "CE1Q")
, m_CE2Q(*this, "CE2Q")
, m_O(*this, {{"O1", "O2", "O3", "O4" }})
, m_O(*this, {"O1", "O2", "O3", "O4" })
, m_ROM(*this, "ROM")
, m_power_pins(*this)
{

View File

@ -16,7 +16,7 @@ namespace netlist
NETLIB_OBJECT(82S16)
{
NETLIB_CONSTRUCTOR(82S16)
, m_A(*this, {{"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7" }}, NETLIB_DELEGATE(82S16, addr))
, m_A(*this, {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7"}, NETLIB_DELEGATE(82S16, addr))
, m_CE1Q(*this, "CE1Q", NETLIB_DELEGATE(82S16, enq))
, m_CE2Q(*this, "CE2Q", NETLIB_DELEGATE(82S16, enq))
, m_CE3Q(*this, "CE3Q", NETLIB_DELEGATE(82S16, enq))

View File

@ -25,8 +25,8 @@ namespace netlist
, m_LOADQ(*this, "LOADQ")
, m_ENP(*this, "ENP")
, m_CLRQ(*this, "CLRQ")
, m_ABCD(*this, {{"A", "B", "C", "D"}}, NETLIB_DELEGATE(9316, abcd))
, m_Q(*this, {{ "QA", "QB", "QC", "QD" }})
, m_ABCD(*this, {"A", "B", "C", "D"}, NETLIB_DELEGATE(9316, abcd))
, m_Q(*this, { "QA", "QB", "QC", "QD" })
, m_cnt(*this, "m_cnt", 0)
, m_abcd(*this, "m_abcd", 0)
, m_loadq(*this, "m_loadq", 0)

View File

@ -18,9 +18,9 @@ namespace netlist
NETLIB_CONSTRUCTOR(9314)
, m_EQ(*this, "EQ")
, m_MRQ(*this, "MRQ")
, m_SQ(*this, {{"S0Q", "S1Q", "S2Q", "S3Q"}})
, m_D(*this, {{"D0", "D1", "D2", "D3"}})
, m_Q(*this, {{"Q0", "Q1", "Q2", "Q3"}})
, m_SQ(*this, {"S0Q", "S1Q", "S2Q", "S3Q"})
, m_D(*this, {"D0", "D1", "D2", "D3"})
, m_Q(*this, {"Q0", "Q1", "Q2", "Q3"})
, m_last_EQ(*this, "m_last_EQ", 0)
, m_last_MRQ(*this, "m_last_MRQ", 0)
, m_last_SQ(*this, "m_last_SQ", 0)

View File

@ -19,8 +19,8 @@ namespace netlist
, m_CQ(*this, "CQ")
, m_EQ(*this, "EQ")
, m_D(*this, "D")
, m_A(*this, {{"A0", "A1", "A2"}})
, m_Q(*this, {{"Q0", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7"}})
, m_A(*this, {"A0", "A1", "A2"})
, m_Q(*this, {"Q0", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7"})
, m_last_CQ(*this, "m_last_CQ", 0)
, m_last_EQ(*this, "m_last_EQ", 0)
, m_last_D(*this, "m_last_D", 0)

View File

@ -73,6 +73,9 @@ namespace devices
NETLIB_DEVICE_IMPL(gnd, "GNDA", "")
NETLIB_DEVICE_IMPL(netlistparams, "PARAMETER", "")
using NETLIB_NAME(logic_input8) = NETLIB_NAME(logic_inputN)<8>;
NETLIB_DEVICE_IMPL(logic_input8, "LOGIC_INPUT8", "IN,FAMILY")
NETLIB_DEVICE_IMPL(logic_input, "LOGIC_INPUT", "IN,FAMILY")
NETLIB_DEVICE_IMPL_ALIAS(logic_input_ttl, logic_input, "TTL_INPUT", "IN")

View File

@ -24,6 +24,11 @@
PARAM(name.IN, v) \
PARAM(name.FAMILY, family)
#define LOGIC_INPUT8(name, v, family) \
NET_REGISTER_DEV(LOGIC_INPUT8, name) \
PARAM(name.IN, v) \
PARAM(name.FAMILY, family)
#define ANALOG_INPUT(name, v) \
NET_REGISTER_DEV(ANALOG_INPUT, name) \
PARAM(name.IN, v)

View File

@ -16,11 +16,11 @@ namespace netlist
NETLIB_OBJECT(TMS4800)
{
NETLIB_CONSTRUCTOR(TMS4800)
, m_A(*this, {{ "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10" }})
, m_A(*this, { "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10" })
, m_AR(*this, "AR")
, m_OE1(*this, "OE1")
, m_OE2(*this, "OE2")
, m_D(*this, {{ "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7" }})
, m_D(*this, { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7" })
, m_last_data(*this, "m_last_data", 1)
, m_ROM(*this, "ROM")
, m_supply(*this)

View File

@ -15,8 +15,8 @@ namespace netlist
NETLIB_OBJECT(tristate)
{
NETLIB_CONSTRUCTOR(tristate)
, m_CEQ(*this, {{ "CEQ1", "CEQ2" }})
, m_D(*this, {{ "D1", "D2" }})
, m_CEQ(*this, { "CEQ1", "CEQ2" })
, m_D(*this, { "D1", "D2" })
, m_Q(*this, "Q")
{
}
@ -32,8 +32,8 @@ namespace netlist
NETLIB_OBJECT(tristate3)
{
NETLIB_CONSTRUCTOR(tristate3)
, m_CEQ(*this, {{ "CEQ1", "CEQ2", "CEQ3" }} )
, m_D(*this, {{ "D1", "D2", "D3" }} )
, m_CEQ(*this, { "CEQ1", "CEQ2", "CEQ3" } )
, m_D(*this, { "D1", "D2", "D3" } )
, m_Q(*this, "Q")
{
}

View File

@ -246,6 +246,37 @@ namespace devices
param_model_t m_FAMILY;
NETLIB_NAME(power_pins) m_supply;
};
template<std::size_t N>
NETLIB_OBJECT(logic_inputN)
{
NETLIB_CONSTRUCTOR(logic_inputN)
, m_Q(*this, "Q{}")
, m_IN(*this, "IN", false)
// make sure we get the family first
, m_FAMILY(*this, "FAMILY", "FAMILY(TYPE=TTL)")
, m_supply(*this)
{
set_logic_family(state().setup().family_from_model(m_FAMILY()));
for (auto &q : m_Q)
q.set_logic_family(this->logic_family());
}
NETLIB_UPDATEI() { }
NETLIB_RESETI() { for (auto &q : m_Q) q.initial(0); }
NETLIB_UPDATE_PARAMI()
{
//printf("%s %d\n", name().c_str(), m_IN());
for (std::size_t i=0; i<N; i++)
m_Q[i].push((m_IN()>>i) & 1, netlist_time::from_nsec(1));
}
private:
object_array_t<logic_output_t, N> m_Q;
param_int_t m_IN;
param_model_t m_FAMILY;
NETLIB_NAME(power_pins) m_supply;
};
NETLIB_OBJECT(analog_input)
{

View File

@ -30,6 +30,7 @@
#include <unordered_map>
#include <vector>
#include <initializer_list>
//============================================================
// MACROS / New Syntax
@ -86,7 +87,7 @@ class NETLIB_NAME(name) : public device_t
/// \brief Used to define the destructor of a netlist device.
/// The use of a destructor for netlist device should normally not be necessary.
#define NETLIB_DESTRUCTOR(name) public: virtual ~NETLIB_NAME(name)() noexcept
#define NETLIB_DESTRUCTOR(name) public: virtual ~NETLIB_NAME(name)() noexcept override
/// \brief Define an extended constructor and add further parameters to it.
/// The macro allows to add further parameters to a device constructor. This is
@ -1737,11 +1738,28 @@ namespace netlist
std::array<const char *, N> p;
};
template<typename... Args>
object_array_t(core_device_t &dev, init names, Args&&... args)
object_array_t(core_device_t &dev, const std::initializer_list<const char *> &names, Args&&... args)
{
passert_always_msg(names.size() == N, "initializer_list size mismatch");
std::size_t i = 0;
for (auto &n : names)
this->emplace(i++, dev, pstring(n), std::forward<Args>(args)...);
}
template<typename... Args>
object_array_t(core_device_t &dev, const pstring &fmt, Args&&... args)
{
for (std::size_t i = 0; i<N; i++)
this->emplace(i, dev, pstring(names.p[i]), std::forward<Args>(args)...);
this->emplace(i, dev, plib::pfmt(fmt)(i), std::forward<Args>(args)...);
}
template<typename... Args>
object_array_t(core_device_t &dev, std::size_t offset, const pstring &fmt, Args&&... args)
{
for (std::size_t i = 0; i<N; i++)
this->emplace(i, dev, plib::pfmt(fmt)(i+offset), std::forward<Args>(args)...);
}
};
// -----------------------------------------------------------------------------