NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class contains the pre-parsed contents of a single procedure file. More...
#include <procedureelement.hpp>
Public Member Functions | |
ProcedureElement (const StyledTextFile &procedureContents, const std::string &sFolderPath) | |
Procedure element constructor. This class is always heap allocated. More... | |
~ProcedureElement () | |
Destructor. Cleares the dependency list. More... | |
std::pair< int, ProcedureCommandLine > | getFirstLine () |
This function returns the first line of the stored file. More... | |
std::pair< int, ProcedureCommandLine > | getCurrentLine (int currentLine) |
This function returns the selected line of the stored file. This member function will be used in combination with the the member function "gotoProcedure()". More... | |
std::pair< int, ProcedureCommandLine > | getNextLine (int currentline) |
This member function returns the line after the current selected line. This is probably not the same as nCurrentLine++, because line comments and empty lines were omitted during the pre-parsing step. More... | |
int | gotoProcedure (const std::string &sProcedureName) |
This member function returns the line of the stored file, where the desired procedure may be found or -1 if the procedure is not found in the current file. More... | |
std::string | getFileName () const |
bool | isLastLine (int currentline) |
This member function determines, whether the current line is the last line of the stored procedure file. More... | |
void | setByteCode (int _nByteCode, int nCurrentLine) |
This member function can be used to store the created byte code in the current procedure command line. More... | |
Dependencies * | getDependencies () |
This member function returns the first-level dependencies of the current procedure file. The dependencies are only calculated once and refreshed, if the current procedure has been saved. More... | |
Private Member Functions | |
void | cleanCurrentLine (std::string &sProcCommandLine, const std::string &sCurrentCommand, const std::string &sFilePath) |
This member function does the hard work on cleaning the current procedure command line. This includes removing tabulators, definition operators and replacing the "<this>" path placeholder. More... | |
Private Attributes | |
std::vector< std::pair< int, ProcedureCommandLine > > | mProcedureContents |
std::map< std::string, int > | mProcedureList |
std::string | sFileName |
Dependencies * | m_dependencies |
This class contains the pre-parsed contents of a single procedure file.
Definition at line 36 of file procedureelement.hpp.
ProcedureElement::ProcedureElement | ( | const StyledTextFile & | procedureContents, |
const std::string & | sFilePath | ||
) |
Procedure element constructor. This class is always heap allocated.
procedureContents | const StyledTextFile& |
sFilePath | const std::string& |
Definition at line 36 of file procedureelement.cpp.
References date::abs(), cleanCurrentLine(), SymDefManager::createSymbol(), findCommand(), findParameter(), ProcedureCommandLine::FLAG_EVENT, ProcedureCommandLine::FLAG_EXPLICIT, ProcedureCommandLine::FLAG_INLINE, ProcedureCommandLine::FLAG_MACRO, ProcedureCommandLine::FLAG_MASK, ProcedureCommandLine::FLAG_NONE, ProcedureCommandLine::FLAG_PRIVATE, ProcedureCommandLine::FLAG_TEMPLATE, ProcedureCommandLine::FLAG_TEST, getArgAtPos(), StyledTextFile::getLinesCount(), getMatchingParenthesis(), StyledTextFile::getStrippedLine(), SyntaxError::INSTALL_CMD_FOUND, Includer::is_including_syntax(), mProcedureContents, mProcedureList, SymDefManager::resolveSymbols(), sFileName, Match::sString, StripSpaces(), SYMDEF_COMMAND, toString(), ProcedureCommandLine::TYPE_PROCEDURE_BODY, ProcedureCommandLine::TYPE_PROCEDURE_FOOT, ProcedureCommandLine::TYPE_PROCEDURE_HEAD, SyntaxError::UNMATCHED_PARENTHESIS, validateParenthesisNumber(), and SyntaxError::WRONG_ARG_NAME.
ProcedureElement::~ProcedureElement | ( | ) |
Destructor. Cleares the dependency list.
Definition at line 289 of file procedureelement.cpp.
References m_dependencies.
|
private |
This member function does the hard work on cleaning the current procedure command line. This includes removing tabulators, definition operators and replacing the "<this>" path placeholder.
sProcCommandLine | std::string& |
sCurrentCommand | const std::string& |
sFolderPath | const std::string& |
Definition at line 309 of file procedureelement.cpp.
References findCommand(), and StripSpaces().
Referenced by ProcedureElement().
std::pair< int, ProcedureCommandLine > ProcedureElement::getCurrentLine | ( | int | nCurrentLine | ) |
This function returns the selected line of the stored file. This member function will be used in combination with the the member function "gotoProcedure()".
nCurrentLine | int |
Definition at line 369 of file procedureelement.cpp.
References mProcedureContents.
Referenced by Procedure::execute(), Procedure::getInlined(), Dependencies::getProcedureDependencies(), and Procedure::isInlineable().
Dependencies * ProcedureElement::getDependencies | ( | ) |
This member function returns the first-level dependencies of the current procedure file. The dependencies are only calculated once and refreshed, if the current procedure has been saved.
Definition at line 495 of file procedureelement.cpp.
References m_dependencies.
Referenced by DependencyDialog::calculateDependencies(), PackageDialog::followBranch(), DocumentationGenerator::followBranch(), and DocumentationGenerator::parseDocumentation().
|
inline |
Definition at line 54 of file procedureelement.hpp.
References sFileName.
Referenced by Dependencies::Dependencies(), and Dependencies::getProcedureDependencies().
std::pair< int, ProcedureCommandLine > ProcedureElement::getFirstLine | ( | ) |
This function returns the first line of the stored file.
Definition at line 353 of file procedureelement.cpp.
References mProcedureContents.
Referenced by Dependencies::walk().
std::pair< int, ProcedureCommandLine > ProcedureElement::getNextLine | ( | int | nCurrentLine | ) |
This member function returns the line after the current selected line. This is probably not the same as nCurrentLine++, because line comments and empty lines were omitted during the pre-parsing step.
nCurrentLine | int |
Definition at line 397 of file procedureelement.cpp.
References mProcedureContents.
Referenced by Procedure::execute(), Procedure::getInlined(), Dependencies::getProcedureDependencies(), and Procedure::isInlineable().
int ProcedureElement::gotoProcedure | ( | const std::string & | sProcedureName | ) |
This member function returns the line of the stored file, where the desired procedure may be found or -1 if the procedure is not found in the current file.
sProcedureName | const std::string& |
Definition at line 446 of file procedureelement.cpp.
References mProcedureList.
Referenced by Procedure::execute(), Procedure::getInlined(), and Procedure::isInlineable().
bool ProcedureElement::isLastLine | ( | int | nCurrentLine | ) |
This member function determines, whether the current line is the last line of the stored procedure file.
nCurrentLine | int |
Definition at line 423 of file procedureelement.cpp.
References mProcedureContents.
Referenced by Procedure::execute(), Procedure::getInlined(), Dependencies::getProcedureDependencies(), Procedure::isInlineable(), and Dependencies::walk().
void ProcedureElement::setByteCode | ( | int | _nByteCode, |
int | nCurrentLine | ||
) |
This member function can be used to store the created byte code in the current procedure command line.
Note that it is not reasonable to store the byte code in the already obtained procedure command line, because this object will be destroyed after its evaluation.
_nByteCode | int |
nCurrentLine | int |
Definition at line 472 of file procedureelement.cpp.
References mProcedureContents.
Referenced by Procedure::execute().
|
private |
Definition at line 42 of file procedureelement.hpp.
Referenced by getDependencies(), and ~ProcedureElement().
|
private |
Definition at line 39 of file procedureelement.hpp.
Referenced by getCurrentLine(), getFirstLine(), getNextLine(), isLastLine(), ProcedureElement(), and setByteCode().
|
private |
Definition at line 40 of file procedureelement.hpp.
Referenced by gotoProcedure(), and ProcedureElement().
|
private |
Definition at line 41 of file procedureelement.hpp.
Referenced by getFileName(), and ProcedureElement().