|
MicroModelicaCCompiler
4.5.3
|
#include <util.hpp>

Public Member Functions | |
| ~Utils () | |
| std::string | trimString (std::string str) |
| std::string | languageEspecification () |
| bool | checkTypeString (std::string t) |
| bool | checkExperimentAnnotations (std::string *annotation) |
| std::string | opString (BinOpType bot) |
| std::string | iteratorVar (int dim) |
| std::string | getVarName (std::string name) |
| bool | readPackage (std::string fileName, IR::CompiledPackageTable &pt) |
| Option< IR::CompiledPackage > | readPackage (std::string file_name, bool full_path=false, std::string package_name="") |
| bool | searchCompiledPackage (std::string pname, CompileFlags flags) |
| std::string | packagePath (std::string pname, CompileFlags flags, std::string ext=".mo") |
| void | setCompileFlags (CompileFlags flags) |
| std::string | packageName (std::string name) |
| std::string | environmentVariable (std::string ev) |
| std::string | getFilePath (std::string file) |
| std::string | getFileName (std::string file) |
| std::string | baseFileName (std::string file) |
| bool | checkGKLinkFunctions (std::string name) |
| IR::CompiledFunctionTable | compiledFunctions () |
| void | addCompiledFunction (IR::CompiledFunction f) |
| void | addCompiledFunctions (IR::CompiledFunctionTable fs) |
| bool | checkCompiledFunctions (std::string name) |
| bool | checkBuiltInFunctions (std::string name) |
| std::string | fileName () |
| int | id () |
| Variable | variable (AST_Expression exp) |
| IR::Expression | variableExpression (string name, Option< IR::Range > range) |
| std::string | tabs (int t) |
| CompileFlags | compileFlags () |
| void | setPackageFunctions (IR::FunctionTable package_functions) |
| IR::FunctionTable | packageFunctions () |
| void | setPackagePrefix (std::string package_prefix) |
| std::string | packagePrefix () |
| std::string | generatePath (std::string path, std::string file_name) |
Static Public Member Functions | |
| static Utils & | instance () |
Protected Member Functions | |
| Utils () | |
| bool | checkCodeFiles (std::string name, std::string ext) |
| SymbolTable | getValue (fstream *package, std::string token) |
| std::string | packagePath (std::string name) |
Protected Attributes | |
| std::string | _language_especification |
| CompileFlags | _flags |
| map< std::string, int > | _annotations |
| std::string | _binop [BINOPS] |
| IR::CompiledFunctionTable | _compiled_functions |
| std::string | _file_name |
| int | _ids |
| IR::FunctionTable | _package_functions |
| std::string | _package_prefix |
| void MicroModelica::Util::Utils::addCompiledFunction | ( | IR::CompiledFunction | f | ) |
| void MicroModelica::Util::Utils::addCompiledFunctions | ( | IR::CompiledFunctionTable | fs | ) |
Definition at line 353 of file util.cpp.
Referenced by parsePackages().
| string MicroModelica::Util::Utils::baseFileName | ( | std::string | file | ) |
Definition at line 338 of file util.cpp.
Referenced by MicroModelica::Util::Logger::setFile().
| bool MicroModelica::Util::Utils::checkBuiltInFunctions | ( | std::string | name | ) |
Definition at line 361 of file util.cpp.
References EM_IR, EM_VARIABLE_NOT_FOUND, and MicroModelica::Util::ER_Error.
|
protected |
| bool MicroModelica::Util::Utils::checkCompiledFunctions | ( | std::string | name | ) |
| bool MicroModelica::Util::Utils::checkExperimentAnnotations | ( | std::string * | annotation | ) |
|
inline |
| bool MicroModelica::Util::Utils::checkTypeString | ( | std::string | t | ) |
| CompiledFunctionTable MicroModelica::Util::Utils::compiledFunctions | ( | ) |
| CompileFlags MicroModelica::Util::Utils::compileFlags | ( | ) |
| string MicroModelica::Util::Utils::environmentVariable | ( | std::string | ev | ) |
Definition at line 307 of file util.cpp.
Referenced by MicroModelica::Generator::Files::makefile(), and MicroModelica::Util::Logger::setFile().
|
inline |
| string MicroModelica::Util::Utils::generatePath | ( | std::string | path, |
| std::string | file_name | ||
| ) |
| string MicroModelica::Util::Utils::getFileName | ( | std::string | file | ) |
| string MicroModelica::Util::Utils::getFilePath | ( | std::string | file | ) |
|
protected |
| string MicroModelica::Util::Utils::getVarName | ( | std::string | name | ) |
Definition at line 128 of file util.cpp.
References ModelTable< Key, Value >::insert().

