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

📄 mynode.h

📁 支持简单的公式推导
💻 H
字号:
#ifndef __UNKNOWNFACTOR_H__
#define __UNKNOWNFACTOR_H__

#include "tdafx.h"
#include "operand.h"



class Node : public Operand
{
public:
	                         
	Node(const string& name);
	Node(double c = 0);
	Node(const Operand& o);
	~Node();
	
    virtual bool operator<(const Node& in)const;

public:                     //inline
	
    
	virtual string GetExpression()const{return expression_;}
	double GetSingleValue()const{return value_;}
    double GetNodeValue()const{return value_;}
	virtual bool IsConst()const{return is_const_;}
    
private:
    const double value_;
	const string expression_;
	const bool is_const_;
	
    //void SetValue(double in){value_ = in; is_const_ = true;expression_.erase();}
    //不如认为Node是不能更改的 
	//唯有替换的方式实现间接修改!!!
	
};







#endif //__UNKNOWNFACTOR_H__

⌨️ 快捷键说明

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