MicroModelicaCCompiler  4.5.3
MicroModelica::Util Namespace Reference

Namespaces

 STATEMENT
 

Classes

class  CompileFlags
 
class  ConvertToExpression
 
class  ConvertToGiNaC
 
class  Error
 
class  Logger
 
class  ModelConfig
 
class  TypeSymbolTable
 
class  Utils
 
class  Variable
 
class  VarSymbolTable
 

Typedefs

typedef ModelTable< std::string, std::string > SymbolTable
 
using VariableList = std::list< Variable >
 
typedef ModelTable< std::string, std::string > ImportTable
 
typedef int grp_t
 

Enumerations

enum  ER_Type { ER_Warning, ER_Error, ER_Fatal }
 

Functions

void debugInit (const char *flagList)
 
bool debugIsEnabled (char flag)
 
void DEBUG (char flag, const char *format,...)
 
bool isDebugParam (char *param)
 
void ERROR (const char *format,...)
 
void ERROR_UNLESS (bool condition, const char *format,...)
 
static ex der2_derivative (const ex &x, const ex &y, unsigned diff_param)
 
static ex der_derivative (const ex &x, const ex &y, unsigned diff_param)
 
void my_print_power_dflt (const power &p, const print_dflt &c, unsigned level)
 
void my_print_mul_dflt (const mul &m, const print_dflt &c, unsigned level)
 
void my_print_add_dflt (const add &s, const print_dflt &c, unsigned level)
 
static ex var_derivative (const ex &x, const ex &y, unsigned diff_param)
 
void processStatement (AST_Statement stm)
 
void applyReduction (AST_Statement_Assign asg, AST_StatementList stms, AST_StatementListIterator stm_it)
 
void reduceStatement (AST_Statement stm, AST_StatementList stms, AST_StatementListIterator stm_it)
 
ostream & operator<< (ostream &out, const Variable &v)
 

Variables

static const char * enableFlags = nullptr
 

Typedef Documentation

◆ grp_t

Definition at line 76 of file util.hpp.

◆ ImportTable

typedef ModelTable<std::string, std::string> MicroModelica::Util::ImportTable

Definition at line 66 of file util.hpp.

◆ SymbolTable

typedef ModelTable< std::string, std::string > MicroModelica::Util::SymbolTable

Definition at line 62 of file equation.hpp.

◆ VariableList

using MicroModelica::Util::VariableList = typedef std::list<Variable>

Definition at line 199 of file symbol_table.hpp.

Enumeration Type Documentation

◆ ER_Type

Enumerator
ER_Warning 

ER_Warning.

ER_Error 

ER_Error.

ER_Fatal 

ER_Fatal.

Definition at line 120 of file error.hpp.

Function Documentation

◆ applyReduction()

void MicroModelica::Util::applyReduction ( AST_Statement_Assign  asg,
AST_StatementList  stms,
AST_StatementListIterator  stm_it 
)

Definition at line 146 of file process_statement.cpp.

References current_element, processStatement(), reduceStatement(), STASSIGN, STFOR, and STIF.

Here is the call graph for this function:

◆ DEBUG()

void MicroModelica::Util::DEBUG ( char  flag,
const char *  format,
  ... 
)

Print an INFO debug message, if flag is enabled.

Definition at line 76 of file debug.cpp.

◆ debugInit()

void MicroModelica::Util::debugInit ( const char *  flags)

Initialize so that only DEBUG messages with a flag in flagList will be printed.

If the flag is "+", we enable all DEBUG messages.

"flagList" is a string of characters for whose DEBUG messages are to be enabled.

Definition at line 66 of file debug.cpp.

◆ debugIsEnabled()

bool MicroModelica::Util::debugIsEnabled ( char  flag)

Definition at line 68 of file debug.cpp.

◆ der2_derivative()

static ex MicroModelica::Util::der2_derivative ( const ex &  x,
const ex &  y,
unsigned  diff_param 
)
static

Definition at line 54 of file ginac_interface.cpp.

◆ der_derivative()

static ex MicroModelica::Util::der_derivative ( const ex &  x,
const ex &  y,
unsigned  diff_param 
)
static

Definition at line 58 of file ginac_interface.cpp.

◆ ERROR()

void MicroModelica::Util::ERROR ( const char *  format,
  ... 
)

Definition at line 101 of file debug.cpp.

Referenced by EqualExp::equalTraverseElement().

◆ ERROR_UNLESS()

void MicroModelica::Util::ERROR_UNLESS ( bool  condition,
const char *  format,
  ... 
)

Print an ERROR message if condition is false. Then exits with EXIT_FAILURE status.

Definition at line 115 of file debug.cpp.

Referenced by EqualExp::compareArrays(), EqualExp::equalTraverseElement(), and EqualExp::getVarInfo().

◆ isDebugParam()

bool MicroModelica::Util::isDebugParam ( char *  param)

Definition at line 87 of file debug.cpp.

◆ my_print_add_dflt()

void MicroModelica::Util::my_print_add_dflt ( const add &  s,
const print_dflt &  c,
unsigned  level 
)

Definition at line 89 of file ginac_interface.cpp.

◆ my_print_mul_dflt()

void MicroModelica::Util::my_print_mul_dflt ( const mul &  m,
const print_dflt &  c,
unsigned  level 
)

Definition at line 75 of file ginac_interface.cpp.

◆ my_print_power_dflt()

void MicroModelica::Util::my_print_power_dflt ( const power &  p,
const print_dflt &  c,
unsigned  level 
)

◆ operator<<()

ostream& MicroModelica::Util::operator<< ( ostream &  out,
const Variable v 
)

Definition at line 234 of file symbol_table.cpp.

◆ processStatement()

void MicroModelica::Util::processStatement ( AST_Statement  stm)

Definition at line 52 of file process_statement.cpp.

Referenced by applyReduction().

◆ reduceStatement()

void MicroModelica::Util::reduceStatement ( AST_Statement  stm,
AST_StatementList  stms,
AST_StatementListIterator  stm_it 
)

Definition at line 162 of file process_statement.cpp.

References current_element.

Referenced by applyReduction().

◆ var_derivative()

static ex MicroModelica::Util::var_derivative ( const ex &  x,
const ex &  y,
unsigned  diff_param 
)
static

Definition at line 112 of file ginac_interface.cpp.

Variable Documentation

◆ enableFlags

const char* MicroModelica::Util::enableFlags = nullptr
static

Definition at line 64 of file debug.cpp.