📄 formulaimpl.h
字号:
// FormulaImpl.h: interface for the CFormulaImpl class.
//
//////////////////////////////////////////////////////////////////////
/*
* Generated by MyEclipse Struts
*
* Written by Yang Huaisheng
* Homepage: http://codefan.spaces.live.com
* version 0.01
* create at 2006-04-30
*
* Distribute freely, except: don't remove my name from the source or
* documentation (don't take credit for my work), mark your changes (don't
* get me blamed for your possible bugs), don't alter or remove this
* notice.
* No warrantee of any kind, express or implied, is included with this
* software; use at your own risk, responsibility for damages (if any) to
* anyone resulting from the use of this software rests entirely with the
* user.
*
* Send bug reports, bug fixes, enhancements, requests, flames, etc. to
* codefan@hotmial.com
*
*/
#if !defined(AFX_FORMULAIMPL_H__545E19FC_A84D_4B27_BCE4_FC80B1BFF048__INCLUDED_)
#define AFX_FORMULAIMPL_H__545E19FC_A84D_4B27_BCE4_FC80B1BFF048__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "..\INTERFACE\IFormula.h"
#include ".\FormulaModula.h"
#include "CompileCode.h"
#include "ExecuteCode.h"
class CFormulaImpl : public IFormulaEnvir
{
public:
CFormulaImpl();
virtual ~CFormulaImpl();
// 接口部分
public: // 编译 与运行
virtual int CompileFormula(LPCTSTR szFormula,int nLen=0);
virtual int CompileFile(LPCTSTR szFilename);
virtual CString Run(int nModuleInd=-1);
virtual CString Run(LPCTSTR szModuleName);
virtual float Calc(int nModuleInd);
virtual LPCTSTR GetSource();
virtual int GetSourceLen();
public: //变量列表
virtual void SetFloat(LPCTSTR szName,float fVal);
virtual void SetVariable(LPCTSTR szName,LPCTSTR szValue);
virtual void SetArrayNumberVar(LPCTSTR szName,int nLen,float * lpValue);
virtual int GetVariableSum();
virtual CString ListVariable(int nVarInd,LIST_VAR_TYPE nListType=LV_SUMMARY);
public: // 四元式
virtual int GetFormulaItemSum();
virtual CString ListFormulaItem(int nFormulaInd, LIST_FORMULA_ITEM_TYPE nListType=LFI_LABEL);
public: //场景保存
virtual int GetModuleSum();
virtual CString GetModuleName(int nModuleInd);
virtual void SaveModule(LPCTSTR szModuleName);
virtual BOOL GetModule(LPCTSTR szModuleName);
virtual void SaveCompileScene(int nModuleInd,LPCTSTR szFilename);
virtual void LoadCompileScene(int nModuleInd,LPCTSTR szFilename);
public:
virtual int GetCompileErrorSum();
virtual CString GetCompileError(int nErrorInd);
virtual int GetOutputSum();
virtual CString GetOutputDesc(int nOPInd);
private:
//PFORMUALMODULE m_pCurModula;
PFORMUALMODULE m_pMainModula;
CFormulaModule m_CurModula;
// int m_nModulaSum;
FORMUALMODULALIST m_FMList;
CCompileCode m_Compile;
CExecuteCode m_Execute;
};
//实现部分
#endif // !defined(AFX_FORMULAIMPL_H__545E19FC_A84D_4B27_BCE4_FC80B1BFF048__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -