You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.1 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef LINE_MANAGE_H
#define LINE_MANAGE_H
//#include "FlyLineDataStruct.h"
#include "../Include/8BMapDLL_type.h"
#include "DrawLineStruct.h"
using namespace B8MapDLL;
class CLineManage
{
public:
CLineManage(void);
virtual ~CLineManage(void);
PTLIST line;
void MakeListNull();
//读取文件中的航线数据
//输入航线文件名称strFileName
//输出航线数据集合pLineData
//返回值true——文件读取成功
// false——文件读取失败
bool ReadLineDataFromFile(DrawLineDataStruct &pLineData, const CString strFileName);
bool WrongLineDataProcess(FILE *fp);
//功能;航点数据转换成能标绘的航线数据体
void LinePoint2DrawLinePoints(DrawLineDataStruct &lineDataArr, const PtStruct *pLinePoints, const int linePointNum);
bool OpenFlyLineFile(const CString &str, const int &lineID, const bool &bFromLocalDir);
void AddPt(PTLIST *other);
void AddPt(PtStruct aOE);
void AddPt(const double &L, const double &B,const float& H, const int &ptId);
void ListData2ArrayData(PtStruct *pts, int &ptNum, const int &coordType);
bool CheckOrgPtIsExisted(const PtStruct *pts, const int &ptNum);
bool CheckFlyLineIDCorrect(const PtStruct *pts, const int &ptNum, const int &lineID);
private:
//读取航线某航点
int ReadAirLinePoint(FILE *fp, PtStruct &pt);
//功能:读取航路文件的一行数据,并对该行数据进行检查
//输入航路文件指针fp
//输出航点数据体pt
//返回值true——成功
// false——失败
bool ReadLinePtAndCheckData(PtStruct &pt, FILE *fp);
//功能:对航路文件进行严格的数据检查
//输入航路文件数据体pts航点个数ptNum
//输出更改航路特征后的航路文件数据体pts
//返回值true——该航路文件数据正确
// false——该航路文件数据不正确
//检查项:
// 1、所有航点的航线编号是否一样
// 2、所有航点的航点编号是否不一样
bool CheckFlyLine(PtStruct *pts, const int ptNum);
//功能:对单个航点的数据的有效范围进行检查
//输入航点数据体pt
//返回值true——航点数据位于有效范围内
// false——航点数据超限
bool CheckOnePointValue(const PtStruct pt);
};
#endif