|
inlinestatic |
Definition at line 83 of file util.hpp.
Referenced by MicroModelica::Util::ConvertToExpression::convert(), MicroModelica::Util::Variable::declaration(), MicroModelica::Util::ConvertToGiNaC::foldTraverseElement(), MicroModelica::IR::Range::getExp(), MicroModelica::IR::JacGenerator::guard(), MicroModelica::IR::Package::insert(), MicroModelica::Generator::Files::makefile(), MicroModelica::Generator::MemoryWriter::MemoryWriter(), MicroModelica::Generator::Files::run(), MicroModelica::Util::Logger::setFile(), MicroModelica::IR::ModelChecker::visit(), and MicroModelica::Generator::Function::~Function().
| string MicroModelica::Util::Utils::iteratorVar | ( | int | dim | ) |
Definition at line 138 of file util.cpp.
Referenced by MicroModelica::IR::Range::getExp().
| string MicroModelica::Util::Utils::languageEspecification | ( | ) |
Definition at line 108 of file util.cpp.
Referenced by MicroModelica::IR::ModelChecker::visit().
| string MicroModelica::Util::Utils::opString | ( | BinOpType | bot | ) |
| IR::FunctionTable MicroModelica::Util::Utils::packageFunctions | ( | ) |
| string MicroModelica::Util::Utils::packageName | ( | std::string | name | ) |
Definition at line 298 of file util.cpp.
Referenced by MicroModelica::IR::Package::insert(), parsePackages(), and MicroModelica::Generator::Function::~Function().
|
protected |
| std::string MicroModelica::Util::Utils::packagePath | ( | std::string | pname, |
| CompileFlags | flags, | ||
| std::string | ext = ".mo" |
||
| ) |
Referenced by parsePackages().
| Option<IR::CompiledPackage> MicroModelica::Util::Utils::readPackage | ( | std::string | file_name, |
| bool | full_path = false, |
||
| std::string | package_name = "" |
||
| ) |
| bool MicroModelica::Util::Utils::readPackage | ( | std::string | fileName, |
| IR::CompiledPackageTable & | pt | ||
| ) |
Referenced by parsePackages().
| bool MicroModelica::Util::Utils::searchCompiledPackage | ( | std::string | pname, |
| CompileFlags | flags | ||
| ) |
Definition at line 220 of file util.cpp.
Referenced by parsePackages().
| void MicroModelica::Util::Utils::setCompileFlags | ( | CompileFlags | flags | ) |
Definition at line 110 of file util.cpp.
Referenced by parsePackages().
| void MicroModelica::Util::Utils::setPackageFunctions | ( | IR::FunctionTable | package_functions | ) |
Definition at line 414 of file util.cpp.
Referenced by parsePackages().
| void MicroModelica::Util::Utils::setPackagePrefix | ( | std::string | package_prefix | ) |
Definition at line 418 of file util.cpp.
Referenced by parsePackages().
| string MicroModelica::Util::Utils::tabs | ( | int | t | ) |
Definition at line 401 of file util.cpp.
Referenced by MicroModelica::IR::JacGenerator::guard().
| string MicroModelica::Util::Utils::trimString | ( | std::string | str | ) |
Definition at line 91 of file util.cpp.
Referenced by MicroModelica::Generator::MemoryWriter::MemoryWriter().
| Variable MicroModelica::Util::Utils::variable | ( | AST_Expression | exp | ) |
| Expression MicroModelica::Util::Utils::variableExpression | ( | string | name, |
| Option< IR::Range > | range | ||
| ) |
Definition at line 384 of file util.cpp.
References TAB.
Referenced by MicroModelica::Util::Variable::declaration().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |