Loading...
Searching...
No Matches
gridfire::io::gen Namespace Reference

Namespace for generative input/output functionalities. More...

## Classes

struct | PyFunctionDef
| Structure representing a Python function definition. More...

## Functions

PyFunctionDef | exportReactionToPy (const reaction::Reaction &reaction)
| Exports a reaction to a Python function definition.
std::string | exportEngineToPy (const engine::DynamicEngine &engine)
| Exports a dynamic engine to a Python script.
void | exportEngineToPy (const engine::DynamicEngine &engine, const std::string &fileName)
| Exports a dynamic engine to a Python file.

## Detailed Description

Namespace for generative input/output functionalities.

This namespace contains functions and structures related to exporting reactions and engines to Python code. It provides tools to convert internal representations of reactions and engines into Python functions and scripts that can be used for further analysis or integration with Python-based workflows.

## Function Documentation

## exportEngineToPy() [1/2]

std::string gridfire::io::gen::exportEngineToPy | ( | const engine::DynamicEngine & | engine | ) |

Exports a dynamic engine to a Python script.

Parameters

  engine | The dynamic engine to export.

Returns
  A string containing the Python script representation of the engine.

This function converts the given dynamic engine into a Python script that can be used to recreate the engine's functionality in Python.

## exportEngineToPy() [2/2]

void gridfire::io::gen::exportEngineToPy | ( | const engine::DynamicEngine & | engine,
|  | const std::string & | fileName
| ) |  |

Exports a dynamic engine to a Python file.

Parameters

  engine | The dynamic engine to export.
  fileName | The name of the file to write the Python script to.

This function writes the Python script representation of the given dynamic engine to the specified file.

## exportReactionToPy()

PyFunctionDef gridfire::io::gen::exportReactionToPy | ( | const reaction::Reaction & | reaction | ) |

Exports a reaction to a Python function definition.

Parameters

  reaction | The reaction to export.

Returns
  A PyFunctionDef structure containing the Python function representation of the reaction.

This function converts the given reaction into a Python function definition, including the necessary code and module requirements.