//-------------------------------------------------------------------------------------------------------+ // Copyright (C), 1998-2007, SH Software Co. Ltd. // = FileName : PickSet 类 // = Version : ver2.0 // = Author : zjq // = CreateDate : 2002-09-09 // = Description: PickSet 声明 // = Maintainers: // //-------------------------------------------------------------------------------------------------------+ #ifndef _PICKSET_H_ #define _PICKSET_H_ #ifndef _RBLIST_H_ #include "RBList.h" #endif #ifndef _ENTITY_H_ #include "Entity.h" #endif #ifndef _XPOINT_H_ #include "XPoint.h" #endif class XPoint; class GEOAPI PickSet { friend GEOAPI PickSet operator + (const PickSet &, const PickSet &); friend GEOAPI PickSet operator - (const PickSet &, const PickSet &); friend GEOAPI PickSet operator * (const PickSet &, const PickSet &); public: PickSet(int createMode = 0); PickSet(const ads_name n); PickSet(const PickSet & n); virtual ~PickSet(); virtual int Move(const XPoint &src, XPoint &res) const; virtual int Rotate(const XPoint &src, ads_real *res = NULL) const; virtual int Scale(const XPoint &src, ads_real *res = NULL) const; operator LONG_PTR *(); int operator !() const; int operator += (const AcDbObjectId &); int operator -= (const AcDbObjectId &); int operator += (const Entity &); int operator -= (const Entity &); int operator += (const PickSet &); int operator -= (const PickSet &); PickSet & operator = (const ads_name n); PickSet & operator = (const PickSet &n); Entity operator [](long index) const; int MakeUnnamedGroup(); int Get(LPCTSTR commandString = NULL, void *pt1 = NULL, const ads_point pt2 = NULL); int Get(LPCTSTR commandString, void *pt1, const ads_point pt2, const RBList & entmask); int Get(LPCTSTR commandString, void *pt1, const ads_point pt2, const resbuf * entmask); int Transform(ads_matrix genmat) const; int XTransform(ads_matrix mat) const; int GetExtend(ads_point lowPt, ads_point upPt) const; int GetExtend(ads_point cen, ads_real *x, ads_real *y, ads_real *z = NULL) const; void Get(XPoint ptUcs,const resbuf* entmask = NULL); void GetPreSel(const resbuf* entmask = NULL); void AsIdArray(AcDbObjectIdArray &idArray); void Free(); long Length() const; // New Tools bool IsInclude(Entity ent)const; void IncludeBegin(); void IncludeEnd(); int MakeAnonymous(const XPoint &base, TCHAR *blk = NULL, int mkInstance = 1) const; void Redraw(int mode = 1) const; void RedrawAll(int mode = 1) const; void Delete() const; int Erase() const; void Bind(const Entity& key); void ExFilter(const RBList &exList); void ExTagFilter(const int *tagList, int sz); //留下满足baseList的实体 void BaseFilter(RBList &baseList); //排除掉满足baseList的实体 void BaseExclude(RBList &baseList); int RemoveXData() const; public: ads_name name; Entity mark; unsigned char flag; }; typedef PickSet SelectionSet; class GEOAPI XRemoveDupEntByLayer { public: XRemoveDupEntByLayer(const TCHAR * pszLayer); virtual ~XRemoveDupEntByLayer(); static int CompareForFindByLayer(const XRemoveDupEntByLayer *p1, const void *p2); public: XString m_sLayer; PickSet m_ss; }; #endif