NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class manages all already read and possibly pre-parsed procedure files for easier and faster access. More...
#include <procedurelibrary.hpp>
Public Member Functions | |
~ProcedureLibrary () | |
Destructor avoiding memory leaks. Releases the memory allocated for each ProcedureElement. More... | |
ProcedureElement * | getProcedureContents (const std::string &sProcedureFileName) |
Returns the ProcedureElement pointer to the desired procedure file. It also creates the element, if it doesn't already exist. More... | |
void | updateLibrary () |
Perform an update, e.g. if a procedure was deleted. More... | |
Private Member Functions | |
ProcedureElement * | constructProcedureElement (const std::string &sProcedureFileName) |
Constructs a new ProcedureElement, if the file exists. Otherwise returns a nullptr. More... | |
StyledTextFile | getFileContents (const std::string &sProcedureFileName) |
Reads the contents of the passed file and returns it as a std::vector. More... | |
Private Attributes | |
std::map< std::string, ProcedureElement * > | mLibraryEntries |
This class manages all already read and possibly pre-parsed procedure files for easier and faster access.
Definition at line 33 of file procedurelibrary.hpp.
ProcedureLibrary::~ProcedureLibrary | ( | ) |
Destructor avoiding memory leaks. Releases the memory allocated for each ProcedureElement.
Definition at line 29 of file procedurelibrary.cpp.
References mLibraryEntries.
|
private |
Constructs a new ProcedureElement, if the file exists. Otherwise returns a nullptr.
sProcedureFileName | const std::string& |
Definition at line 44 of file procedurelibrary.cpp.
References fileExists(), and getFileContents().
Referenced by getProcedureContents(), and updateLibrary().
|
private |
Reads the contents of the passed file and returns it as a std::vector.
sProcedureFileName | const std::string& |
Definition at line 63 of file procedurelibrary.cpp.
References SyntaxError::FILE_NOT_EXIST, StyledTextFile::getLinesCount(), and SyntaxError::invalid_position.
Referenced by constructProcedureElement().
ProcedureElement * ProcedureLibrary::getProcedureContents | ( | const std::string & | sProcedureFileName | ) |
Returns the ProcedureElement pointer to the desired procedure file. It also creates the element, if it doesn't already exist.
sProcedureFileName | const std::string& |
Definition at line 84 of file procedurelibrary.cpp.
References constructProcedureElement(), SyntaxError::FILE_NOT_EXIST, SyntaxError::invalid_position, and mLibraryEntries.
Referenced by DependencyDialog::calculateDependencies(), Procedure::execute(), PackageDialog::followBranch(), DocumentationGenerator::followBranch(), Procedure::getInlined(), Procedure::isInlineable(), and DocumentationGenerator::parseDocumentation().
void ProcedureLibrary::updateLibrary | ( | ) |
Perform an update, e.g. if a procedure was deleted.
Definition at line 107 of file procedurelibrary.cpp.
References constructProcedureElement(), and mLibraryEntries.
Referenced by NumeReTerminal::Entry().
|
private |
Definition at line 36 of file procedurelibrary.hpp.
Referenced by getProcedureContents(), updateLibrary(), and ~ProcedureLibrary().