// ****************************************************************************
// MainInclude.h version: 1.0 date: 12/12/2005
// ---------------------------------------------------------------------------
// Summary:
// ---------------------------------------------------------------------------
// Copyright (C) LYH_Studio @ 2005 - All Rights Reserved
// ****************************************************************************
//
// ****************************************************************************
#ifndef _LYH_STUDIO_MAININCLUDE_H
#define _LYH_STUDIO_MAININCLUDE_H
//{
//包含C++库文件
#include <set>
#include <cassert>
#include <windows.h>
#include <conio.h>
//包含用户自定义文件
#include "DiaoCha.h"
#include "Investigator_Amount.h"
#include "Investigator_Relative.h"
using namespace Investigator;
typedef bool Compare_Man(char,char);
typedef std::set<stringEx> strSet;
const int COMMAND_MAX_LENGTH = 100 ;
const int DATA_MAX_LENGTH = 5000 ;
const char DATA_DIVIDER = ' ' ;
const char PARAMETER_DIVIDER = '-' ;
//--------------------->> <<-----------------------//
#if !defined(_LYH_STUDIO_ERR_MSG_CHAR)
#if !defined(_LYH_STUDIO_ERR_MSG_ENUM)
#define _LYH_STUDIO_ERR_MSG_ENUM
//定义枚举和字符串常量。其用于保存错误信息。
enum PARAMETER_ERROR{ERR_MSG_ILLEGAL_STATEMENT, ERR_MSG_WANTING_PARAMETER,
ERR_MSG_TOO_MANY_PARAMETERS, ERR_MSG_PARAMETER_ERROR, ERR_MSG_WANTING_NUMBER,
ERR_MSG_OUTOF_RANGE, ERR_MSG_OPEN_FILE_FAIL, ERR_MSG_FILE_UNCONSISTENT,
ERR_MSG_UNKNOWN_ERROR};
#endif
extern char *errMsg[9];
#endif
//--------------------------------------------------//
//include functions definetion
#include "Functions.h"
//}
#endif
//
// ****************************************************************************
// Functions.h version: 1.0 date: 12/12/2005
// ---------------------------------------------------------------------------
// Summary:
// ---------------------------------------------------------------------------
// Copyright (C) LYH_Studio @ 2005 - All Rights Reserved
// ****************************************************************************
//
// ****************************************************************************
// ****************************************************************************
// Functions.h version: 1.0 date: 12/12/2005
// ---------------------------------------------------------------------------
// Summary:
// ---------------------------------------------------------------------------
// Copyright (C) LYH_Studio @ 2005 - All Rights Reserved
// ****************************************************************************
//
// ****************************************************************************
#ifndef _LYH_STUDIO_FUNCTIONS_H
#define _LYH_STUDIO_FUNCTIONS_H
#include "InvtString.h"
void StatisticComDispatch();
//功能函数
typedef void ComFunc(stringEx&, stringEx&, stringEx&);
ComFunc AmountShow;
ComFunc RelativeShow;
ComFunc NewStatistic;
ComFunc Continue;
ComFunc ReInput;
ComFunc ReadFromFile;
ComFunc WriteToFile;
ComFunc WrFmToFile;
ComFunc ShowData;
ComFunc ShowHelp;
ComFunc Quit;
//辅助功能函数
int InputData(stringEx &strData, stringEx &strCI);
bool IsInSelection(const InvtString<char> &str, const stringEx &strCI);
bool IsDifferent(const stringEx &data);
//辅助显示函数
void AnnounceError(const char *const err, const char *const errEx = NULL);
void AnnounceError(const string err, const string errEx = string());
//use for sort function
inline bool Compare(char a, char b);
void ShowColorText(char *txt, WORD color);
void ShowDivideLine(bool flag = true);
#endif