Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
Extractor Class Reference

Parses C++ code to find MARTY parameter declarations. More...

#include <Extractor.h>

Classes

struct  Parameter
 Simple descriptor for a discovered parameter. More...
 

Static Public Member Functions

static std::vector< Parameterextract (const std::string &filename)
 Extracts all parameter declarations from a given C++ file.
 

Detailed Description

Parses C++ code to find MARTY parameter declarations.

The Extractor looks for lines of the form:

csl::InitSanitizer<real_t> x { "name" };
csl::InitSanitizer<complex_t> y { "name" };

and returns a vector of lightweight descriptors containing the variable name, the human-readable name and whether the parameter is complex.

Definition at line 32 of file Extractor.h.

Member Function Documentation

◆ extract()

std::vector< Extractor::Parameter > Extractor::extract ( const std::string &  filename)
static

Extracts all parameter declarations from a given C++ file.

The function scans the file with regular expressions looking for csl::InitSanitizer<real_t> and csl::InitSanitizer<complex_t> patterns.

Parameters
filenamePath to the C++ file to analyze.
Returns
A vector of discovered Parameter descriptors.

Definition at line 3 of file Extractor.cpp.


The documentation for this class was generated from the following files: