#include <ModelicaFile.hpp>
Public Member Functions | |
| ClassDefinition | addClassDefinition (const std::string &text) |
Append a new class definition represented by text to the file. | |
| ClassDefinition | getClassDefinitionByName (const std::string &name) |
Retrieve the class definition whose long class specifier matches name. | |
| std::vector< ClassDefinition > | getClassDefinitions () |
| Retrieve all top-level class definitions contained in the file. | |
| std::string | getText () const |
| Return the raw Modelica source text represented by this file. | |
| ModelicaFile (const openstudio::path &path) | |
Construct a ModelicaFile by reading and parsing the file located at path. | |
| void | parse (const std::string &text) |
| Parse Modelica source text, replacing the current contents. | |
| std::string | printTree () const |
| Return a formatted representation of the parse tree primarily for debugging. | |
| ~ModelicaFile () | |
| Destroy the ModelicaFile. | |
Special member functions | |
| ModelicaFile (const ModelicaFile &other) | |
| Copy-construct a ModelicaFile, sharing the underlying implementation. | |
| ModelicaFile (ModelicaFile &&other) noexcept | |
| Move-construct a ModelicaFile, transferring ownership of the implementation. | |
| ModelicaFile & | operator= (const ModelicaFile &other) |
| Copy-assign a ModelicaFile, sharing the underlying implementation. | |
| ModelicaFile & | operator= (ModelicaFile &&other) noexcept |
| Move-assign a ModelicaFile, transferring ownership of the implementation. | |
A parsed Modelica source file backed by the OpenStudio Modelica parser.
ModelicaFile owns the parsed token stream and exposes helper methods for interrogating and mutating the class definitions contained in the file.
| openstudio::modelica::ModelicaFile::ModelicaFile | ( | const openstudio::path & | path | ) |
Construct a ModelicaFile by reading and parsing the file located at path.
| openstudio::modelica::ModelicaFile::ModelicaFile | ( | const ModelicaFile & | other | ) |
Copy-construct a ModelicaFile, sharing the underlying implementation.
|
noexcept |
Move-construct a ModelicaFile, transferring ownership of the implementation.
| openstudio::modelica::ModelicaFile::~ModelicaFile | ( | ) |
Destroy the ModelicaFile.
| ClassDefinition openstudio::modelica::ModelicaFile::addClassDefinition | ( | const std::string & | text | ) |
Append a new class definition represented by text to the file.
| ClassDefinition openstudio::modelica::ModelicaFile::getClassDefinitionByName | ( | const std::string & | name | ) |
Retrieve the class definition whose long class specifier matches name.
| std::vector< ClassDefinition > openstudio::modelica::ModelicaFile::getClassDefinitions | ( | ) |
Retrieve all top-level class definitions contained in the file.
| std::string openstudio::modelica::ModelicaFile::getText | ( | ) | const |
Return the raw Modelica source text represented by this file.
| ModelicaFile & openstudio::modelica::ModelicaFile::operator= | ( | const ModelicaFile & | other | ) |
Copy-assign a ModelicaFile, sharing the underlying implementation.
|
noexcept |
Move-assign a ModelicaFile, transferring ownership of the implementation.
| void openstudio::modelica::ModelicaFile::parse | ( | const std::string & | text | ) |
Parse Modelica source text, replacing the current contents.
| std::string openstudio::modelica::ModelicaFile::printTree | ( | ) | const |
Return a formatted representation of the parse tree primarily for debugging.