diff options
author | 2019-11-08 23:52:14 +0100 | |
---|---|---|
committer | 2019-11-08 23:52:14 +0100 | |
commit | 88f702b416ba9eb930e6c1e932124d5f24b1a24c (patch) | |
tree | 955f3047b79156d7b2bbab55fcbd4fbc94661f1d /src/lib/netlist/plib/pexception.h | |
parent | 731c4fe52073a7a7561bf04559e9f0b3b791388d (diff) |
netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
Diffstat (limited to 'src/lib/netlist/plib/pexception.h')
-rw-r--r-- | src/lib/netlist/plib/pexception.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/lib/netlist/plib/pexception.h b/src/lib/netlist/plib/pexception.h index ba99b71cf73..7317a320e28 100644 --- a/src/lib/netlist/plib/pexception.h +++ b/src/lib/netlist/plib/pexception.h @@ -1,13 +1,13 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * palloc.h - * - */ #ifndef PEXCEPTION_H_ #define PEXCEPTION_H_ +/// +/// \file: pexception.h +/// + #include "pstring.h" #include "ptypes.h" @@ -15,19 +15,18 @@ namespace plib { - /*! Terminate the program. - * - * \note could be enhanced by setting a termination handler - */ + /// \brief Terminate the program. + /// + /// \note could be enhanced by setting a termination handler + /// [[noreturn]] void terminate(const pstring &msg) noexcept; - - ///! throw an exception. + /// \brief throw an exception. /// /// throws an exception E. The purpose is to clearly identify exception /// throwing in the code /// - /// @tparam E Type of exception to be thrown + /// \tparam E Type of exception to be thrown /// template<typename E, typename... Args> [[noreturn]] static inline void pthrow(Args&&... args) noexcept(false) @@ -87,9 +86,9 @@ namespace plib { explicit out_of_mem_e(const pstring &location); }; - /* FIXME: currently only a stub for later use. More use could be added by - * using “-fnon-call-exceptions" and sigaction to enable c++ exception supported. - */ + // FIXME: currently only a stub for later use. More use could be added by + // using “-fnon-call-exceptions" and sigaction to enable c++ exception supported. + // class fpexception_e : public pexception { @@ -104,10 +103,8 @@ namespace plib { static constexpr unsigned FP_INVALID = 0x00010; static constexpr unsigned FP_ALL = 0x0001f; - /* - * Catch SIGFPE on linux for debugging purposes. - */ - + /// \brief Catch SIGFPE on linux for debugging purposes. + /// class fpsignalenabler { public: @@ -117,9 +114,16 @@ namespace plib { ~fpsignalenabler(); - /* is the functionality supported ? */ + /// \brief is the functionality supported. + /// + /// \return current status + /// static bool supported(); - /* returns last global enable state */ + /// \brief get/set global enable status + /// + /// \param enable new status + /// \return returns last global enable state + /// static bool global_enable(bool enable); private: @@ -131,4 +135,4 @@ namespace plib { } // namespace plib -#endif /* PEXCEPTION_H_ */ +#endif // PEXCEPTION_H_ |