📄 executecode.h
字号:
// ExecuteCode.h: interface for the CExecuteCode 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_EXECUTECODE_H__FDE1F1D2_F035_4FF4_B8CB_946E2E90E313__INCLUDED_)
#define AFX_EXECUTECODE_H__FDE1F1D2_F035_4FF4_B8CB_946E2E90E313__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "..\Interface\ConstDef.h"
#include "FormulaModula.h"
class CVarStack
{
public:
CVarStack();
virtual ~CVarStack();
private:
int m_nDept;
CArray<PVARITEM,PVARITEM&> m_Stack;
public:
int GetDept();
void Push(PVARITEM & pVI);
PVARITEM Pop();
PVARITEM GetTop();
void Clear();
BOOL IsEmpty();
PVARITEM operator[](int nInd);
};
class CExecuteCode
{
public:
CExecuteCode();
virtual ~CExecuteCode();
private:
VARITEM m_RetVar;
BOOL m_bHasRet;
BOOL m_RunModule;//FASLE isolate TRUE inplace
PFORMUALMODULE m_pFormulaModula;
PVARITEM GetVarItem(int isn);
VARTABLE m_CurVarTable;
VARTABLE m_UsedParentVarTable;
int m_CurFormulaPos;
CVarStack m_RuntimeStack;
BOOL RunCurFormula();//if RET then END
BOOL RunCurFormula2();//if RET then END
void CallSysFunc();
private:
CStringList m_slOutput;
public:
void SetFormulaModule(PFORMUALMODULE pFM);
void Run(BOOL bIsInPlace=FALSE);
PVARITEM GetRetValue();
CString GetRetDesc();
float GetResult();
int GetOutputSum();
CString GetOutputDesc(int nInd);
};
#endif // !defined(AFX_EXECUTECODE_H__FDE1F1D2_F035_4FF4_B8CB_946E2E90E313__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -