.. _program_listing_file_src_elem_ElemData.hpp: Program Listing for File ElemData.hpp ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/elem/ElemData.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef ELEMDATA_HPP #define ELEMDATA_HPP #include namespace elem { class ElemData { public: constexpr ElemData(std::array symbol, unsigned int z) noexcept : symbol_(symbol), Z_(z) {} ElemData(const ElemData&) = default; auto operator=(const ElemData&) -> ElemData& = default; ElemData(ElemData&&) = default; auto operator=(ElemData&&) -> ElemData& = default; ~ElemData() = default; [[nodiscard]] constexpr auto symbol() const noexcept -> const std::array& { return symbol_; } [[nodiscard]] constexpr auto Z() const noexcept // NOLINT(readability-identifier-naming) -> unsigned int { return Z_; } constexpr auto operator==(const ElemData& o) const noexcept -> bool { return Z_ == o.Z_; } constexpr auto operator!=(const ElemData& o) const noexcept -> bool { return Z_ != o.Z_; } constexpr auto operator< (const ElemData& o) const noexcept -> bool { return Z_ < o.Z_; } constexpr auto operator> (const ElemData& o) const noexcept -> bool { return Z_ > o.Z_; } constexpr auto operator<=(const ElemData& o) const noexcept -> bool { return Z_ <= o.Z_; } constexpr auto operator>=(const ElemData& o) const noexcept -> bool { return Z_ >= o.Z_; } protected: std::array symbol_; unsigned int Z_; // NOLINT(readability-identifier-naming) -- physics naming convention }; } // namespace elem #endif // ELEMDATA_HPP