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

📄 regularopt.h

📁 我的简易编译器终于在花了近20个工作日后完成了。按照设计是做成一个FormulaEx.dll
💻 H
字号:
// RegularOpt.h: interface for the CRegularOpt 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_REGULAROPT_H__DEE155BD_8FDD_4A69_961D_BF989DD6F817__INCLUDED_)
#define AFX_REGULAROPT_H__DEE155BD_8FDD_4A69_961D_BF989DD6F817__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxcoll.h>
#include <afxtempl.h>
enum CT_TEXTALIGN{
	CT_ALIGN_LEFT = ES_LEFT, //0
	CT_ALIGN_RIGHT = ES_RIGHT,//1
	CT_ALIGN_CENTER = ES_CENTER,//2
	CT_ALIGN_TOP = ES_LEFT,//1
	CT_ALIGN_BOTTOM = ES_RIGHT,//2
	CT_ALIGN_FILL  = 0x04
};

#define ISNUMBER(c)   (c>='0' && c <='9')
#define ISLETTER(c)   ((c>='a' && c <='z') || (c>='A' && c<='Z'))

class CRegularOpt  
{
private:
	CRegularOpt(){};
	virtual ~CRegularOpt(){};
static  bool InnerMatch(LPCTSTR szValue , LPCTSTR szTempl);
public:

static	CString  RectToString(const CRect & rect,bool isRelRow=false,bool isRelCol=false);
static	CRect    RectFrom(LPCTSTR szRect);

static	CString  XectToString(const CRect & rect);
static	CRect    XectFrom(LPCTSTR szRect);

static  CString  SizeToString(const CSize & size);
static	CSize    SizeFrom(LPCTSTR szSize);

static  CString  PointToString(const CPoint & point);
static	CPoint    PointFrom(LPCTSTR szPoint);

static  CString  ColorToString(COLORREF colorref);
static  COLORREF ColorFrom(LPCTSTR szColor);

static  CString  AlignToString(BYTE align);
static  BYTE	 AlignFrom(LPCTSTR szAlign);

//static  CString  VariantToString(_variant_t tvalue);

static  bool	 IsMatch(LPCTSTR szValue , LPCTSTR szTempl);
static  char	 GetNumbtye(LPCTSTR szNum , int nBit);
static  bool	 IsNumber(LPCTSTR szNum , int &s,int &d);
static  bool	 IsNumber(LPCTSTR szNum );
static  bool	 IsNumberArray(LPCTSTR szNumArray, char splitChar=',');

static  bool	 IsTrue(LPCTSTR szCondition );

static  bool	 IsIp(LPCTSTR szIp);
static  bool	 IsDatetime(LPCTSTR szTime ,CTime & t_time);
static	CString	 TrimDateString(LPCTSTR szDateStr);

static  bool	 IsDate(LPCTSTR szTime ,CTime & t_time);
static  bool	 IsTime(LPCTSTR szTime ,CTime & t_time);

static  int	 SplitFloatList(LPCTSTR szStr , CArray<float,float> & arfData, char splitChar= ' ');

static  int	 SplitString(LPCTSTR szStr , CStringList & ssRes,char splitChar= ' ');
static  CString	 SplitNum(LPCTSTR szNum ,char splittertype);
static  CString	 Capitalization(LPCTSTR szNum,const bool isSimple=false);
static  CString	 RightMoveDot(LPCTSTR szNum,int bits);
static	CString	 CheckNumber(LPCTSTR szNum);

static  CString	 PrecisionNum(LPCTSTR szNum,int precision=-1);

static  CString  GetAWord(LPCTSTR strSource,int& startPos,char splitterChar=' ');

static  CString  GetARegularWord(LPCTSTR strSource,int& startPos,int sl,bool & bAcceptOpt);
static  CString  GetARegularWord(LPCTSTR strSource,int& startPos);
static  CString  TrimString(LPCTSTR szWord);


};

#endif // !defined(AFX_REGULAROPT_H__DEE155BD_8FDD_4A69_961D_BF989DD6F817__INCLUDED_)

⌨️ 快捷键说明

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