8 #include <fmt/format.h>
15 : m_processor(std::move(processor)) {
22 : m_path(std::move(path)), m_fits(nullptr, fits::
DefaultClose) {
23 auto entry = std::filesystem::directory_entry(m_path);
24 if (!entry.exists()) {
28 throw std::invalid_argument(
29 fmt::format(
"source path must be a regular file: '{}'", m_path.c_str()));
34 : m_path(std::move(path)), m_fits(std::move(file)) {
40 : std::invalid_argument(fmt::format(
"source path not found: '{}' ", path).c_str()) {
44 std::filesystem::path path,
45 std::unique_ptr<KeywordRuleProcessor> keyword_rules)
46 : base::
Source(std::move(name))
47 , base::FitsFile(std::move(path), fits::
OpenMode::ReadWrite)
48 , base::KeywordRules(std::move(keyword_rules)) {
52 std::filesystem::path path,
53 std::unique_ptr<KeywordRuleProcessor> keyword_rules,
55 : base::
Source(std::move(name))
56 , base::FitsFile(std::move(path), std::move(file))
57 , base::KeywordRules(std::move(keyword_rules)) {
61 std::filesystem::path path,
63 std::unique_ptr<KeywordRuleProcessor> keyword_rules)
64 : base::
Source(std::move(name))
65 , base::FitsFile(std::move(path), fits::
OpenMode::ReadOnly)
66 , base::KeywordRules(std::move(keyword_rules))
67 , m_origin(std::move(origin)) {
72 std::unique_ptr<KeywordRuleProcessor> keyword_rules) noexcept
75 , m_keywords(std::move(keywords)) {