📄 var_symbol.h
字号:
/* HYSDEL Copyright (C) 1999-2002 Fabio D. Torrisi This file is part of HYSDEL. HYSDEL is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. HYSDEL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA CONTACT INFORMATION =================== Fabio D. Torrisi ETH Zentrum Physikstrasse. 3 ETL, CH-8032 Zurich Switzerland mailto:torrisi@aut.ee.ethz.ch (preferred)*/#ifndef D_VAR_SYMBOL#define D_VAR_SYMBOL#ifndef STD_NS#define STD_NSusing namespace std;#endif#include "Symbol.h"#include <list>class Definition_item;class Min_max_eps;class Globals;class Expr;class Var_symbol : public Symbol {public: Var_symbol(Symb_kind i_kind, Symb_type i_type, int i_count, string i_name, const Globals * glob); ~Var_symbol(); bool is_var_symbol() const { return true; } bool is_variable_expr() const { return true; } void set_defined(const Definition_item * i) const; void set_defined_nonconst(const Definition_item * i); int get_count() const; Symb_kind get_kind() const; void set_minmaxeps(Min_max_eps * m) const; void set_minmaxeps_nonconst(Min_max_eps * m); Min_max_eps * get_minmaxeps() const; virtual void semantic_checks(); string status_matlab(string prefix) const; list < const Var_symbol * > get_required_mme() const; list < const Var_symbol * > get_required_simu() const; int find_computable_order(list < const Var_symbol * > path) const; int find_computable_order_nonconst(list < const Var_symbol * > path); /** passing originator for error message */ void compute_minmax(const Item * originator, list < const Symbol * > path) const; void compute_minmax_nonconst(const Item * originator, list < const Symbol * > path); Expr * get_min() const; Expr * get_max() const; bool is_defined() const { return first_def != NULL; } const Item * get_definition() const; int get_computable_order() const { return computable_order; } /** variable as vector entry */ string to_matlab() const; string bounds_vector_entry(string prefix) const; string to_matlab_newstate() const;private: Min_max_eps * mme; /** At declaration time each variable/parameter is counted. The * sequential number count, togher with the kind(input, ouput, * state, or parameter) an type(real or bool) of the variable * identifies the variable uniquely.<br> * When the compiler generates the MLD form each variable goes in the * count-th position of the proper vector. */ int count; /** one of: STATE, INPUT, OUTPUT, AUX */ Symb_kind kind; const Definition_item * first_def; const Definition_item * second_def; /** where the bounds automatically computed */ bool min_computed, max_computed;};#endif //D_VAR_SYMBOL
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -