Class ElemData
Defined in File ElemData.hpp
Inheritance Relationships
Derived Types
public elem::IonizationData(Class IonizationData)public elem::IsotopeData(Class IsotopeData)
Class Documentation
-
class ElemData
Compile-time elemental identity: atomic symbol and atomic number.
All members, the constructor, observer methods, and comparison operators are constexpr, allowing compile-time construction and use. Comparison operators compare on atomic number Z, enabling sorting of element lists by Z. Serves as a base class for more specific per-element data records, such as ionization potentials or isotopic data.
Subclassed by elem::IonizationData, elem::IsotopeData
Public Functions
-
inline constexpr ElemData(std::array<char, 2> symbol, unsigned int z) noexcept
Construct an ElemData record.
- Parameters:
symbol – Two-character atomic symbol; single-char symbols use ‘\0’ as the second character (e.g. {‘H’, ‘\0’})
z – Atomic number
-
~ElemData() = default
-
inline constexpr auto symbol() const noexcept -> const std::array<char, 2>&
Return the two-character atomic symbol.
-
inline constexpr auto Z() const noexcept -> unsigned int
Return the atomic number.
-
inline constexpr ElemData(std::array<char, 2> symbol, unsigned int z) noexcept