⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 symbol.h

📁 由matlab开发的hybrid系统的描述语言
💻 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_SYMBOL#define D_SYMBOL#include <string>class Min_max_eps;#ifndef STD_NS#define STD_NSusing namespace std;#endif#include <list>#include "OO_consts.h"class Globals;class Item;/** an entry in the symbol-table. Each variable\parameter is * represented by a Symbol. */class Symbol {public:	Symbol(Symb_type i_type, string i_name, const Globals * glob);	virtual ~Symbol() { }	/** this is the description of is_used() */	bool is_used() const;	void set_declared(int line_no) const;	void set_declared_nonconst(int line_no);	void set_used(int line_no) const;	void set_used_nonconst(int line_no);	virtual string status_matlab(string prefix) const;	/** performs the following checks: is variable declared and	 * defined? is variable only once defined? is variable used? */	virtual void semantic_checks();	/** actually a dynamic type check, in Java: instanceof, in C++ ? */	virtual bool is_param_symbol() const { return false; }	virtual bool is_var_symbol() const { return false; }	/*	virtual	bool is_number() const =0;	*/	/** returns the name of the variable */	virtual string to_matlab() const;	/** plays the role of "instanceof Default_symbol" */	virtual bool is_default_symbol() const { return false; }	string get_name() const { return name; }	/*		bool	is_required(const Symbol*s) const;	*/	bool is_mme_computable() const;	/** returns the position within its MLD_Matrix returns count,	 * only for Variables */	virtual int get_count() const = 0;	virtual Symb_kind get_kind() const = 0;	virtual Symb_type get_type() const;	/*	virtual	const list<const Symbol*> get_required() const =0;	*/	int get_line_of_decl() const { return line_of_decl; }protected:	const Globals * globals;	Symb_type type;	/** Name of the variable\parameter as given in the hysdel input. */	string name;	int line_of_decl; //remove	int line_of_first_use;	int computable_order;};#endif //D_SYMBOL

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -