LCOV - code coverage report
Current view: top level - include/pairinteraction/ket - KetAtomCreator.hpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2026-08-14 15:36:24 Functions: 1 1 100.0 %

          Line data    Source code
       1             : // SPDX-FileCopyrightText: 2024 PairInteraction Developers
       2             : // SPDX-License-Identifier: LGPL-3.0-or-later
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <memory>
       7             : #include <optional>
       8             : #include <string>
       9             : #include <type_traits>
      10             : #include <unordered_map>
      11             : 
      12             : namespace pairinteraction {
      13             : class Database;
      14             : 
      15             : class KetAtom;
      16             : 
      17             : /**
      18             :  * @class KetAtomCreator
      19             :  *
      20             :  * @brief Builder class for creating KetAtom objects.
      21             :  */
      22             : class KetAtomCreator {
      23             : public:
      24         482 :     KetAtomCreator() = default;
      25             :     KetAtomCreator(std::string species, int n, double l, double j, double m);
      26             :     KetAtomCreator &set_species(const std::string &value);
      27             :     KetAtomCreator &set_energy(double value);
      28             :     // Set the quantum number with the given logical name (e.g. "f", "m", "n", "nu", "l", ...).
      29             :     // The parity is set via the name "parity" with a value of +1 (even) or -1 (odd).
      30             :     KetAtomCreator &set_quantum_number(const std::string &name, double value);
      31             :     std::shared_ptr<const KetAtom> create(Database &database) const;
      32             : 
      33             : private:
      34             :     std::optional<std::string> species;
      35             :     std::optional<double> energy;
      36             :     std::unordered_map<std::string, double> quantum_numbers;
      37             : };
      38             : 
      39             : } // namespace pairinteraction

Generated by: LCOV version 1.16