110 lines
1.7 KiB
C++
110 lines
1.7 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPtNode.h
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: 类的声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TPTNODE_H_
|
|
#define _TPTNODE_H_
|
|
|
|
#ifndef _TWFLAG_H_
|
|
#include "TWFlag.h"
|
|
#endif
|
|
|
|
#ifndef _TGPOINT_H_
|
|
#include "TGPoint.h"
|
|
#endif
|
|
|
|
#ifndef _TPDLIST_H_
|
|
#include "TPDList.h"
|
|
#endif
|
|
|
|
class TPtList;
|
|
|
|
class GEOAPI TPtNode : public TWFlag, public TGPoint
|
|
{
|
|
public:
|
|
|
|
TPtNode();
|
|
|
|
TPtNode(const TGPoint& pt,int flag = 0);
|
|
|
|
virtual ~TPtNode();
|
|
|
|
TPtNode* PreA()const;
|
|
|
|
TPtNode* PreB()const;
|
|
|
|
TPtNode* NextA()const;
|
|
|
|
TPtNode* NextB()const;
|
|
|
|
void CNNextA(TPtNode*p);
|
|
|
|
void CNNextB(TPtNode*p);
|
|
|
|
void SetPaA(double pa);
|
|
|
|
void SetPaB(double pa);
|
|
|
|
bool IsRefA()const;
|
|
|
|
bool IsRefB()const;
|
|
|
|
bool IsRefC()const;
|
|
|
|
double PaA()const;
|
|
|
|
double PaB()const;
|
|
|
|
TPtNode*& RefA()const;
|
|
|
|
TPtNode*& RefB()const;
|
|
|
|
TPtNode*& RefC()const;
|
|
|
|
void SetRefA(TPtNode** p);
|
|
|
|
void SetRefB(TPtNode** p);
|
|
|
|
void SetRefC(TPtNode** p);
|
|
|
|
void Replace(TPtNode* p);
|
|
|
|
bool IsANode()const;
|
|
|
|
bool IsBNode()const;
|
|
|
|
bool IsABNode()const;
|
|
|
|
void MakeListIn(TPDList< TPtList > &res);
|
|
|
|
void MakeListOut(TPDList< TPtList > &res);
|
|
|
|
protected:
|
|
|
|
TPtNode* nextA;//A环的下一节点
|
|
|
|
TPtNode* nextB;//B环的下一节点
|
|
|
|
TPtNode* preA; //A环的上一节点
|
|
|
|
TPtNode* preB; //B环的上一节点
|
|
|
|
double paA; //A环参数
|
|
|
|
double paB; //B环参数
|
|
|
|
//引用该结点的指针表项的地址
|
|
TPtNode** pRefA;
|
|
|
|
TPtNode** pRefB;
|
|
|
|
TPtNode** pRefC;
|
|
};
|
|
|
|
#endif |