DIP commands
-
class DIPParse
- #include <dip_parse.h>
Parsing of a DIP code
Public Types
Public Functions
-
inline DIPParse()
Default class constructor
-
void argument_add(const std::string &add_type, const std::vector<std::string> &add_values)
Add code
- Parameters:
add_type – project/file/string/override_string/override_file (one value), source/unit/schema_string/schema_file (name and value)
add_values – Code input values
-
void argument_load(const std::string &file)
Load an evaluated DIPH5 environment during execute(), instead of parsing. Cannot be combined with argument_add(). The file path must be nonempty.
-
void argument_save(const std::string &file)
Save the complete evaluated environment during execute(), overwriting file. Request/tag filters affect text output only. The file path must be nonempty. Saving occurs after successful output validation.
-
void argument_generate(const std::string &format, const std::string &file)
Generate static parameters during execute(). format is one of cpp, c, fortran, rust, julia, json, or yaml.
-
void argument_request(const std::string &path)
Set a request path
- Parameters:
path – Requested node path
-
void argument_tags(const std::vector<std::string> &list)
Set a list of node tags
- Parameters:
list – List of tags that should be selected
-
void argument_print()
Print parsed nodes with values
-
void argument_value(const std::string &type = "")
Print exactly one unitless scalar, without a name or string quotes. type is empty, bool, integer, float, or string.
-
dip::Environment evaluate()
Evaluate configured DIPL inputs or load a DIPH5 snapshot. Shared by command-line consumers that need the full environment.
-
std::string execute()
Executed parsing command
- Returns:
Parsed output
-
inline DIPParse()
Report generation
-
void snt::api::generate_dip_report(const dip::Environment &environment, dip::report::ReportFormat format, const std::filesystem::path &output, const dip::report::ReportOptions &options = {})
Generate a report from an evaluated DIP environment.