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

📄 rm_wawformula.hpp

📁 这是一个功能强大
💻 HPP
字号:
// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rm_wawformula.pas' rev: 11.00

#ifndef Rm_wawformulaHPP
#define Rm_wawformulaHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Rm_wawformula_iftab.hpp>	// Pascal unit
#include <Rm_wawbiff8.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Rm_wawformula
{
//-- type declarations -------------------------------------------------------
struct rwawOperatorInfo
{
	
public:
	SmallString<2>  Name;
	int Priority;
	Byte ptg;
} ;

typedef rwawOperatorInfo *pwawOperatorInfo;

struct rwawOperator
{
	
public:
	rwawOperatorInfo *OperatorInfo;
	Word iftab;
	int ParCount;
	bool OperandExists;
} ;

typedef rwawOperator *pwawOperator;

class DELPHICLASS TwawCompileOpStack;
class PASCALIMPLEMENTATION TwawCompileOpStack : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	pwawOperator operator[](int i) { return Items[i]; }
	
private:
	Classes::TList* FList;
	int FCurPos;
	rwawOperator *FLastFunction;
	pwawOperator __fastcall GetItem(int i);
	int __fastcall GetCount(void);
	
public:
	__property pwawOperator Items[int i] = {read=GetItem/*, default*/};
	__property int Count = {read=GetCount, nodefault};
	__property pwawOperator LastFunction = {read=FLastFunction, write=FLastFunction};
	pwawOperator __fastcall Push(void);
	pwawOperator __fastcall Pop(void);
	pwawOperator __fastcall Last(void);
	void __fastcall Reset(void);
	void __fastcall Clear(void);
	__fastcall TwawCompileOpStack(void);
	__fastcall virtual ~TwawCompileOpStack(void);
};


class DELPHICLASS TwawExtSheet;
class PASCALIMPLEMENTATION TwawExtSheet : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FName;
	int FiSUPBOOK;
	int Fitab;
	
public:
	__property AnsiString Name = {read=FName};
	__property int iSUPBOOK = {read=FiSUPBOOK, nodefault};
	__property int itab = {read=Fitab, nodefault};
	__fastcall TwawExtSheet(AnsiString _Name, int _iSUPBOOK, int _itab);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TwawExtSheet(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwawExtWorkbook;
class PASCALIMPLEMENTATION TwawExtWorkbook : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TwawExtSheet* operator[](int i) { return Sheets[i]; }
	
private:
	AnsiString FName;
	Classes::TList* FSheets;
	TwawExtSheet* __fastcall GetSheet(int i);
	int __fastcall GetSheetsCount(void);
	
public:
	__property TwawExtSheet* Sheets[int i] = {read=GetSheet/*, default*/};
	__property int SheetsCount = {read=GetSheetsCount, nodefault};
	__property AnsiString Name = {read=FName};
	__fastcall TwawExtWorkbook(AnsiString _Name);
	__fastcall virtual ~TwawExtWorkbook(void);
};


class DELPHICLASS TwawExtRefs;
class PASCALIMPLEMENTATION TwawExtRefs : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	TwawExtWorkbook* operator[](int i) { return Books[i]; }
	
private:
	Classes::TList* FBooks;
	Classes::TList* FSheets;
	TwawExtWorkbook* __fastcall GetBook(int i);
	TwawExtSheet* __fastcall GetSheet(int i);
	int __fastcall GetBooksCount(void);
	int __fastcall GetSheetsCount(void);
	
public:
	__property TwawExtWorkbook* Books[int i] = {read=GetBook/*, default*/};
	__property int BooksCount = {read=GetBooksCount, nodefault};
	__property TwawExtSheet* Sheets[int i] = {read=GetSheet};
	__property int SheetsCount = {read=GetSheetsCount, nodefault};
	int __fastcall GetSheetIndex(AnsiString BookName, AnsiString SheetName);
	void __fastcall Clear(void);
	__fastcall TwawExtRefs(void);
	__fastcall virtual ~TwawExtRefs(void);
};


class DELPHICLASS TwawExcelFormulaCompiler;
class PASCALIMPLEMENTATION TwawExcelFormulaCompiler : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TwawCompileOpStack* FCompileOpStack;
	TwawExtRefs* FExtRefs;
	void __fastcall SetError(AnsiString ErrorMessage);
	
public:
	__property TwawExtRefs* ExtRefs = {read=FExtRefs};
	void __fastcall CompileFormula(AnsiString s, char * &Ptgs, int &PtgsSize);
	void __fastcall Clear(void);
	__fastcall TwawExcelFormulaCompiler(void);
	__fastcall virtual ~TwawExcelFormulaCompiler(void);
};


//-- var, const, procedure ---------------------------------------------------
static const char wawFormulaEndBracketChar = '\x29';
static const char wawFormulaStartBracketChar = '\x28';
static const char wawFormulaStringChar = '\x22';
static const char wawFormulaFuncParamsDelim = '\x3b';
static const char wawFormulaPercentOperator = '\x25';
static const char wawFormulaUnaryPlusOperator = '\x2b';
static const char wawFormulaUnaryMinusOperator = '\x2d';
extern PACKAGE Set<char, 0, 255>  wawFormulaUnaryOperators;
extern PACKAGE Set<char, 0, 255>  wawFormulaOperatorChars;
extern PACKAGE Set<char, 0, 255>  wawFormulaStartIdentChars;
extern PACKAGE Set<char, 0, 255>  wawFormulaIdentChars;
static const Shortint wawOperatorsCount = 0x12;
extern PACKAGE rwawOperatorInfo wawOperatorsInfos[18];
static const Shortint wawFormulaStartBracketOperatorIndex = 0x1;
static const Shortint wawFormulaEndBracketOperatorIndex = 0x2;
static const Shortint wawFormulaPercentOperatorIndex = 0xf;
static const Shortint wawFormulaUnaryPlusOperatorIndex = 0x10;
static const Shortint wawFormulaUnaryMinusOperatorIndex = 0x11;
static const Shortint wawFormulaFunctionOperatorIndex = 0x12;
static const Shortint wawFormulaFunctionPriority = 0x9;
static const Shortint wawFormulaStartBracketPriority = 0x0;
static const Shortint wawFormulaEndBracketPriority = 0x1;
static const Shortint wawFormulaPercentOperatorPriority = 0x7;
#define swawFormulaCompileErrorInvalidBrackets "Invalid brackets"
#define swawFormulaCompileErrorParameterWithoutFunction "Parameter without function"
#define swawFormulaCompileErrorInvalidString "Invalid string"
#define swawFormulaCompileErrorInvalidNumber "Invalid number [%s]"
#define swawFormulaCompileErrorInvalidSymbol "Invalid symbol [%s]"
#define swawFormulaCompileErrorUnknownOperator "Unknown operator [%s]"
#define swawFormulaCompileErrorUnknownFunction "Unknown function [%s]"
#define swawFormulaCompileErrorInvalidCellReference "Invalid cell reference [%s]"
#define swawFormulaCompileErrorInvalidRangeReference "Invalid range reference [%s]"
extern PACKAGE Set<char, 0, 255>  wawFormulaNumberChars;

}	/* namespace Rm_wawformula */
using namespace Rm_wawformula;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Rm_wawformula

⌨️ 快捷键说明

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