MicroModelicaCCompiler
4.5.3
|
Go to the documentation of this file.
29 #include <util/visitors/convert_condition.hpp>
40 _current(EVENT::
Zero),
41 _zc_relation(EVENT::
GE),
43 _positive_handler_id(0),
44 _negative_handler_id(0),
56 _current(EVENT::
Zero),
57 _zc_relation(EVENT::
GE),
59 _positive_handler_id(0),
60 _negative_handler_id(0),
67 _type = cc.zeroCrossing();
69 _zc_relation = cc.zeroCrossingRelation();
122 arguments =
_range->getDimensionVarsString();
129 buffer <<
block << stm << endl;
154 buffer << tabs <<
"modelData->event[" <<
_zero_crossing.
index() <<
"].direction = " << direction <<
";" << endl;
169 for (
Event ev = events.
begin(ev_it); !events.
end(ev_it); ev = events.
next(ev_it)) {
170 zero_crossings.
insert(ev.id(), ev.zeroCrossing());
172 return zero_crossings;
std::string macro() const
std::string macro() const
EVENT::Relation _zc_relation
std::string endExpression(Option< Range > range, FUNCTION_PRINTER::ReturnStatementType ret=FUNCTION_PRINTER::ReturnStatementType::Return) const
bool compareEventID(std::string event_id)
StatementTable _negative_handler
AST_Expression equation()
bool equalTraverse(AST_Expression a, AST_Expression b)
std::string endDimGuards(Option< Range > range) const
EquationTable zeroCrossingTable(EventTable events)
Helper function to to generate a equation table for zero crossing equations.
bool compare(AST_Expression zc)
std::map< int, Statement >::iterator iterator
static ModelConfig & instance()
StatementTable _positive_handler
std::string config() const
void setAlgorithm(bool algorithm)
T1 AST_ListFirst(list< T1 > *l)
Expression exp()
This method returns the range expression of the event.
std::string identifier() const
std::string handler(EVENT::Type type) const
void insert(Key k, Value v)
std::string beginDimGuards(std::string token, string args, Option< Range > range, std::multimap< std::string, int > used_variables) const
std::string beginExpression(std::string token, Option< Range > range) const
std::multimap< std::string, int > usedVariables() const
AST_Expression getExpression(AST_Expression zc)