Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ModelFileChecker.h
Go to the documentation of this file.
1#ifndef MODEL_FILE_CHECKER_H
2#define MODEL_FILE_CHECKER_H
3
4#include <string>
5#include <fstream>
6#include <iostream>
7#include <regex>
8#include <optional>
9#include <vector>
10
21 std::string class_name;
22 bool is_template = false;
23};
24
37public:
42 ModelFileChecker(const std::string& filePath);
43
50 bool isAnyModelTemplate() const;
51
69 ModelClassInfo resolveModelClass(const std::string& model) const;
70
74 static std::vector<std::string> modelClassCandidates(const std::string& model);
75
76private:
77 std::string readContents() const;
78 static bool hasClassDefinition(const std::string& contents,
79 const std::string& class_name,
80 bool& is_template);
81 static std::string regexEscape(const std::string& value);
82
84 std::string filePath;
85};
86
87#endif
Checks and resolves MARTY model classes in a model header.
static std::vector< std::string > modelClassCandidates(const std::string &model)
Return the exact candidate sequence used by resolveModelClass.
ModelClassInfo resolveModelClass(const std::string &model) const
Resolve the concrete C++ class name for a user-provided model name.
bool isAnyModelTemplate() const
Tests whether the file contains any MARTY model template class.
std::string class_name