NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
SymDefManager Class Reference

This class handles the file-static constants, which are more or less macros similar to #define in C/C++. More...

#include <symdef.hpp>

Collaboration diagram for SymDefManager:

Public Member Functions

 SymDefManager ()
 
void resolveSymbols (std::string &sCommandLine) const
 Resolve all file-static constant declarations in the current line. More...
 
void createSymbol (const std::string &sCommandLine)
 Create one or more new file-static constant declarations for the current file. More...
 
bool isSymbol (const std::string &sSymbol) const
 Check, whether the passed string is a defined symbol (will be used by the static code analyzer). More...
 
void clear ()
 Remove all file-static constant declarations. More...
 

Private Attributes

std::map< std::string, std::string > m_symDefs
 

Detailed Description

This class handles the file-static constants, which are more or less macros similar to #define in C/C++.

Definition at line 31 of file symdef.hpp.

Constructor & Destructor Documentation

◆ SymDefManager()

SymDefManager::SymDefManager ( )
inline

Definition at line 37 of file symdef.hpp.

Member Function Documentation

◆ clear()

void SymDefManager::clear ( )

Remove all file-static constant declarations.

Returns
void

Definition at line 33 of file symdef.cpp.

References m_symDefs.

Referenced by Script::close(), Script::openScript(), and CodeAnalyzer::run().

◆ createSymbol()

void SymDefManager::createSymbol ( const std::string &  sCommandLine)

Create one or more new file-static constant declarations for the current file.

Parameters
sCommandLineconst std::string&
Returns
void

Definition at line 72 of file symdef.cpp.

References getAllArguments(), m_symDefs, resolveSymbols(), and StripSpaces().

Referenced by CodeAnalyzer::analyseCommands(), Script::handleLocalDefinitions(), parseLayoutScript(), and ProcedureElement::ProcedureElement().

Here is the call graph for this function:

◆ isSymbol()

bool SymDefManager::isSymbol ( const std::string &  sSymbol) const

Check, whether the passed string is a defined symbol (will be used by the static code analyzer).

Parameters
sSymbolconst std::string&
Returns
bool

Definition at line 117 of file symdef.cpp.

References m_symDefs.

Referenced by CodeAnalyzer::analyseCommands(), and CodeAnalyzer::analyseIdentifiers().

◆ resolveSymbols()

void SymDefManager::resolveSymbols ( std::string &  sCommandLine) const

Resolve all file-static constant declarations in the current line.

Parameters
sCommandLinestd::string&
Returns
void

Definition at line 47 of file symdef.cpp.

References findVariableInExpression(), and m_symDefs.

Referenced by createSymbol(), Script::handleLocalDefinitions(), parseLayoutScript(), and ProcedureElement::ProcedureElement().

Here is the call graph for this function:

Member Data Documentation

◆ m_symDefs

std::map<std::string, std::string> SymDefManager::m_symDefs
private

Definition at line 34 of file symdef.hpp.

Referenced by clear(), createSymbol(), isSymbol(), and resolveSymbols().


The documentation for this class was generated from the following files: