diff options
Diffstat (limited to 'src/lib/netlist/nltypes.h')
-rw-r--r-- | src/lib/netlist/nltypes.h | 83 |
1 files changed, 38 insertions, 45 deletions
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<nl_fptype> { }; - /*! @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 <typename T> using owned_pool_ptr = nlmempool::owned_pool_ptr<T>; - /*! Unique pointer type for pooled allocations. - * - */ + /// \brief Unique pointer type for pooled allocations. + /// + template <typename T> using unique_pool_ptr = nlmempool::unique_pool_ptr<T>; @@ -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_ |