netlist: rename plist_t to pvector_t to clarify origin.

This commit is contained in:
couriersud 2016-03-14 22:13:32 +01:00
parent ae4b28e224
commit 202e310c52
21 changed files with 99 additions and 100 deletions

View File

@ -569,7 +569,7 @@ void netlist_mame_sound_device_t::device_start()
// Configure outputs // Configure outputs
plist_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>(); pvector_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>();
if (outdevs.size() == 0) if (outdevs.size() == 0)
fatalerror("No output devices"); fatalerror("No output devices");
@ -595,7 +595,7 @@ void netlist_mame_sound_device_t::device_start()
m_num_inputs = 0; m_num_inputs = 0;
m_in = nullptr; m_in = nullptr;
plist_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>(); pvector_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>();
if (indevs.size() > 1) if (indevs.size() > 1)
fatalerror("A maximum of one input device is allowed!"); fatalerror("A maximum of one input device is allowed!");
if (indevs.size() == 1) if (indevs.size() == 1)

View File

@ -78,7 +78,7 @@ NETLIB_START(extclock)
connect_late(m_feedback, m_Q); connect_late(m_feedback, m_Q);
{ {
netlist_time base = netlist_time::from_hz(m_freq.Value()*2); netlist_time base = netlist_time::from_hz(m_freq.Value()*2);
pstring_list_t pat(m_pattern.Value(),","); pstring_vector_t pat(m_pattern.Value(),",");
m_off = netlist_time::from_double(m_offset.Value()); m_off = netlist_time::from_double(m_offset.Value());
int pati[256]; int pati[256];
@ -301,7 +301,7 @@ NETLIB_START(function)
for (int i=0; i < m_N; i++) for (int i=0; i < m_N; i++)
register_input(pfmt("A{1}")(i), m_I[i]); register_input(pfmt("A{1}")(i), m_I[i]);
pstring_list_t cmds(m_func.Value(), " "); pstring_vector_t cmds(m_func.Value(), " ");
m_precompiled.clear(); m_precompiled.clear();
for (std::size_t i=0; i < cmds.size(); i++) for (std::size_t i=0; i < cmds.size(); i++)

View File

@ -309,7 +309,7 @@ private:
analog_output_t m_Q; analog_output_t m_Q;
analog_input_t m_I[10]; analog_input_t m_I[10];
plist_t<rpn_inst> m_precompiled; pvector_t<rpn_inst> m_precompiled;
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -99,7 +99,7 @@ UINT32 truthtable_desc_t::get_ignored_extended(UINT32 i)
// desc // desc
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
void truthtable_desc_t::help(unsigned cur, pstring_list_t list, void truthtable_desc_t::help(unsigned cur, pstring_vector_t list,
UINT64 state,UINT16 val, parray_t<UINT8> &timing_index) UINT64 state,UINT16 val, parray_t<UINT8> &timing_index)
{ {
pstring elem = list[cur].trim(); pstring elem = list[cur].trim();
@ -144,7 +144,7 @@ void truthtable_desc_t::help(unsigned cur, pstring_list_t list,
} }
} }
void truthtable_desc_t::setup(const pstring_list_t &truthtable, UINT32 disabled_ignore) void truthtable_desc_t::setup(const pstring_vector_t &truthtable, UINT32 disabled_ignore)
{ {
unsigned line = 0; unsigned line = 0;
@ -164,14 +164,14 @@ void truthtable_desc_t::setup(const pstring_list_t &truthtable, UINT32 disabled_
while (!ttline.equals("")) while (!ttline.equals(""))
{ {
pstring_list_t io(ttline,"|"); pstring_vector_t io(ttline,"|");
// checks // checks
nl_assert_always(io.size() == 3, "io.count mismatch"); nl_assert_always(io.size() == 3, "io.count mismatch");
pstring_list_t inout(io[0], ","); pstring_vector_t inout(io[0], ",");
nl_assert_always(inout.size() == m_num_bits, "number of bits not matching"); nl_assert_always(inout.size() == m_num_bits, "number of bits not matching");
pstring_list_t out(io[1], ","); pstring_vector_t out(io[1], ",");
nl_assert_always(out.size() == m_NO, "output count not matching"); nl_assert_always(out.size() == m_NO, "output count not matching");
pstring_list_t times(io[2], ","); pstring_vector_t times(io[2], ",");
nl_assert_always(times.size() == m_NO, "timing count not matching"); nl_assert_always(times.size() == m_NO, "timing count not matching");
UINT16 val = 0; UINT16 val = 0;

View File

@ -65,10 +65,10 @@ struct truthtable_desc_t
{ {
} }
void setup(const pstring_list_t &desc, UINT32 disabled_ignore); void setup(const pstring_vector_t &desc, UINT32 disabled_ignore);
private: private:
void help(unsigned cur, pstring_list_t list, void help(unsigned cur, pstring_vector_t list,
UINT64 state,UINT16 val, parray_t<UINT8> &timing_index); UINT64 state,UINT16 val, parray_t<UINT8> &timing_index);
static unsigned count_bits(UINT32 v); static unsigned count_bits(UINT32 v);
static UINT32 set_bits(UINT32 v, UINT32 b); static UINT32 set_bits(UINT32 v, UINT32 b);
@ -120,7 +120,7 @@ public:
} }
nld_truthtable_t(truthtable_t *ttbl, const pstring_list_t &desc) nld_truthtable_t(truthtable_t *ttbl, const pstring_vector_t &desc)
: device_t(), m_last_state(0), m_ign(0), m_active(1), m_ttp(ttbl) : device_t(), m_last_state(0), m_ign(0), m_active(1), m_ttp(ttbl)
{ {
m_desc = desc; m_desc = desc;
@ -130,12 +130,12 @@ public:
{ {
pstring header = m_desc[0]; pstring header = m_desc[0];
pstring_list_t io(header,"|"); pstring_vector_t io(header,"|");
// checks // checks
nl_assert_always(io.size() == 2, "too many '|'"); nl_assert_always(io.size() == 2, "too many '|'");
pstring_list_t inout(io[0], ","); pstring_vector_t inout(io[0], ",");
nl_assert_always(inout.size() == m_num_bits, "bitcount wrong"); nl_assert_always(inout.size() == m_num_bits, "bitcount wrong");
pstring_list_t out(io[1], ","); pstring_vector_t out(io[1], ",");
nl_assert_always(out.size() == m_NO, "output count wrong"); nl_assert_always(out.size() == m_NO, "output count wrong");
for (unsigned i=0; i < m_NI; i++) for (unsigned i=0; i < m_NI; i++)
@ -289,7 +289,7 @@ private:
INT32 m_active; INT32 m_active;
truthtable_t *m_ttp; truthtable_t *m_ttp;
pstring_list_t m_desc; pstring_vector_t m_desc;
}; };
class netlist_base_factory_truthtable_t : public base_factory_t class netlist_base_factory_truthtable_t : public base_factory_t
@ -307,7 +307,7 @@ public:
pfree(m_family); pfree(m_family);
} }
pstring_list_t m_desc; pstring_vector_t m_desc;
logic_family_desc_t *m_family; logic_family_desc_t *m_family;
}; };

View File

@ -469,7 +469,7 @@ namespace netlist
P_PREVENT_COPYING(core_terminal_t) P_PREVENT_COPYING(core_terminal_t)
public: public:
typedef plist_t<core_terminal_t *> list_t; typedef pvector_t<core_terminal_t *> list_t;
/* needed here ... */ /* needed here ... */
@ -522,7 +522,7 @@ namespace netlist
P_PREVENT_COPYING(terminal_t) P_PREVENT_COPYING(terminal_t)
public: public:
typedef plist_t<terminal_t *> list_t; typedef pvector_t<terminal_t *> list_t;
ATTR_COLD terminal_t(); ATTR_COLD terminal_t();
@ -673,7 +673,7 @@ namespace netlist
P_PREVENT_COPYING(net_t) P_PREVENT_COPYING(net_t)
public: public:
typedef plist_t<net_t *> list_t; typedef pvector_t<net_t *> list_t;
ATTR_COLD net_t(const family_t afamily); ATTR_COLD net_t(const family_t afamily);
virtual ~net_t(); virtual ~net_t();
@ -711,7 +711,7 @@ namespace netlist
ATTR_COLD void move_connections(net_t *new_net); ATTR_COLD void move_connections(net_t *new_net);
plist_t<core_terminal_t *> m_core_terms; // save post-start m_list ... pvector_t<core_terminal_t *> m_core_terms; // save post-start m_list ...
ATTR_HOT void set_Q_time(const netlist_sig_t &newQ, const netlist_time &at) ATTR_HOT void set_Q_time(const netlist_sig_t &newQ, const netlist_time &at)
{ {
@ -753,7 +753,7 @@ namespace netlist
P_PREVENT_COPYING(logic_net_t) P_PREVENT_COPYING(logic_net_t)
public: public:
typedef plist_t<logic_net_t *> list_t; typedef pvector_t<logic_net_t *> list_t;
ATTR_COLD logic_net_t(); ATTR_COLD logic_net_t();
virtual ~logic_net_t() { }; virtual ~logic_net_t() { };
@ -813,7 +813,7 @@ namespace netlist
P_PREVENT_COPYING(analog_net_t) P_PREVENT_COPYING(analog_net_t)
public: public:
typedef plist_t<analog_net_t *> list_t; typedef pvector_t<analog_net_t *> list_t;
ATTR_COLD analog_net_t(); ATTR_COLD analog_net_t();
virtual ~analog_net_t() { }; virtual ~analog_net_t() { };
@ -999,7 +999,7 @@ namespace netlist
P_PREVENT_COPYING(core_device_t) P_PREVENT_COPYING(core_device_t)
public: public:
typedef plist_t<core_device_t *> list_t; typedef pvector_t<core_device_t *> list_t;
ATTR_COLD core_device_t(const family_t afamily); ATTR_COLD core_device_t(const family_t afamily);
@ -1115,7 +1115,7 @@ namespace netlist
ATTR_COLD void connect_late(core_terminal_t &t1, core_terminal_t &t2); ATTR_COLD void connect_late(core_terminal_t &t1, core_terminal_t &t2);
ATTR_COLD void connect_direct(core_terminal_t &t1, core_terminal_t &t2); ATTR_COLD void connect_direct(core_terminal_t &t1, core_terminal_t &t2);
plist_t<pstring> m_terminals; pvector_t<pstring> m_terminals;
protected: protected:
@ -1195,9 +1195,9 @@ namespace netlist
ATTR_COLD net_t *find_net(const pstring &name); ATTR_COLD net_t *find_net(const pstring &name);
template<class _device_class> template<class _device_class>
ATTR_COLD plist_t<_device_class *> get_device_list() ATTR_COLD pvector_t<_device_class *> get_device_list()
{ {
plist_t<_device_class *> tmp; pvector_t<_device_class *> tmp;
for (std::size_t i = 0; i < m_devices.size(); i++) for (std::size_t i = 0; i < m_devices.size(); i++)
{ {
_device_class *dev = dynamic_cast<_device_class *>(m_devices[i]); _device_class *dev = dynamic_cast<_device_class *>(m_devices[i]);
@ -1237,7 +1237,7 @@ namespace netlist
return ret; return ret;
} }
plist_t<device_t *> m_devices; pvector_t<device_t *> m_devices;
net_t::list_t m_nets; net_t::list_t m_nets;
#if (NL_KEEP_STATISTICS) #if (NL_KEEP_STATISTICS)
pnamedlist_t<core_device_t *> m_started_devices; pnamedlist_t<core_device_t *> m_started_devices;

View File

@ -17,20 +17,20 @@ namespace netlist
// net_device_t_base_factory // net_device_t_base_factory
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
ATTR_COLD const pstring_list_t base_factory_t::term_param_list() ATTR_COLD const pstring_vector_t base_factory_t::term_param_list()
{ {
if (m_def_param.startsWith("+")) if (m_def_param.startsWith("+"))
return pstring_list_t(m_def_param.substr(1), ","); return pstring_vector_t(m_def_param.substr(1), ",");
else else
return pstring_list_t(); return pstring_vector_t();
} }
ATTR_COLD const pstring_list_t base_factory_t::def_params() ATTR_COLD const pstring_vector_t base_factory_t::def_params()
{ {
if (m_def_param.startsWith("+") || m_def_param.equals("-")) if (m_def_param.startsWith("+") || m_def_param.equals("-"))
return pstring_list_t(); return pstring_vector_t();
else else
return pstring_list_t(m_def_param, ","); return pstring_vector_t(m_def_param, ",");
} }

View File

@ -36,8 +36,8 @@ namespace netlist
ATTR_COLD const pstring &name() const { return m_name; } ATTR_COLD const pstring &name() const { return m_name; }
ATTR_COLD const pstring &classname() const { return m_classname; } ATTR_COLD const pstring &classname() const { return m_classname; }
ATTR_COLD const pstring &param_desc() const { return m_def_param; } ATTR_COLD const pstring &param_desc() const { return m_def_param; }
ATTR_COLD const pstring_list_t term_param_list(); ATTR_COLD const pstring_vector_t term_param_list();
ATTR_COLD const pstring_list_t def_params(); ATTR_COLD const pstring_vector_t def_params();
protected: protected:
pstring m_name; /* device name */ pstring m_name; /* device name */

View File

@ -294,7 +294,7 @@ void parser_t::net_c()
void parser_t::dippins() void parser_t::dippins()
{ {
pstring_list_t pins; pstring_vector_t pins;
pins.push_back(get_identifier()); pins.push_back(get_identifier());
require_token(m_tok_comma); require_token(m_tok_comma);
@ -353,8 +353,8 @@ void parser_t::device(const pstring &dev_type)
{ {
base_factory_t *f = m_setup.factory().factory_by_name(dev_type); base_factory_t *f = m_setup.factory().factory_by_name(dev_type);
device_t *dev; device_t *dev;
pstring_list_t termlist = f->term_param_list(); pstring_vector_t termlist = f->term_param_list();
pstring_list_t def_params = f->def_params(); pstring_vector_t def_params = f->def_params();
std::size_t cnt; std::size_t cnt;

View File

@ -170,7 +170,7 @@ void setup_t::register_alias(const pstring &alias, const pstring &out)
void setup_t::register_dippins_arr(const pstring &terms) void setup_t::register_dippins_arr(const pstring &terms)
{ {
pstring_list_t list(terms,", "); pstring_vector_t list(terms,", ");
if (list.size() == 0 || (list.size() % 2) == 1) if (list.size() == 0 || (list.size() % 2) == 1)
log().fatal("You must pass an equal number of pins to DIPPINS"); log().fatal("You must pass an equal number of pins to DIPPINS");
unsigned n = list.size(); unsigned n = list.size();
@ -294,7 +294,7 @@ void setup_t::register_object(device_t &dev, const pstring &name, object_t &obj)
void setup_t::register_link_arr(const pstring &terms) void setup_t::register_link_arr(const pstring &terms)
{ {
pstring_list_t list(terms,", "); pstring_vector_t list(terms,", ");
if (list.size() < 2) if (list.size() < 2)
log().fatal("You must pass at least 2 terminals to NET_C"); log().fatal("You must pass at least 2 terminals to NET_C");
for (std::size_t i = 1; i < list.size(); i++) for (std::size_t i = 1; i < list.size(); i++)
@ -836,7 +836,7 @@ void setup_t::start_devices()
if (env != "") if (env != "")
{ {
log().debug("Creating dynamic logs ...\n"); log().debug("Creating dynamic logs ...\n");
pstring_list_t loglist(env, ":"); pstring_vector_t loglist(env, ":");
for (pstring ll : loglist) for (pstring ll : loglist)
{ {
device_t *nc = factory().new_device_by_name("LOG"); device_t *nc = factory().new_device_by_name("LOG");
@ -944,7 +944,7 @@ void setup_t::model_parse(const pstring &model_in, model_map_t &map)
log().fatal("Model error {1}\n", model); log().fatal("Model error {1}\n", model);
remainder = remainder.left(remainder.len() - 1); remainder = remainder.left(remainder.len() - 1);
pstring_list_t pairs(remainder," ", true); pstring_vector_t pairs(remainder," ", true);
for (pstring &pe : pairs) for (pstring &pe : pairs)
{ {
int pose = pe.find("="); int pose = pe.find("=");

View File

@ -91,7 +91,7 @@ namespace netlist
class source_t class source_t
{ {
public: public:
typedef plist_t<source_t *> list_t; typedef pvector_t<source_t *> list_t;
source_t() source_t()
{} {}
@ -224,7 +224,7 @@ namespace netlist
phashmap_t<pstring, pstring> m_params_temp; phashmap_t<pstring, pstring> m_params_temp;
phashmap_t<pstring, core_terminal_t *> m_terminals; phashmap_t<pstring, core_terminal_t *> m_terminals;
plist_t<link_t> m_links; pvector_t<link_t> m_links;
factory_list_t *m_factory; factory_list_t *m_factory;
@ -235,7 +235,7 @@ namespace netlist
std::stack<pstring> m_stack; std::stack<pstring> m_stack;
source_t::list_t m_sources; source_t::list_t m_sources;
plist_t<pstring> m_lib; pvector_t<pstring> m_lib;
}; };

View File

@ -90,10 +90,10 @@ private:
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template <typename _ListClass> template <typename _ListClass>
class plist_t : public std::vector<_ListClass> class pvector_t : public std::vector<_ListClass>
{ {
public: public:
plist_t() : std::vector<_ListClass>() {} pvector_t() : std::vector<_ListClass>() {}
void clear_and_free() void clear_and_free()
{ {
@ -315,13 +315,13 @@ private:
// string list // string list
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
class pstring_list_t : public plist_t<pstring> class pstring_vector_t : public pvector_t<pstring>
{ {
public: public:
pstring_list_t() : plist_t<pstring>() { } pstring_vector_t() : pvector_t<pstring>() { }
pstring_list_t(const pstring &str, const pstring &onstr, bool ignore_empty = false) pstring_vector_t(const pstring &str, const pstring &onstr, bool ignore_empty = false)
: plist_t<pstring>() : pvector_t<pstring>()
{ {
int p = 0; int p = 0;
int pn; int pn;
@ -343,9 +343,9 @@ public:
} }
} }
static pstring_list_t splitexpr(const pstring &str, const pstring_list_t &onstrl) pstring_vector_t(const pstring &str, const pstring_vector_t &onstrl)
: pvector_t<pstring>()
{ {
pstring_list_t temp;
pstring col = ""; pstring col = "";
unsigned i = 0; unsigned i = 0;
@ -363,10 +363,10 @@ public:
if (p>=0) if (p>=0)
{ {
if (col != "") if (col != "")
temp.push_back(col); this->push_back(col);
col = ""; col = "";
temp.push_back(onstrl[p]); this->push_back(onstrl[p]);
i += onstrl[p].blen(); i += onstrl[p].blen();
} }
else else
@ -377,8 +377,7 @@ public:
} }
} }
if (col != "") if (col != "")
temp.push_back(col); this->push_back(col);
return temp;
} }
}; };
@ -597,7 +596,7 @@ private:
} }
} }
plist_t<element_t> m_values; pvector_t<element_t> m_values;
parray_t<int> m_hash; parray_t<int> m_hash;
}; };

View File

@ -80,7 +80,7 @@ public:
pstring operator ()() { return m_val; } pstring operator ()() { return m_val; }
private: private:
pstring m_val; pstring m_val;
pstring_list_t m_limit; pstring_vector_t m_limit;
}; };
class poption_bool : public poption class poption_bool : public poption
@ -222,7 +222,7 @@ private:
return NULL; return NULL;
} }
plist_t<poption *> m_opts; pvector_t<poption *> m_opts;
pstring m_app; pstring m_app;
}; };

View File

@ -276,7 +276,7 @@ void ppreprocessor::error(const pstring &err)
double ppreprocessor::expr(const pstring_list_t &sexpr, std::size_t &start, int prio) double ppreprocessor::expr(const pstring_vector_t &sexpr, std::size_t &start, int prio)
{ {
double val; double val;
pstring tok=sexpr[start]; pstring tok=sexpr[start];
@ -357,7 +357,7 @@ ppreprocessor::define_t *ppreprocessor::get_define(const pstring &name)
pstring ppreprocessor::replace_macros(const pstring &line) pstring ppreprocessor::replace_macros(const pstring &line)
{ {
pstring_list_t elems = pstring_list_t::splitexpr(line, m_expr_sep); pstring_vector_t elems(line, m_expr_sep);
pstringbuffer ret = ""; pstringbuffer ret = "";
for (std::size_t i=0; i<elems.size(); i++) for (std::size_t i=0; i<elems.size(); i++)
{ {
@ -370,7 +370,7 @@ pstring ppreprocessor::replace_macros(const pstring &line)
return ret; return ret;
} }
static pstring catremainder(const pstring_list_t &elems, std::size_t start, pstring sep) static pstring catremainder(const pstring_vector_t &elems, std::size_t start, pstring sep)
{ {
pstringbuffer ret = ""; pstringbuffer ret = "";
for (std::size_t i=start; i<elems.size(); i++) for (std::size_t i=start; i<elems.size(); i++)
@ -389,13 +389,13 @@ pstring ppreprocessor::process_line(const pstring &line)
// FIXME ... revise and extend macro handling // FIXME ... revise and extend macro handling
if (lt.startsWith("#")) if (lt.startsWith("#"))
{ {
pstring_list_t lti(lt, " ", true); pstring_vector_t lti(lt, " ", true);
if (lti[0].equals("#if")) if (lti[0].equals("#if"))
{ {
m_level++; m_level++;
std::size_t start = 0; std::size_t start = 0;
lt = replace_macros(lt); lt = replace_macros(lt);
pstring_list_t t = pstring_list_t::splitexpr(lt.substr(3).replace(" ",""), m_expr_sep); pstring_vector_t t(lt.substr(3).replace(" ",""), m_expr_sep);
int val = expr(t, start, 0); int val = expr(t, start, 0);
if (val == 0) if (val == 0)
m_ifflag |= (1 << m_level); m_ifflag |= (1 << m_level);

View File

@ -136,7 +136,7 @@ private:
pstring m_identifier_chars; pstring m_identifier_chars;
pstring m_number_chars; pstring m_number_chars;
pstring m_number_chars_start; pstring m_number_chars_start;
plist_t<pstring> m_tokens; pvector_t<pstring> m_tokens;
pstring m_whitespace; pstring m_whitespace;
pstring::code_t m_string; pstring::code_t m_string;
@ -174,7 +174,7 @@ protected:
postream &process_i(pistream &istrm, postream &ostrm); postream &process_i(pistream &istrm, postream &ostrm);
double expr(const pstring_list_t &sexpr, std::size_t &start, int prio); double expr(const pstring_vector_t &sexpr, std::size_t &start, int prio);
define_t *get_define(const pstring &name); define_t *get_define(const pstring &name);
@ -187,7 +187,7 @@ private:
pstring process_line(const pstring &line); pstring process_line(const pstring &line);
phashmap_t<pstring, define_t> m_defines; phashmap_t<pstring, define_t> m_defines;
pstring_list_t m_expr_sep; pstring_vector_t m_expr_sep;
//pstringbuffer m_ret; //pstringbuffer m_ret;
UINT32 m_ifflag; // 31 if levels UINT32 m_ifflag; // 31 if levels

View File

@ -84,7 +84,7 @@ class pstate_manager_t;
class pstate_callback_t class pstate_callback_t
{ {
public: public:
typedef plist_t<pstate_callback_t *> list_t; typedef pvector_t<pstate_callback_t *> list_t;
virtual ~pstate_callback_t() { }; virtual ~pstate_callback_t() { };
@ -96,7 +96,7 @@ protected:
struct pstate_entry_t struct pstate_entry_t
{ {
typedef plist_t<pstate_entry_t *> list_t; typedef pvector_t<pstate_entry_t *> list_t;
pstate_entry_t(const pstring &stname, const pstate_data_type_e dt, const void *owner, pstate_entry_t(const pstring &stname, const pstate_data_type_e dt, const void *owner,
const int size, const int count, void *ptr, bool is_ptr) const int size, const int count, void *ptr, bool is_ptr)

View File

@ -181,7 +181,7 @@ public:
void log_setup() void log_setup()
{ {
log().debug("Creating dynamic logs ...\n"); log().debug("Creating dynamic logs ...\n");
pstring_list_t ll(m_opts ? m_opts->opt_logs() : "" , ":"); pstring_vector_t ll(m_opts ? m_opts->opt_logs() : "" , ":");
for (unsigned i=0; i < ll.size(); i++) for (unsigned i=0; i < ll.size(); i++)
{ {
pstring name = "log_" + ll[i]; pstring name = "log_" + ll[i];
@ -260,9 +260,9 @@ struct input_t
}; };
plist_t<input_t> *read_input(netlist::netlist_t *netlist, pstring fname) pvector_t<input_t> *read_input(netlist::netlist_t *netlist, pstring fname)
{ {
plist_t<input_t> *ret = palloc(plist_t<input_t>()); pvector_t<input_t> *ret = palloc(pvector_t<input_t>());
if (fname != "") if (fname != "")
{ {
pifilestream f(fname); pifilestream f(fname);
@ -294,7 +294,7 @@ static void run(tool_options_t &opts)
nt.read_netlist(opts.opt_file(), opts.opt_name()); nt.read_netlist(opts.opt_file(), opts.opt_name());
plist_t<input_t> *inps = read_input(&nt, opts.opt_inp()); pvector_t<input_t> *inps = read_input(&nt, opts.opt_inp());
double ttr = opts.opt_ttr(); double ttr = opts.opt_ttr();

View File

@ -62,7 +62,7 @@ private:
int solve_ilu_gmres(nl_double * RESTRICT x, nl_double * RESTRICT rhs, const unsigned restart_max, const unsigned mr, nl_double accuracy); int solve_ilu_gmres(nl_double * RESTRICT x, nl_double * RESTRICT rhs, const unsigned restart_max, const unsigned mr, nl_double accuracy);
plist_t<int> m_term_cr[_storage_N]; pvector_t<int> m_term_cr[_storage_N];
bool m_use_iLU_preconditioning; bool m_use_iLU_preconditioning;
bool m_use_more_precise_stop_condition; bool m_use_more_precise_stop_condition;

View File

@ -81,22 +81,22 @@ class terms_t
unsigned m_railstart; unsigned m_railstart;
plist_t<unsigned> m_nz; /* all non zero for multiplication */ pvector_t<unsigned> m_nz; /* all non zero for multiplication */
plist_t<unsigned> m_nzrd; /* non zero right of the diagonal for elimination */ pvector_t<unsigned> m_nzrd; /* non zero right of the diagonal for elimination */
plist_t<unsigned> m_nzbd; /* non zero below of the diagonal for elimination */ pvector_t<unsigned> m_nzbd; /* non zero below of the diagonal for elimination */
private: private:
plist_t<terminal_t *> m_term; pvector_t<terminal_t *> m_term;
plist_t<int> m_net_other; pvector_t<int> m_net_other;
plist_t<nl_double> m_go; pvector_t<nl_double> m_go;
plist_t<nl_double> m_gt; pvector_t<nl_double> m_gt;
plist_t<nl_double> m_Idr; pvector_t<nl_double> m_Idr;
plist_t<nl_double *> m_other_curanalog; pvector_t<nl_double *> m_other_curanalog;
}; };
class matrix_solver_t : public device_t class matrix_solver_t : public device_t
{ {
public: public:
typedef plist_t<matrix_solver_t *> list_t; typedef pvector_t<matrix_solver_t *> list_t;
typedef core_device_t::list_t dev_list_t; typedef core_device_t::list_t dev_list_t;
enum eSolverType enum eSolverType
@ -146,8 +146,8 @@ protected:
virtual void add_term(int net_idx, terminal_t *term) = 0; virtual void add_term(int net_idx, terminal_t *term) = 0;
plist_t<analog_net_t *> m_nets; pvector_t<analog_net_t *> m_nets;
plist_t<analog_output_t *> m_inps; pvector_t<analog_output_t *> m_inps;
int m_stat_calculations; int m_stat_calculations;
int m_stat_newton_raphson; int m_stat_newton_raphson;

View File

@ -12,9 +12,9 @@
template<typename Class> template<typename Class>
static plist_t<int> bubble(const plist_t<Class *> &sl) static pvector_t<int> bubble(const pvector_t<Class *> &sl)
{ {
plist_t<int> ret; pvector_t<int> ret;
for (unsigned i=0; i<sl.size(); i++) for (unsigned i=0; i<sl.size(); i++)
ret.push_back(i); ret.push_back(i);
@ -101,7 +101,7 @@ void nl_convert_base_t::dump_nl()
if (net->terminals().size() == 1) if (net->terminals().size() == 1)
net->set_no_export(); net->set_no_export();
} }
plist_t<int> sorted = bubble(m_devs); pvector_t<int> sorted = bubble(m_devs);
for (std::size_t i=0; i<m_devs.size(); i++) for (std::size_t i=0; i<m_devs.size(); i++)
{ {
std::size_t j = sorted[i]; std::size_t j = sorted[i];
@ -202,7 +202,7 @@ nl_convert_base_t::unit_t nl_convert_base_t::m_units[] = {
void nl_convert_spice_t::convert(const pstring &contents) void nl_convert_spice_t::convert(const pstring &contents)
{ {
pstring_list_t spnl(contents, "\n"); pstring_vector_t spnl(contents, "\n");
// Add gnd net // Add gnd net
@ -234,7 +234,7 @@ void nl_convert_spice_t::process_line(const pstring &line)
{ {
if (line != "") if (line != "")
{ {
pstring_list_t tt(line, " ", true); pstring_vector_t tt(line, " ", true);
double val = 0.0; double val = 0.0;
switch (tt[0].code_at(0)) switch (tt[0].code_at(0))
{ {
@ -273,7 +273,7 @@ void nl_convert_spice_t::process_line(const pstring &line)
model = tt[5]; model = tt[5];
else else
model = tt[4]; model = tt[4];
pstring_list_t m(model,"{"); pstring_vector_t m(model,"{");
if (m.size() == 2) if (m.size() == 2)
{ {
if (m[1].len() != 4) if (m[1].len() != 4)

View File

@ -67,14 +67,14 @@ private:
: m_name(aname), m_no_export(false) {} : m_name(aname), m_no_export(false) {}
const pstring &name() { return m_name;} const pstring &name() { return m_name;}
pstring_list_t &terminals() { return m_terminals; } pstring_vector_t &terminals() { return m_terminals; }
void set_no_export() { m_no_export = true; } void set_no_export() { m_no_export = true; }
bool is_no_export() { return m_no_export; } bool is_no_export() { return m_no_export; }
private: private:
pstring m_name; pstring m_name;
bool m_no_export; bool m_no_export;
pstring_list_t m_terminals; pstring_vector_t m_terminals;
}; };
struct dev_t struct dev_t
@ -133,9 +133,9 @@ private:
postringstream m_buf; postringstream m_buf;
plist_t<dev_t *> m_devs; pvector_t<dev_t *> m_devs;
phashmap_t<pstring, net_t *> m_nets; phashmap_t<pstring, net_t *> m_nets;
plist_t<pstring> m_ext_alias; pvector_t<pstring> m_ext_alias;
phashmap_t<pstring, pin_alias_t *> m_pins; phashmap_t<pstring, pin_alias_t *> m_pins;
static unit_t m_units[]; static unit_t m_units[];