From bbbd1c0e8e0baaeb9e45fd5285b0202dc8cdced4 Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 8 Nov 2019 12:56:05 +0100 Subject: netlist: maintenance. (nw) - switch to VS 2019 community and fix standalone build. - more migration to C++ comment style. - add some more doxygen markup. --- src/lib/netlist/analog/nld_bjt.cpp | 4 - src/lib/netlist/build/makefile | 8 +- src/lib/netlist/buildVS/netlistlib.vcxproj | 43 +++++++---- src/lib/netlist/buildVS/netlistlib.vcxproj.filters | 90 ++++++++++++++++------ src/lib/netlist/buildVS/nltool.vcxproj | 15 ++-- src/lib/netlist/nl_base.cpp | 26 +++---- src/lib/netlist/nl_base.h | 2 +- src/lib/netlist/nl_config.h | 2 +- src/lib/netlist/nl_errstr.h | 11 ++- src/lib/netlist/nl_factory.cpp | 9 +-- src/lib/netlist/nl_factory.h | 19 +++-- src/lib/netlist/nl_parser.cpp | 4 - src/lib/netlist/nl_parser.h | 13 ++-- src/lib/netlist/nl_setup.cpp | 40 +++++----- src/lib/netlist/nl_setup.h | 71 +++++++++-------- src/lib/netlist/nltypes.h | 83 +++++++++----------- 16 files changed, 238 insertions(+), 202 deletions(-) diff --git a/src/lib/netlist/analog/nld_bjt.cpp b/src/lib/netlist/analog/nld_bjt.cpp index 0785ba56b37..7ddf42c1b5c 100644 --- a/src/lib/netlist/analog/nld_bjt.cpp +++ b/src/lib/netlist/analog/nld_bjt.cpp @@ -1,9 +1,5 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * nld_bjt.c - * - */ #include "netlist/solver/nld_solver.h" #include "netlist/nl_setup.h" diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index d2a9245de60..af02b100c86 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -261,8 +261,9 @@ tidy_db: compile_commands_prefix $(ALL_TIDY_FILES) compile_commands_postfix # -Wno-missing-variable-declarations : Device factory code, on purpose mingw: - $(MAKE) CEXTRAFLAGS="-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 -DWIN32_LEAN_AND_MEAN" \ - LDEXTRAFLAGS="-Wl,--subsystem,console -municode" LIBS= MD=@mkdir.exe SHELL=sh.exe + $(MAKE) CEXTRAFLAGS="-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 \ + -DWIN32_LEAN_AND_MEAN" LDEXTRAFLAGS="-Wl,--subsystem,console \ + -municode" LIBS= MD=@mkdir.exe SHELL=sh.exe DOXYGEN=doxygen.exe $(PARAMS) # # FIXME: Unicode @@ -275,6 +276,9 @@ doc: nltool ./nltool -c docheader > ../documentation/devsyn.dox.h $(DOXYGEN) doxygen.conf +docw: + $(DOXYGEN) doxygen.conf + #------------------------------------------------- # depends #------------------------------------------------- diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj b/src/lib/netlist/buildVS/netlistlib.vcxproj index 4a36bdc3496..4d4226a11ec 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj @@ -21,28 +21,28 @@ {A374399B-B87F-4E0F-9525-6C099600705F} Win32Proj - 8.1 + 10.0 StaticLibrary true - v140 + v142 StaticLibrary false - v140 + v142 Application true - v140 + v142 StaticLibrary false - v140 + v142 @@ -100,13 +100,15 @@ - $(SolutionDir)..\..\ + $(SolutionDir)..;$(SolutionDir)..\.. Full Speed + /bigobj + @@ -114,6 +116,8 @@ + + @@ -169,18 +173,15 @@ - - - - - + + @@ -189,6 +190,8 @@ + + @@ -197,6 +200,8 @@ + + @@ -253,7 +258,6 @@ - @@ -262,8 +266,10 @@ - + + + @@ -272,15 +278,24 @@ + + + + + + + + + - + diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters index 2b923f04bde..8b4f473556e 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters @@ -30,9 +30,6 @@ Source Files - - Source Files - Source Files @@ -48,21 +45,9 @@ Source Files - - Source Files - - - Source Files - Source Files - - Source Files - - - Source Files - Source Files @@ -252,6 +237,21 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + @@ -260,18 +260,12 @@ Header Files - - Header Files - Header Files Header Files - - Header Files - Header Files @@ -389,9 +383,6 @@ Header Files - - Header Files - Header Files @@ -578,5 +569,56 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + \ No newline at end of file diff --git a/src/lib/netlist/buildVS/nltool.vcxproj b/src/lib/netlist/buildVS/nltool.vcxproj index 200e701ea33..680dd7a054a 100755 --- a/src/lib/netlist/buildVS/nltool.vcxproj +++ b/src/lib/netlist/buildVS/nltool.vcxproj @@ -22,32 +22,32 @@ {9204EC28-A29B-4A36-9E47-2C46041D67D3} Win32Proj nltool - 8.1 + 10.0 Application true - v140 + v142 Unicode Application false - v140 + v142 true Unicode Application true - v140 + v142 Unicode Application false - v140 + v142 true Unicode @@ -144,7 +144,10 @@ - + + $(SolutionDir)..\;$(SolutionDir)..\..\;%(AdditionalIncludeDirectories) + /bigobj + diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index 4fabac4810e..a5d94710ed6 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -1,9 +1,5 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * nlbase.c - * - */ #include "solver/nld_matrix_solver.h" #include "solver/nld_solver.h" @@ -339,10 +335,9 @@ namespace netlist dev.second->update_param(); // Step all devices once ! - /* - * INFO: The order here affects power up of e.g. breakout. However, such - * variations are explicitly stated in the breakout manual. - */ + // + // INFO: The order here affects power up of e.g. breakout. However, such + // variations are explicitly stated in the breakout manual. auto *netlist_params = get_single_device("parameter"); @@ -401,7 +396,7 @@ namespace netlist } #if 1 - /* the above may screw up m_active and the list */ + // the above may screw up m_active and the list rebuild_lists(); #endif } @@ -442,8 +437,8 @@ namespace netlist const auto clang_workaround_unreachable_code = NL_USE_QUEUE_STATS; if (clang_workaround_unreachable_code) { - /* Only one serialization should be counted in total time */ - /* But two are contained in m_stat_mainloop */ + // Only one serialization should be counted in total time + // But two are contained in m_stat_mainloop plib::pperftime_t overhead; plib::pperftime_t test; { @@ -602,9 +597,8 @@ namespace netlist state().setup().register_link_fqn(name() + "." + t1, name() + "." + t2); } - /* FIXME: this is only used by solver code since matrix solvers are started in - * post_start. - */ + // FIXME: this is only used by solver code since matrix solvers are started in + // post_start. void device_t::connect_post_start(detail::core_terminal_t &t1, detail::core_terminal_t &t2) { if (!state().setup().connect(t1, t2)) @@ -651,7 +645,7 @@ namespace netlist void detail::net_t::rebuild_list() { - /* rebuild m_list */ + // rebuild m_list m_list_active.clear(); for (auto & term : m_core_terms) @@ -676,7 +670,7 @@ namespace netlist if (p != nullptr) p->m_cur_Analog = nlconst::zero(); - /* rebuild m_list and reset terminals to active or analog out state */ + // rebuild m_list and reset terminals to active or analog out state m_list_active.clear(); for (core_terminal_t *ct : m_core_terms) diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 536f97f8106..cd8d9f9fc5b 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -4,6 +4,7 @@ #ifndef NLBASE_H_ #define NLBASE_H_ +/// /// \file nl_base.h /// @@ -320,7 +321,6 @@ namespace netlist /// ... /// state_var m_var; /// } - template struct state_var { diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h index 65c8052a95d..72926478a50 100644 --- a/src/lib/netlist/nl_config.h +++ b/src/lib/netlist/nl_config.h @@ -209,4 +209,4 @@ namespace netlist #endif } // namespace netlist -#endif /* NLCONFIG_H_ */ +#endif // NLCONFIG_H_ diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h index 7f336385d4b..bec1070b3d0 100644 --- a/src/lib/netlist/nl_errstr.h +++ b/src/lib/netlist/nl_errstr.h @@ -1,10 +1,9 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/*! - * - * \file nl_errstr.h - * - */ + +/// +/// \file nl_errstr.h +/// #ifndef NL_ERRSTR_H_ #define NL_ERRSTR_H_ @@ -151,4 +150,4 @@ namespace netlist } // namespace netlist -#endif /* NL_ERRSTR_H_ */ +#endif // NL_ERRSTR_H_ diff --git a/src/lib/netlist/nl_factory.cpp b/src/lib/netlist/nl_factory.cpp index 624d35975ad..4ab1c7765d0 100644 --- a/src/lib/netlist/nl_factory.cpp +++ b/src/lib/netlist/nl_factory.cpp @@ -1,12 +1,9 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/*************************************************************************** - nl_factory.c - - Discrete netlist implementation. - -****************************************************************************/ +// +// nl_factory.cpp +// #include "nl_factory.h" #include "nl_base.h" diff --git a/src/lib/netlist/nl_factory.h b/src/lib/netlist/nl_factory.h index f633962d86d..ec53eb3bde7 100644 --- a/src/lib/netlist/nl_factory.h +++ b/src/lib/netlist/nl_factory.h @@ -1,10 +1,9 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * nl_factory.h - * - * - */ + +/// +/// \file nl_factory.h +/// #ifndef NLFACTORY_H_ #define NLFACTORY_H_ @@ -68,10 +67,10 @@ namespace factory { const pstring &sourcefile() const { return m_sourcefile; } private: - pstring m_name; /* device name */ - pstring m_classname; /* device class name */ - pstring m_def_param; /* default parameter */ - pstring m_sourcefile; /* source file */ + pstring m_name; ///< device name + pstring m_classname; ///< device class name + pstring m_def_param; ///< default parameter + pstring m_sourcefile; ///< source file }; template @@ -161,4 +160,4 @@ namespace factory { } // namespace devices } // namespace netlist -#endif /* NLFACTORY_H_ */ +#endif // NLFACTORY_H_ diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp index d07335f343b..3db19416193 100644 --- a/src/lib/netlist/nl_parser.cpp +++ b/src/lib/netlist/nl_parser.cpp @@ -1,9 +1,5 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * nl_parser.c - * - */ #include "nl_parser.h" #include "nl_base.h" diff --git a/src/lib/netlist/nl_parser.h b/src/lib/netlist/nl_parser.h index ce95f6ec346..0805684e286 100644 --- a/src/lib/netlist/nl_parser.h +++ b/src/lib/netlist/nl_parser.h @@ -1,9 +1,9 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * nl_parser.c - * - */ + +/// +/// \file nl_parser.c +/// #ifndef NL_PARSER_H_ #define NL_PARSER_H_ @@ -42,9 +42,6 @@ namespace netlist void net_local_source(); void net_truthtable_start(const pstring &nlname); - /* for debugging messages */ - //netlist_state_t &netlist() { return m_setup.netlist(); } - void verror(const pstring &msg) override; private: @@ -77,4 +74,4 @@ namespace netlist } // namespace netlist -#endif /* NL_PARSER_H_ */ +#endif // NL_PARSER_H_ diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp index 21c9bf02654..61672b5b73f 100644 --- a/src/lib/netlist/nl_setup.cpp +++ b/src/lib/netlist/nl_setup.cpp @@ -1,9 +1,5 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * nlsetup.c - * - */ #include "plib/palloc.h" #include "analog/nld_twoterm.h" @@ -63,7 +59,7 @@ namespace netlist } else { - /* make sure we parse macro library entries */ + // make sure we parse macro library entries f->macro_actions(*this, name); pstring key = build_fqn(name); if (device_exists(key)) @@ -331,7 +327,7 @@ pstring setup_t::resolve_alias(const pstring &name) const pstring temp = name; pstring ret; - /* FIXME: Detect endless loop */ + // FIXME: Detect endless loop do { ret = temp; auto p = m_alias.find(ret); @@ -347,7 +343,7 @@ pstring setup_t::de_alias(const pstring &alias) const pstring temp = alias; pstring ret; - /* FIXME: Detect endless loop */ + // FIXME: Detect endless loop do { ret = temp; temp = ""; @@ -406,10 +402,10 @@ detail::core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, bool { const pstring &tname = resolve_alias(terminal_in); auto ret = m_terminals.find(tname); - /* look for default */ + // look for default if (ret == m_terminals.end()) { - /* look for ".Q" std output */ + // look for ".Q" std output ret = m_terminals.find(tname + ".Q"); } @@ -430,10 +426,10 @@ detail::core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, { const pstring &tname = resolve_alias(terminal_in); auto ret = m_terminals.find(tname); - /* look for default */ + // look for default if (ret == m_terminals.end() && atype == detail::terminal_type::OUTPUT) { - /* look for ".Q" std output */ + // look for ".Q" std output ret = m_terminals.find(tname + ".Q"); } if (ret == m_terminals.end() && required) @@ -489,7 +485,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(detail::core_terminal_t &out) auto new_proxy = out_cast.logic_family()->create_d_a_proxy(m_nlstate, x, &out_cast); m_proxy_cnt++; - /* connect all existing terminals to new net */ + // connect all existing terminals to new net for (auto & p : out.net().core_terms()) { @@ -534,7 +530,7 @@ devices::nld_base_proxy *setup_t::get_a_d_proxy(detail::core_terminal_t &inp) auto ret = new_proxy.get(); - /* connect all existing terminals to new net */ + // connect all existing terminals to new net if (inp.has_net()) { @@ -639,7 +635,7 @@ void setup_t::connect_terminal_output(terminal_t &in, detail::core_terminal_t &o if (out.is_analog()) { log().debug("connect_terminal_output: {1} {2}\n", in.name(), out.name()); - /* no proxy needed, just merge existing terminal net */ + // no proxy needed, just merge existing terminal net if (in.has_net()) merge_nets(out.net(), in.net()); else @@ -794,10 +790,10 @@ void setup_t::resolve_inputs() { log().verbose("Resolving inputs ..."); - /* Netlist can directly connect input to input. - * We therefore first park connecting inputs and retry - * after all other terminals were connected. - */ + // Netlist can directly connect input to input. + // We therefore first park connecting inputs and retry + // after all other terminals were connected. + unsigned tries = m_netlist_params->m_max_link_loops(); while (m_links.size() > 0 && tries > 0) { @@ -1113,7 +1109,7 @@ void setup_t::prepare_to_run() { register_dynamic_log_devices(); - /* make sure the solver and parameters are started first! */ + // make sure the solver and parameters are started first! for (auto & e : m_device_factory) { @@ -1129,12 +1125,12 @@ void setup_t::prepare_to_run() auto solver = m_nlstate.get_single_device("solver"); m_netlist_params = m_nlstate.get_single_device("parameter"); - /* set default model parameters */ + // set default model parameters m_models.register_model(plib::pfmt("NMOS_DEFAULT _(CAPMOD={1})")(m_netlist_params->m_mos_capmodel())); m_models.register_model(plib::pfmt("PMOS_DEFAULT _(CAPMOD={1})")(m_netlist_params->m_mos_capmodel())); - /* create devices */ + // create devices log().debug("Creating devices ...\n"); for (auto & e : m_device_factory) @@ -1190,7 +1186,7 @@ void setup_t::prepare_to_run() d.second->set_hint_deactivate(false); } - /* resolve inputs */ + // resolve inputs resolve_inputs(); log().verbose("looking for two terms connected to rail nets ..."); diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h index 728a8e656d0..caa25c6092f 100644 --- a/src/lib/netlist/nl_setup.h +++ b/src/lib/netlist/nl_setup.h @@ -38,7 +38,7 @@ #define DIPPINS(pin1, ...) \ setup.register_dippins_arr( # pin1 ", " # __VA_ARGS__); -/* to be used to reference new library truthtable devices */ +// to be used to reference new library truthtable devices #define NET_REGISTER_DEV(type, name) \ setup.register_dev(# type, # name); @@ -80,7 +80,6 @@ void NETLIST_NAME(name)(netlist::nlparse_t &setup) \ #define SUBMODEL(model, name) \ setup.namespace_push(# name); \ setup.include(# model); \ - /*NETLIST_NAME(model)(setup);*/ \ setup.namespace_pop(); #define OPTIMIZE_FRONTIER(attach, r_in, r_out) \ @@ -208,7 +207,7 @@ namespace netlist { public: void register_model(const pstring &model_in); - /* model / family related */ + // model / family related pstring value_str(const pstring &model, const pstring &entity); @@ -265,7 +264,7 @@ namespace netlist void register_lib_entry(const pstring &name, const pstring &sourcefile); void register_frontier(const pstring &attach, const nl_fptype r_IN, const nl_fptype r_OUT); - /* register a source */ + // register a source void register_source(plib::unique_ptr &&src) { m_sources.add_source(std::move(src)); @@ -273,25 +272,25 @@ namespace netlist void tt_factory_create(tt_desc &desc, const pstring &sourcefile); - /* handle namespace */ + // handle namespace void namespace_push(const pstring &aname); void namespace_pop(); - /* include other files */ + // include other files void include(const pstring &netlist_name); pstring build_fqn(const pstring &obj_name) const; void register_alias_nofqn(const pstring &alias, const pstring &out); - /* also called from devices for latebinding connected terminals */ + // also called from devices for latebinding connected terminals void register_link_fqn(const pstring &sin, const pstring &sout); - /* used from netlist.cpp (mame) */ + // used from netlist.cpp (mame) bool device_exists(const pstring &name) const; - /* FIXME: used by source_t - need a different approach at some time */ + // FIXME: used by source_t - need a different approach at some time bool parse_stream(plib::psource_t::stream_ptr &&istrm, const pstring &name); void add_include(plib::unique_ptr &&inc) @@ -312,13 +311,13 @@ namespace netlist log_type &log() { return m_log; } const log_type &log() const { return m_log; } - /* FIXME: sources may need access to the netlist parent type - * since they may be created in a context in which they don't - * have access to their environment. - * Example is the MAME memregion source. - * We thus need a better approach to creating netlists in a context - * other than static procedures. - */ + // FIXME: sources may need access to the netlist parent type + // since they may be created in a context in which they don't + // have access to their environment. + // Example is the MAME memregion source. + // We thus need a better approach to creating netlists in a context + // other than static procedures. + setup_t &setup() { return m_setup; } const setup_t &setup() const { return m_setup; } @@ -336,7 +335,7 @@ namespace netlist factory::list_t m_factory; - /* need to preserve order of device creation ... */ + // need to preserve order of device creation ... std::vector> m_device_factory; @@ -377,7 +376,7 @@ namespace netlist param_t *find_param(const pstring ¶m_in, bool required = true) const; - /* get family */ + // get family const logic_family_desc_t *family_from_model(const pstring &model); void register_dynamic_log_devices(); @@ -388,38 +387,44 @@ namespace netlist factory::list_t &factory() { return m_factory; } const factory::list_t &factory() const { return m_factory; } - /* helper - also used by nltool */ + // helper - also used by nltool pstring resolve_alias(const pstring &name) const; pstring de_alias(const pstring &alias) const; - /* needed by nltool */ + // needed by nltool std::vector get_terminals_for_device_name(const pstring &devname) const; log_type &log(); const log_type &log() const; - /* needed by proxy */ + // needed by proxy detail::core_terminal_t *find_terminal(const pstring &outname_in, const detail::terminal_type atype, bool required = true) const; detail::core_terminal_t *find_terminal(const pstring &terminal_in, bool required = true) const; - /* core net handling */ + // core net handling void delete_empty_nets(); - /* run preparation */ + // run preparation void prepare_to_run(); - /* validation */ - - /* The extended validation mode is not intended for running. - * The intention is to identify power pins which are not properly - * connected. The downside is that this mode creates a netlist which - * is different (and not able to run). - * - * Extended validation is supported by nltool validate option. - */ + /// \brief set extended validation mode. + /// + /// The extended validation mode is not intended for running. + /// The intention is to identify power pins which are not properly + /// connected. The downside is that this mode creates a netlist which + /// is different (and not able to run). + /// + /// Extended validation is supported by nltool validate option. + /// + /// \param val Boolean value enabling/disabling extended validation mode void set_extended_validation(bool val) { m_validation = val; } + + /// \brief State of extended validation mode. + /// + /// \returns boolean value indicating if extended validation mode is + /// turned on. bool is_extended_validation() const { return m_validation; } private: @@ -525,4 +530,4 @@ namespace netlist } // namespace netlist -#endif /* NLSETUP_H_ */ +#endif // NLSETUP_H_ diff --git a/src/lib/netlist/nltypes.h b/src/lib/netlist/nltypes.h index 1171d56cd34..2cebef3b428 100644 --- a/src/lib/netlist/nltypes.h +++ b/src/lib/netlist/nltypes.h @@ -1,14 +1,13 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/*! - * - * \file nltypes.h - * - */ -/* \note never change the name to nl_types.h. This creates a conflict - * with nl_types.h file provided by libc++ (clang, macosx) - */ +/// +/// \file nltypes.h +/// + +/// \note never change the name to nl_types.h. This creates a conflict +/// with nl_types.h file provided by libc++ (clang, macosx) +/// #ifndef NLTYPES_H_ #define NLTYPES_H_ @@ -26,41 +25,36 @@ namespace netlist { - /*! @brief plib::constants struct specialized for nl_fptype - * - */ + /// @brief plib::constants struct specialized for nl_fptype. + /// struct nlconst : public plib::constants { }; - /*! @brief netlist_sig_t is the type used for logic signals. - * - * This may be any of bool, uint8_t, uint16_t, uin32_t and uint64_t. - * The choice has little to no impact on performance. - */ + /// @brief netlist_sig_t is the type used for logic signals. + /// + /// This may be any of bool, uint8_t, uint16_t, uin32_t and uint64_t. + /// The choice has little to no impact on performance. + /// using netlist_sig_t = std::uint32_t; - /* FIXME: belongs into nl_base.h to nlstate */ - /** - * @brief Interface definition for netlist callbacks into calling code - * - * A class inheriting from netlist_callbacks_t has to be passed to the netlist_t - * constructor. Netlist does processing during construction and thus needs - * the object passed completely constructed. - * - */ + /// @brief Interface definition for netlist callbacks into calling code + /// + /// A class inheriting from netlist_callbacks_t has to be passed to the netlist_t + /// constructor. Netlist does processing during construction and thus needs + /// the object passed completely constructed. + /// class callbacks_t { public: callbacks_t() = default; - /* what is done before this is passed as a unique_ptr to netlist - * we should not limit. - */ virtual ~callbacks_t() = default; + COPYASSIGNMOVE(callbacks_t, default) - /* logging callback */ + /// \brief logging callback. + /// virtual void vlog(const plib::plog_level &l, const pstring &ls) const noexcept = 0; }; @@ -71,11 +65,10 @@ namespace netlist // Types needed by various includes //============================================================ - /*! The memory pool for netlist objects - * - * \note This is not the right location yet. - * - */ + /// \brief The memory pool for netlist objects + /// + /// \note This is not the right location yet. + /// #if (NL_USE_MEMPOOL) using nlmempool = plib::mempool; @@ -83,15 +76,14 @@ namespace netlist using nlmempool = plib::aligned_arena; #endif - /*! Owned pointer type for pooled allocations. - * - */ + /// \brief Owned pointer type for pooled allocations. + /// template using owned_pool_ptr = nlmempool::owned_pool_ptr; - /*! Unique pointer type for pooled allocations. - * - */ + /// \brief Unique pointer type for pooled allocations. + /// + template using unique_pool_ptr = nlmempool::unique_pool_ptr; @@ -103,11 +95,12 @@ namespace netlist namespace detail { - /*! Enum specifying the type of object */ + /// \brief Enum specifying the type of object + /// enum class terminal_type { - TERMINAL = 0, /*!< object is an analog terminal */ - INPUT = 1, /*!< object is an input */ - OUTPUT = 2, /*!< object is an output */ + TERMINAL = 0, ///< object is an analog terminal + INPUT = 1, ///< object is an input + OUTPUT = 2, ///< object is an output }; } // namespace detail @@ -138,4 +131,4 @@ namespace plib { } } // namespace plib -#endif /* NLTYPES_H_ */ +#endif // NLTYPES_H_ -- cgit v1.2.3