geometrc.h

Go to the documentation of this file.
00001 /**
00002  * \file rvc/geometrc.h 
00003  * \brief interface for the RVC::GEOMETRIC class.
00004  *
00005  * \if NODOC
00006  * $Id: geometrc.h_v 1.71 2004/08/30 17:24:01 scowan Exp $
00007  *
00008  * $Log: geometrc.h_v $
00009  * Revision 1.71  2004/08/30 17:24:01  scowan
00010  * Added new capability enum's.
00011  *
00012  * Revision 1.70  2004/08/24 22:26:41  scowan
00013  * Added virtual methods to get and set total line length.
00014  *
00015  * Revision 1.69  2004/07/19 17:03:05  scowan
00016  * Moved has min elem filter to geometric class.
00017  *
00018  * Revision 1.68  2004/07/14 21:15:35  scowan
00019  * Changed comment
00020  *
00021  * Revision 1.67  2004/07/12 23:21:07  scowan
00022  * Removed use of geo region.
00023  *
00024  * Revision 1.66  2004/07/01 19:57:42  scowan
00025  * Removed use of legacy region code.
00026  *
00027  * Revision 1.65  2004/05/28 20:34:44  scowan
00028  * Added virtual method.
00029  *
00030  * Revision 1.64  2004/04/28 22:04:18  scowan
00031  * Added extract flag.
00032  *
00033  * Revision 1.63  2004/04/09 20:47:03  scowan
00034  * Update some docs.
00035  *
00036  * Revision 1.62  2004/03/16 00:22:22  scowan
00037  * Added a new virtual method.
00038  *
00039  * Revision 1.61  2004/03/01 17:42:49  scowan
00040  * Added more elem select parm methods.
00041  *
00042  * Revision 1.60  2004/02/11 20:01:32  scowan
00043  * Added new filter class override.
00044  *
00045  * Revision 1.59  2004/02/09 20:13:40  scowan
00046  * Added methods to get the bitset and bitset deque from a elem trans list.
00047  *
00048  * Revision 1.58  2004/02/04 14:35:26  scowan
00049  * Added region 2d to elem select parms.
00050  *
00051  * Revision 1.57  2003/11/21 22:17:04  scowan
00052  * Support new Capabilities system.
00053  *
00054  * Revision 1.56  2003/10/22 16:31:07  mju
00055  * Add GETOBJFILTER_HASNOIMPLIEDGEOREF.
00056  *
00057  * Revision 1.55  2003/10/22 16:17:20  scowan
00058  * Added get objtype set static method.
00059  *
00060  * Revision 1.54  2003/09/30 16:52:06  dwilliss
00061  * Doxygen
00062  *
00063  * Revision 1.53  2003/09/25 21:56:37  dwilliss
00064  * doxygen
00065  *
00066  * Revision 1.52  2003/09/15 13:49:45  fileserver!dwilliss
00067  * Doxygen
00068  *
00069  * Revision 1.51  2003/09/11 20:09:31  scowan
00070  * Added is geometric function.
00071  *
00072  * Revision 1.50  2003/06/25 14:49:56  scowan
00073  * Added set array.
00074  *
00075  * Revision 1.49  2003/06/24 21:03:48  scowan
00076  * Added more capability flags.
00077  *
00078  * Revision 1.48  2003/06/19 17:45:27  scowan
00079  * Added virtual method and enum.
00080  *
00081  * Revision 1.47  2003/06/04 23:34:55  scowan
00082  * Added find element draw set.
00083  *
00084  * Revision 1.46  2003/05/30 21:33:19  scowan
00085  * Added is selectable filter.
00086  *
00087  * Revision 1.45  2003/05/27 16:36:30  scowan
00088  * Added new filters and un-inlined a method.
00089  *
00090  * Revision 1.44  2003/05/12 23:32:59  scowan
00091  * Changes to virtual methods.
00092  *
00093  * Revision 1.43  2003/03/07 18:44:07  scowan
00094  * Added on poin type change callback.
00095  *
00096  * Revision 1.42  2003/02/19 20:13:49  scowan
00097  * Added extract flag.
00098  *
00099  * Revision 1.41  2003/02/06 21:26:40  scowan
00100  * *** empty log message ***
00101  *
00102  * Revision 1.40  2003/02/06 21:25:06  scowan
00103  * Added another combine styles.
00104  *
00105  * Revision 1.39  2003/02/06 16:03:31  scowan
00106  * Added new standard empty object filter class.
00107  *
00108  * Revision 1.38  2002/12/06 16:49:03  scowan
00109  * More const.
00110  *
00111  * Revision 1.37  2002/11/06 20:52:26  scowan
00112  * More const.
00113  *
00114  * Revision 1.36  2002/10/23 21:06:55  scowan
00115  * Added another get element set.
00116  *
00117  * Revision 1.35  2002/09/30 23:21:31  scowan
00118  * Made element search code const.
00119  *
00120  * Revision 1.34  2002/09/26 15:02:03  mju
00121  * Fix SEARCHRESULT iterator initialization/increment for ranges case.
00122  *
00123  * Revision 1.33  2002/09/17 22:48:56  scowan
00124  * More virtual method adjustment.
00125  *
00126  * Revision 1.32  2002/09/12 22:10:07  mju
00127  * Add addl ctor for searchfilter_bitset.
00128  *
00129  * Revision 1.31  2002/09/12 21:28:11  mju
00130  * Add SEARCHFILTER_BITSET.
00131  *
00132  * Revision 1.30  2002/09/03 22:17:59  scowan
00133  * More virtual method moves.
00134  *
00135  * Revision 1.29  2002/08/29 22:12:50  scowan
00136  * Virtual method adjustment.
00137  *
00138  * Revision 1.28  2002/08/19 15:05:05  scowan
00139  * Fixed g++3.1 warnings.
00140  *
00141  * Revision 1.27  2002/06/19 22:23:59  scowan
00142  * More methods changes.
00143  *
00144  * Revision 1.26  2002/06/18 22:15:09  scowan
00145  * Added extract interface.
00146  *
00147  * Revision 1.25  2002/05/01 17:42:40  scowan
00148  * Method change.
00149  *
00150  * Revision 1.24  2002/04/30 17:33:43  scowan
00151  * Changed makr parm class name.
00152  *
00153  * Revision 1.23  2002/04/26 22:44:20  scowan
00154  * Added more virtual methods.
00155  *
00156  * Revision 1.22  2002/03/01 16:19:05  scowan
00157  * Added virtual methods.
00158  *
00159  * Revision 1.21  2002/02/28 18:56:23  scowan
00160  * Added sort search restul.
00161  *
00162  * Revision 1.20  2002/02/27 23:24:07  scowan
00163  * Added get geometric and get element extents methods.
00164  *
00165  * Revision 1.19  2002/01/30 15:56:41  scowan
00166  * Added sml context creation method.
00167  *
00168  * Revision 1.18  2002/01/29 17:26:47  scowan
00169  * Added inline method to get the object dimension.
00170  *
00171  * Revision 1.17  2002/01/07 20:24:46  scowan
00172  * Fixed access to observer class.
00173  * Arranged classes for genator docs.
00174  *
00175  * Revision 1.16  2002/01/03 22:56:56  scowan
00176  * Added extents management methods and an exttents changed callback.
00177  *
00178  * Revision 1.15  2001/10/08 20:49:39  scowan
00179  * Added element region method.
00180  *
00181  * Revision 1.14  2001/09/28 15:32:54  scowan
00182  * Add observer class.
00183  *
00184  * Revision 1.13  2001/07/31 16:40:23  scowan
00185  * Added new interface methods.
00186  *
00187  * Revision 1.12  2001/06/13 21:51:33  scowan
00188  * Added to RVC namespace.
00189  *
00190  * Revision 1.10  2001/05/24 17:37:14  scowan
00191  * Added vurtual methods for finding elements.
00192  *
00193  * Revision 1.9  2001/04/23 22:52:04  scowan
00194  * Added find closest methods.
00195  *
00196  * Revision 1.8  2001/04/23 17:40:48  scowan
00197  * Fixed const stuff.
00198  *
00199  * Revision 1.7  2001/04/23 17:38:33  scowan
00200  * Added update extents method.
00201  *
00202  * Revision 1.6  2001/01/18 23:17:57  scowan
00203  * Removed inline constructor / destructor calls.
00204  *
00205  * Revision 1.5  2001/01/16 16:51:52  scowan
00206  * Must have virtual destructor body.
00207  *
00208  * Revision 1.4  2000/12/01 15:57:30  scowan
00209  * Fixed MAC errors.
00210  *
00211  * Revision 1.3  2000/11/24 22:53:23  scowan
00212  * Added set extents pure virtual method.
00213  *
00214  * Revision 1.2  2000/10/19 17:55:45  scowan
00215  * Checked in for vacation.
00216  *
00217  * Revision 1.1  2000/10/02 17:39:43  scowan
00218  * Initial revision
00219  *
00220  * \endif
00221 **/
00222 
00223 //!   \class RVC::GEOMETRIC rvc/geometrc.h
00224 //!   \brief Interface for RVC objects that support line work paradigm.
00225 //!
00226 //!   RVC Object Types that this class supports: Derived class
00227 //!
00228 //!   Default RVC Object Type for this class: Derived class
00229 //!
00230 //!   Valid parents for this class: Derived class
00231 
00232 #ifndef INC_RVC_GEOMETRC_H
00233 #define INC_RVC_GEOMETRC_H
00234 
00235 #ifndef INC_RVC_GEOSPATL_H
00236    #include <rvc/geospatl.h>
00237 #endif
00238 
00239 #ifndef INC_RVC_STYLE_H
00240    #include <rvc/style.h>
00241 #endif
00242 
00243 #ifndef INC_MI32_ELEMTYPE_H
00244    #include <mi32/elemtype.h>
00245 #endif
00246 
00247 #ifndef INC_MI32_SIMPLEAR_H
00248    #include <mi32/simplear.h>
00249 #endif
00250 
00251 #ifndef INC_MI32_RANGE_H
00252    #include <mi32/range.h>
00253 #endif
00254 
00255 #ifndef INC_RVC_GETOBJF_H
00256    #include <rvc/getobjf.h>
00257 #endif
00258 
00259 #ifndef INC_MI32_REGION2D_H
00260    #include <mi32/region2d.h>
00261 #endif
00262 
00263 #ifndef INC_MI32_BITSET_H
00264    #include <mi32/bitset.h>
00265 #endif
00266 
00267 #ifndef INC_MI32_ELEMTYPESET_H
00268    #include <mi32/elemtypeset.h>
00269 #endif
00270 
00271 #ifndef GENERATING_DOXYGEN_OUTPUT
00272 struct SMLCONTEXT;      //!< Forward Declarations
00273 class TRANS2D_MAPGEN;
00274 class BITSET_DEQUE;
00275 #endif // GENERATING_DOXYGEN_OUTPUT
00276 
00277 namespace RVC {
00278 
00279 #ifndef GENERATING_DOXYGEN_OUTPUT
00280 class ELEMENT;          //!< Forward Declarations
00281 class QSEARCHTREE;
00282 class SPATIALTREE;
00283 #endif // GENERATING_DOXYGEN_OUTPUT
00284 
00285 class GEOMETRIC : public GEOSPATIAL {
00286    public:
00287 
00288       //Ignore
00289       class ELEMSELECTFILTER;
00290       class ELEMSELECTPARMS;
00291       class ELEMTRANSLIST;
00292       class GETOBJFILTER_HASMINIMUMELEMENTS;
00293       class GETOBJFILTER_HASNOIMPLIEDGEOREF;
00294       class GETOBJFILTER_ISDISPLAYABLE;
00295       class GETOBJFILTER_ISNOTEMPTY;
00296       class GETOBJFILTER_ISSELECTABLE;
00297       class MAKEPARMSBASE;
00298       class OBSERVER;
00299       class SEARCHFILTER;
00300       class SEARCHFILTER_BITSET;
00301       class SEARCHFILTER_ELEMTRANSLIST;
00302       class SEARCHRESULT;
00303       //End Ignore
00304       
00305       enum CAPABILITY {
00306          CAPABILITY_None =             0,
00307          CAPABILITY_OwnSearchMethods = 512,  //!< Object has its own search methods (Oracle, MySQL, ...)
00308          CAPABILITY_CanAddToEnd,             //!< Object can be modified by adding elements to the end of the object
00309          CAPABILITY_CanChangeElements,       //!< Existing object elements can be modified 
00310          CAPABILITY_HasStyleByElement,       //!< Each element can have its own style settings
00311          CAPABILITY_ElementHasExtents,       //!< Each element has extents stored with it, except labels
00312          CAPABILITY_HasLabels,               //!< Object has labels
00313          CAPABILITY_LabelHasExtents,         //!< Each label has extents stored with it
00314          CAPABILITY_CanDeleteLastElement,    //!< Can delete the last element in the set
00315          CAPABILITY_CanDeleteAnyElement      //!< Can delete any element in the set
00316          };
00317 
00318       enum EXTRACTFLAGS {
00319          EXTRACTFLAG_None =                  0,
00320          EXTRACTFLAG_RegionMethod =          0x00000001,    //!< SelectMethod is a REGION2D
00321          EXTRACTFLAG_RemExRecords =          0x00000002,    //!< Remove Excess (Unattached) database records
00322          EXTRACTFLAG_RemStdAttTables =       0x00000004,    //!< Remove Standard Attribute database tables
00323          EXTRACTFLAG_IgnoreMissingLines =    0x00000008,    //!< Ignore missing lines from extraction operation, polygon and node line lists
00324          EXTRACTFLAG_TableJoinNameStruct =   0x00000010,    //!< Join tables in Append functions if names alike and compatable structures
00325          EXTRACTFLAG_TableJoinStruct =       0x00000020,    //!< Join tables in Append functions if compatable structures
00326          EXTRACTFLAG_TableRemoveDupRec =     0x00000040,    //!< Do not copy over records if exists in dest table
00327          EXTRACTFLAG_IgnorePolygonTables =   0x00000080,    //!< Do not copy over polygon databases
00328          EXTRACTFLAG_RemoveTables =          0x00000100,    //!< Remove destination tables
00329          EXTRACTFLAG_CopyHyperIndexSub =     0x00000200,    //!< Copy Hyper index subobjects
00330          EXTRACTFLAG_DensifyPoints =         0x00000400     //!< Densify line points using transformation parameters
00331          };
00332 
00333       enum POINTTYPE {
00334          POINTTYPE_2DXY = 1,           //!< 2-D coordinates, X and Y given (default)
00335          POINTTYPE_3DXY = 4,           //!< 3-D coordinates, X, Y given, Z constant
00336          POINTTYPE_3DXYZ = 7           //!< 3-D coordinates, X, Y and Z given
00337          };
00338 
00339       //! Default constructor
00340       GEOMETRIC (
00341          );
00342 
00343       //! Copy constructor
00344       GEOMETRIC (
00345          const RVC::GEOMETRIC& rhs
00346          );
00347       
00348       //! Destructor
00349       virtual ~GEOMETRIC (
00350          ) = 0;
00351 
00352       //! Assignment
00353       RVC::GEOMETRIC& operator= (
00354          const RVC::GEOMETRIC& rhs
00355          );
00356 
00357       //! Add an element to the search tree
00358       ERRVALUE AddSearchTreeElement (
00359          INT32 elemnum,
00360          ELEMTYPE ElemType,
00361          const DRECT2D& Extents
00362          ) { return (v_AddSearchTreeElement(elemnum, ElemType, Extents)); }
00363 
00364       //! Populate a search tree given existing elements
00365       ERRVALUE BuildSearchTree (
00366          INT32 InitialNumElements,
00367          ELEMTYPE ElemType,
00368          const DRECT2D& Extents
00369          ) { return (v_BuildSearchTree(InitialNumElements, ElemType, Extents)); }
00370          
00371       //! Re-Initialize search tree to a state with no elements
00372       ERRVALUE ClearSearchTree (
00373          INT32 InitialNumElements,
00374          ELEMTYPE ElemType,
00375          const DRECT2D& Extents
00376          ) { return (v_ClearSearchTree(InitialNumElements, ElemType, Extents)); }
00377 
00378       //! Combine styles from source object 'this' to the destination object 'DestObj'.
00379       //! this method deals with style links from source tables
00380       ERRVALUE CombineStylesTo (
00381          RVC::GEOMETRIC& DestObj
00382          ) const;
00383 
00384       //! Combine styles from source object 'this' to the destination object 'DestObj'.
00385       //! this method deals with style links from source tables
00386       //! Used for objects with direct style attachments (a.k.a CAD)
00387       ERRVALUE CombineStylesTo (
00388          RVC::GEOMETRIC& DestObj,
00389          SIMPLE_ARRAY<INT32>& FontTrans,
00390          SIMPLE_ARRAY<INT32> PattTrans[STYLE::PATTERN_NumTypes]
00391          ) const;
00392 
00393       //! Copy an element from one part of the search tree to another (atomic method)
00394       ERRVALUE CopySearchTreeElement (
00395          INT32 SourceElement,
00396          INT32 DestElement,
00397          ELEMTYPE ElemType,
00398          const DRECT2D& Extents
00399          ) { return (v_CopySearchTreeElement(SourceElement, DestElement, ElemType, Extents)); }
00400          
00401       //! Create an SML context for the given derived class instance
00402       ERRVALUE CreateSMLContext (
00403          SMLCONTEXT **pcontext               //!< SML context allocated and RETURNED
00404          ) const;
00405 
00406       //! Delete an element from the search tree
00407       ERRVALUE DeleteSearchTreeElement (
00408          INT32 elemnum,
00409          ELEMTYPE ElemType
00410          ) { return (v_DeleteSearchTreeElement(elemnum, ElemType)); }
00411 
00412       //! Extract elements from source 'this' object to existing destination object
00413       //! Deals with database attachments and element transfers
00414       //! Not implemented for CAD or TIN yet
00415       ERRVALUE ExtractTo (
00416          RVC::GEOMETRIC& DestObj,
00417          RVC::GEOMETRIC::ELEMTRANSLIST& TransList,
00418          const TRANS2D_MAPGEN& tmg,
00419          RVC::GEOMETRIC::EXTRACTFLAGS ExtractFlags = EXTRACTFLAG_None
00420          ) const { return (v_ExtractTo(DestObj, TransList, tmg, ExtractFlags)); }
00421          
00422       //! Determine closest element based on point and search distance
00423       //! @return Element found, -1 if no elements are close enough, < -1 if error
00424       INT32 FindClosestElement (
00425          ELEMTYPE ElemType,
00426          const DPOINT2D& SearchPt,
00427          double SearchDist,
00428          double* DistFromElem
00429          ) const { return (v_FindClosestElementLow(ElemType, SearchPt, 0, SearchDist, DistFromElem)); }
00430       
00431       //! Determine closest element based on point and search distance with filter
00432       //! @return Element found, -1 if no elements are close enough, < -1 if error
00433       INT32 FindClosestElement (
00434          ELEMTYPE ElemType,
00435          const DPOINT2D& SearchPt,
00436          SEARCHFILTER& SearchFilter,
00437          double SearchDist,
00438          double* DistFromElem
00439          ) const { return (v_FindClosestElementLow(ElemType, SearchPt, &SearchFilter, SearchDist, DistFromElem)); }
00440       
00441       //! Determine set of elements that are within the 'SearchDist' of the 'SearchPt'
00442       ERRVALUE FindClosestElements (
00443          const DPOINT2D& SearchPt, 
00444          double SearchDist, 
00445          SIMPLE_ARRAY<RVC::ELEMENT>& ElementList
00446          ) const { return (v_FindClosestElementsLow(SearchPt, SearchDist, 0, ElementList)); }
00447          
00448       //! Determine set of elements that are within the 'SearchDist' of the 'SearchPt' with filter
00449       ERRVALUE FindClosestElements (
00450          const DPOINT2D& SearchPt, 
00451          double SearchDist, 
00452          SEARCHFILTER& SearchFilter,
00453          SIMPLE_ARRAY<RVC::ELEMENT>& ElementList
00454          ) const { return (v_FindClosestElementsLow(SearchPt, SearchDist, &SearchFilter, ElementList)); }
00455       
00456       //! Obtain set of elements that fall within the rectangle, return list in 'SearchResult'
00457       //! This method will NOT build search trees to determine the elements that fall within the rectangle.
00458       //! If a search or spatial tree is not available to limit the search, all elements will be returned
00459       ERRVALUE FindElementDrawSet (
00460          ELEMTYPE ElemType,
00461          const DRECT2D& SearchExtents,
00462          SEARCHRESULT& SearchResult
00463          ) const;
00464          
00465       //! Obtain set of elements that fall within the rectangle, return list in 'SearchResult'
00466       //! This method will build search trees, if needed, to determine the elements that fall within the rectangle.
00467       ERRVALUE FindElementSearchSet (
00468          ELEMTYPE ElemType,
00469          const DRECT2D& SearchExtents,
00470          SEARCHRESULT& SearchResult
00471          ) const;
00472 
00473       //! Obtain the DBASE_ELEMENT Attachement index from the element specified
00474       //! @return '-1' if element does not have a database attachment, >= 0 if it does.
00475       INT32 GetAttachmentIndex (
00476          const RVC::ELEMENT& Element
00477          ) const { return (v_GetAttachmentIndex(Element)); }
00478       
00479       //! Obtain DIMENSION type
00480       //! @return DIMENSION type
00481       DIMENSION GetDimension (
00482          ) const { return ((GetPointType() == POINTTYPE_3DXYZ) ? DIMENSION_3D : DIMENSION_2D); }
00483          
00484       //! Obtain element extents using element type and element number
00485       ERRVALUE GetElementExtents (
00486          ELEMTYPE ElemType,
00487          INT32 ElemNum,
00488          DRECT3D& Extents              //!< Element extents RETURNED, set to invalid if error or element is deleted
00489          ) const { return (v_GetElementExtents(ElemType, ElemNum, Extents)); }
00490 
00491       //! Get geometric object referred to by 'object'
00492       //! @return Allocated instance of RVC::GEOMETRIC object (must be 'delete'd) or 0 if error
00493       static RVC::GEOMETRIC* GetGeometric (
00494          const RVC::OBJECT& object
00495          );
00496          
00497       //! Get geometric object referred to by 'ObjItem'
00498       //! @return Allocated instance of RVC::GEOMETRIC object (must be 'delete'd) or 0 if error
00499       static RVC::GEOMETRIC* GetGeometric (
00500          const RVC::OBJITEM& ObjItem
00501          );
00502          
00503       //! Obtain next element ID depending on element type
00504       //! @return Element ID to be used for the next element
00505       INT32 GetNextElementID (
00506          ELEMTYPE ElemType
00507          ) const { return (v_GetNextElementID(ElemType)); }
00508 
00509       //! Obtain number of elements based on element type
00510       //! Specifying ELEMTYPE_All will return the total combination of elements in the object
00511       //! @return Number of elements if valid ELEMTYPE for object, -1 if not
00512       INT32 GetNumElements (
00513          ELEMTYPE ElemType
00514          ) const { return (v_GetNumElements(ElemType)); }
00515       
00516       //! Get correct OBJTYPESET for all geometric OBJTYPE's
00517       //! @return OBJTYPESET for all geometric OBJTYPE's
00518       static RVC::OBJTYPESET GetObjTypeSet (
00519          );
00520          
00521       //! Obtain number of point coordinate dimensions
00522       //! @return Number of dimensions
00523       INT32 GetPointDimension (
00524          ) const { return (GetPointSize() / sizeof(double)); }
00525          
00526       //! Obtain point coordinate type
00527       //! @return POINTTYPE coordinate type
00528       POINTTYPE GetPointType (
00529          ) const { return (v_GetPointType()); }
00530 
00531       //! Obtain size of point coordinate
00532       //! @return Size of point in bytes
00533       INT32 GetPointSize (
00534          ) const { return (v_GetPointSize()); }
00535 
00536       //! Obtain the total line length of all of the lines in the geometric object combined
00537       //! @return Total length of all of the lines combined or zero if not computed    
00538       double GetTotalLineLength (
00539          ) const { return (v_GetTotalLineLength()); }
00540       
00541       //! Determine if the element in this object is deleted.
00542       //! @return 'true' if the element is deleted, 'false' if not.
00543       bool IsElementDeleted (
00544          const RVC::ELEMENT& Element
00545          ) const { return (v_IsElementDeleted(Element)); }
00546 
00547       //! Determine if the object has any elements.
00548       //! @return 'true' if the object is empty, 'false' if not.
00549       bool IsEmpty (
00550          ) const { return (v_IsEmpty()); }
00551 
00552       //! Determine if the object type is a geometric object
00553       static bool IsGeometric (
00554          RVC::OBJTYPE ObjType
00555          );
00556 
00557       //! Save search tree objects
00558       ERRVALUE SaveSearchTrees (
00559          ) { return (v_SaveSearchTrees()); }
00560          
00561       //! Set the extents of an object
00562       //! Only use if you have a write lock on the entire object
00563       ERRVALUE SetExtents (
00564          const DRECT3D &extents
00565          ) { return (v_SetExtents(extents)); }
00566          
00567       //! Set next element ID depending on element type
00568       ERRVALUE SetNextElementID (
00569          ELEMTYPE ElemType,
00570          INT32 NextElementID
00571          ) { return (v_SetNextElementID(ElemType, NextElementID)); }
00572 
00573       //! Set search tree handle for all open instances of this object
00574       bool SetSearchTree (
00575          ELEMTYPE ElemType,
00576          RVC::QSEARCHTREE* SearchTree,
00577          bool ReplaceExisting = false
00578          ) { return (v_SetSearchTree(ElemType, SearchTree, ReplaceExisting)); }
00579          
00580       //! Set the total line length of all of the lines in the geometric object combined
00581       ERRVALUE SetTotalLineLength (
00582          double length
00583          ) { return (v_SetTotalLineLength(length)); }
00584       
00585       //! Generate element translation lists dependent on the selection parameters.
00586       //! @return > 0 if elements are found to meet the selection parameters, '0' if no elements found, < 0 error 
00587       int SetupElemTransList (
00588          const RVC::GEOMETRIC::ELEMSELECTPARMS& SelectParms,
00589          RVC::GEOMETRIC::ELEMTRANSLIST& TransList
00590          ) const { return (SetupElemTransList(SelectParms, TransList, 0)); }
00591          
00592       //! Generate element translation lists dependent on the selection parameters.
00593       //! @return > 0 if elements are found to meet the selection parameters, '0' if no elements found, < 0 error 
00594       int SetupElemTransList (
00595          const RVC::GEOMETRIC::ELEMSELECTPARMS& SelectParms,
00596          RVC::GEOMETRIC::ELEMTRANSLIST& TransList,
00597          RVC::GEOMETRIC::ELEMSELECTFILTER& SelectFilter
00598          ) const { return (SetupElemTransList(SelectParms, TransList, &SelectFilter)); }
00599          
00600       //! Test element against region
00601       //! The REGION2D needs to be in 'object' coordinates, no conversion is done internally
00602       //! @return True if test against region was sucessful
00603       bool TestElementAgainstRegion (
00604          const RVC::ELEMENT& Element, 
00605          const REGION2D& region,
00606          TESTCRITERIA TestMode
00607          ) const { return (v_TestElementAgainstRegion(Element, region, TestMode)); }
00608       
00609       //! Update the extents of an object, this is a thread safe method
00610       ERRVALUE UpdateExtents (
00611          const DRECT3D &extents
00612          ) { return (v_UpdateExtents(extents)); }
00613          
00614    protected:
00615 
00616       #ifndef GENERATING_DOXYGEN_OUTPUT
00617       static void GeometricCallbackFunc (MfAnyCallbackStruct *cb, void *data);
00618       #endif // GENERATING_DOXYGEN_OUTPUT
00619 
00620    private:
00621       // Pure virtual methods
00622    
00623       virtual ERRVALUE v_AddSearchTreeElement (INT32 elemnum, ELEMTYPE ElemType, const DRECT2D& Extents) = 0;
00624       virtual ERRVALUE v_BuildSearchTree (INT32 InitialNumElements, ELEMTYPE ElemType, const DRECT2D& Extents) = 0;
00625       virtual ERRVALUE v_ClearSearchTree (INT32 InitialNumElements, ELEMTYPE ElemType, const DRECT2D& Extents) = 0;
00626       virtual ERRVALUE v_CopySearchTreeElement (INT32 SourceElement, INT32 DestElement, ELEMTYPE ElemType, const DRECT2D& Extents) = 0;
00627       virtual ERRVALUE v_DeleteSearchTreeElement (INT32 elemnum, ELEMTYPE ElemType) = 0;
00628       virtual ERRVALUE v_ExtractTo (RVC::GEOMETRIC& DestObj, RVC::GEOMETRIC::ELEMTRANSLIST& TransList, const TRANS2D_MAPGEN& tmg, RVC::GEOMETRIC::EXTRACTFLAGS ExtractFlags) const = 0;
00629       virtual INT32 v_FindClosestElementLow (ELEMTYPE ElemType, const DPOINT2D& SearchPt, SEARCHFILTER* SearchFilter, double SearchDist, double* DistFromElem) const = 0;
00630       virtual ERRVALUE v_FindClosestElementsLow (const DPOINT2D& SearchPt, double SearchDist, SEARCHFILTER* SearchFilter, SIMPLE_ARRAY<RVC::ELEMENT>& ElementList) const;
00631       virtual ERRVALUE v_FindElementDrawSet (ELEMTYPE ElemType, const DRECT2D& SearchExtents, SEARCHRESULT& SearchResult) const = 0;
00632       virtual ERRVALUE v_FindElementSearchSet (ELEMTYPE ElemType, const DRECT2D& SearchExtents, SEARCHRESULT& SearchResult) const = 0;
00633       virtual INT32 v_GetAttachmentIndex (const RVC::ELEMENT& Element) const;
00634       virtual ERRVALUE v_GetElementExtents (ELEMTYPE ElemType, INT32 ElemNum, DRECT3D& Extents) const = 0;
00635       virtual INT32 v_GetNextElementID (ELEMTYPE ElemType) const = 0;
00636       virtual INT32 v_GetNumElements (ELEMTYPE ElemType) const = 0;
00637       virtual POINTTYPE v_GetPointType () const = 0;
00638       virtual INT32 v_GetPointSize () const = 0;
00639       virtual double v_GetTotalLineLength () const = 0;
00640       virtual bool v_IsElementDeleted (const RVC::ELEMENT& Element) const = 0;
00641       virtual bool v_IsEmpty () const = 0;
00642       virtual ERRVALUE v_SaveSearchTrees () = 0;
00643       virtual ERRVALUE v_SetExtents (const DRECT3D &extents) = 0;
00644       virtual ERRVALUE v_SetNextElementID (ELEMTYPE ElemType, INT32 NextElementID) = 0;
00645       virtual bool v_SetSearchTree (ELEMTYPE ElemType, RVC::QSEARCHTREE* SearchTree, bool ReplaceExisting) = 0;
00646       virtual ERRVALUE v_SetTotalLineLength (double length) = 0;
00647       virtual int v_SetupElemTransList (const RVC::GEOMETRIC::ELEMSELECTPARMS& SelectParms, RVC::GEOMETRIC::ELEMTRANSLIST& TransList, RVC::GEOMETRIC::ELEMSELECTFILTER* SelectFilter) const = 0;
00648       virtual bool v_TestElementAgainstRegion (const RVC::ELEMENT& Element, const REGION2D& region, TESTCRITERIA TestMode) const = 0;
00649       virtual ERRVALUE v_UpdateExtents (const DRECT3D &extents) = 0;
00650 
00651       #ifndef GENERATING_DOXYGEN_OUTPUT
00652       int SetupElemTransList (const RVC::GEOMETRIC::ELEMSELECTPARMS& SelectParms, RVC::GEOMETRIC::ELEMTRANSLIST& TransList, RVC::GEOMETRIC::ELEMSELECTFILTER* SelectFilter) const;
00653       #endif // GENERATING_DOXYGEN_OUTPUT
00654    };
00655 
00656 DEFINE_ENUM_OP_BITWISE(GEOMETRIC::EXTRACTFLAGS);
00657 
00658 
00659 class GEOMETRIC::ELEMSELECTFILTER {
00660    public:
00661       ELEMSELECTFILTER () {}
00662 
00663       //! Filter elements based on some external criteria
00664       //! @return '1' for element acceptance, '0' to reject element, < 0 for an error     
00665       int FilterElement (
00666          RVC::ELEMENT& Element
00667          ) { return (v_FilterElement(Element)); }
00668          
00669    private:
00670       // Pure virtual
00671       virtual int v_FilterElement (RVC::ELEMENT& element) = 0;
00672    };
00673 
00674 
00675 class GEOMETRIC::ELEMSELECTPARMS {
00676    public:
00677    
00678       enum EXTRACT {
00679          EXTRACT_All,
00680          EXTRACT_PartInside,
00681          EXTRACT_FullInside,
00682          EXTRACT_ClipInside,
00683          EXTRACT_PartOutside,
00684          EXTRACT_FullOutside,
00685          EXTRACT_ClipOutside
00686          };
00687    
00688       struct ITEM {
00689          enum SELECT {
00690             SELECT_None = 0,
00691             SELECT_All,
00692             SELECT_ByRecord,
00693             SELECT_ByScript,
00694             SELECT_ByElement,
00695             SELECT_Last
00696             };
00697             
00698          ITEM (
00699             );
00700       
00701          SELECT m_SelectType;
00702          MISTRING m_QueryStr;
00703          RVC::OBJECTNAME m_TableName;     //!< Table that 'RecordList' is selected from
00704          BITSET m_RecordList;             //!< List of records in 'TableNum' that the user has selected (bit array)
00705          BITSET m_ElemList;               //!< List of elements (bit array)
00706          };
00707    
00708       ELEMSELECTPARMS (
00709          );
00710       
00711       const REGION2D& GetRegion2D (
00712          ) const { return (m_Region); }
00713       
00714       EXTRACT GetRegionExtractMode (
00715          ) const { return (m_ExtractMode); }
00716 
00717       TESTCRITERIA GetRegionTestCriteria (
00718          ) const { 
00719          TESTCRITERIA TestCriteria = TESTCRITERIA_PartInside;
00720          switch (m_ExtractMode) {
00721             case EXTRACT_FullOutside:  TestCriteria = TESTCRITERIA_FullOutside; break;
00722             case EXTRACT_PartOutside:  TestCriteria = TESTCRITERIA_PartOutside; break;
00723             case EXTRACT_ClipOutside:  TestCriteria = TESTCRITERIA_PartOutside; break;
00724             case EXTRACT_FullInside:   TestCriteria = TESTCRITERIA_FullInside; break;
00725             case EXTRACT_PartInside:   TestCriteria = TESTCRITERIA_PartInside; break;
00726             case EXTRACT_ClipInside:   TestCriteria = TESTCRITERIA_PartInside; break;
00727             }  
00728          return (TestCriteria); 
00729          }
00730       
00731       const ITEM& GetSelectParmItem (
00732          ELEMTYPE ElemType
00733          ) const;    
00734    
00735       ITEM& GetSelectParmItem (
00736          ELEMTYPE ElemType
00737          );
00738          
00739       bool HasRegion (
00740          ) const { return (!m_Region.IsEmpty()); }
00741    
00742       void SetRegion (
00743          const REGION2D& Region
00744          ) { m_Region = Region; }
00745       
00746       void SetRegionExtractMode (
00747          EXTRACT ExtractMode
00748          ) { m_ExtractMode = ExtractMode; }
00749       
00750       void SetSelectAll (
00751          );
00752          
00753       void SetSelectNone (
00754          );
00755          
00756       void SetSelectParmItem (
00757          ELEMTYPE ElemType,
00758          const ITEM& item
00759          );    
00760    
00761    private:
00762       #ifndef GENERATING_DOXYGEN_OUTPUT
00763       ITEM m_SelectParm[6];
00764       REGION2D m_Region;
00765       EXTRACT m_ExtractMode;
00766       #endif // GENERATING_DOXYGEN_OUTPUT
00767    };
00768 
00769 
00770 //! Class to manage element translation lists from source to destination elements
00771 //! Eg: 'DestElemNum = TransList[SourceElemNum]' where 'TransList' is an array of INT32's
00772 //! The value '-1' states that the source element does not translate to a destination number.
00773 class GEOMETRIC::ELEMTRANSLIST {
00774    public:
00775 
00776       //! Constructor   
00777       ELEMTRANSLIST (
00778          ) {}
00779    
00780       //! Copy Constructor 
00781       ELEMTRANSLIST (
00782          const ELEMTRANSLIST& rhs
00783          );
00784    
00785       //! Destructor 
00786       ~ELEMTRANSLIST (
00787          ) {}
00788          
00789       //! Assignment Operator
00790       ELEMTRANSLIST& operator= (
00791          const ELEMTRANSLIST& rhs
00792          );
00793    
00794       //! Obtain the element translation array for a particular element type (ELEMTYPE)
00795       //! @return Element Translation List
00796       const SIMPLE_ARRAY<INT32>& GetElementTransList (
00797          ELEMTYPE ElemType
00798          ) const;
00799          
00800       //! Obtain the element translation array for a particular element type (ELEMTYPE)
00801       //! @return Element Translation List
00802       SIMPLE_ARRAY<INT32>& GetElementTransList (
00803          ELEMTYPE ElemType
00804          );
00805          
00806       //! Obtain the element bitset for a particular element type (ELEMTYPE)
00807       ERRVALUE GetElementBitset (
00808          ELEMTYPE ElemType,
00809          BITSET& Bitset
00810          ) const;
00811          
00812       //! Obtain the element bitset deque for a particular element type (ELEMTYPE)
00813       ERRVALUE GetElementBitsetDeque (
00814          ELEMTYPE ElemType,
00815          BITSET_DEQUE& BitsetDeque
00816          ) const;
00817          
00818       ERRVALUE GetReverseTransList (
00819          ELEMTYPE ElemType,
00820          SIMPLE_ARRAY<INT32>& ReverseTrans,
00821          INT32 NumDestElems
00822          ) const;
00823          
00824       //! Set an element translation list entry to a pre-built list
00825       void SetElementTransList (
00826          const SIMPLE_ARRAY<INT32>& TransList,
00827          ELEMTYPE ElemType
00828          );
00829          
00830       //! Set an element translation list entry to a pre-built list
00831       ERRVALUE SetElementTransList (
00832          INT32* TransList,
00833          INT32 NumItems,
00834          ELEMTYPE ElemType
00835          );
00836 
00837       //! Set translation list to a one-to-one (Identity) mapping
00838       ERRVALUE SetIdentity (
00839          const RVC::GEOMETRIC& GeoObj        //!< Geometric object used to set identity arrays using the object type and number of elements per element type
00840          );
00841    
00842       //! Set an element translation list entry to a one-to-one (Identity) mapping 
00843       ERRVALUE SetIdentity (
00844          const RVC::GEOMETRIC& GeoObj,       //!< Geometric object used to set identity arrays using the object type
00845          ELEMTYPE ElemType                   //!< Element Type used to set the identity array entry using the number of elements for this type
00846          );
00847    
00848    private:
00849       #ifndef GENERATING_DOXYGEN_OUTPUT
00850       SIMPLE_ARRAY<INT32> m_TransList[6];
00851       #endif // GENERATING_DOXYGEN_OUTPUT
00852    };
00853 
00854 
00855 //! GETOBJFILTER derived class to determine if the geometric object has the minimum number of elements of the specified types
00856 class GEOMETRIC::GETOBJFILTER_HASMINIMUMELEMENTS : public GETOBJFILTER {
00857    public:
00858       GETOBJFILTER_HASMINIMUMELEMENTS (
00859          const ELEMTYPESET& ElemTypeSet,
00860          INT32 MinElements = 1
00861          ) : m_ElemTypeSet(ElemTypeSet), m_MinElements(MinElements) {}
00862          
00863    private:
00864       #ifndef GENERATING_DOXYGEN_OUTPUT
00865       ELEMTYPESET m_ElemTypeSet;
00866       INT32 m_MinElements;
00867       
00868       virtual bool v_IsSelectable (const RVC::OBJITEM& ObjItem, int position);
00869       #endif // GENERATING_DOXYGEN_OUTPUT
00870    };
00871 
00872 //! Geometric object selection filter to disallow selection of geometric objects already having implied georeference.
00873 class GEOMETRIC::GETOBJFILTER_HASNOIMPLIEDGEOREF : public GETOBJFILTER {
00874    public:
00875       GETOBJFILTER_HASNOIMPLIEDGEOREF () {}
00876    private:
00877       #ifndef GENERATING_DOXYGEN_OUTPUT
00878       virtual bool v_IsSelectable (const RVC::OBJITEM& ObjItem, int position);
00879       #endif // GENERATING_DOXYGEN_OUTPUT
00880    };
00881    
00882 //! Geometric object selection filter to disallow selection of empty and invalid extent geometric objects
00883 class GEOMETRIC::GETOBJFILTER_ISDISPLAYABLE : public GETOBJFILTER {
00884    public:
00885       GETOBJFILTER_ISDISPLAYABLE () {}
00886    private:
00887       #ifndef GENERATING_DOXYGEN_OUTPUT
00888       virtual bool v_IsSelectable (const RVC::OBJITEM& ObjItem, int position);
00889       #endif // GENERATING_DOXYGEN_OUTPUT
00890    };
00891    
00892 //! Geometric object selection filter to disallow selection of empty geometric objects
00893 class GEOMETRIC::GETOBJFILTER_ISNOTEMPTY : public GETOBJFILTER {
00894    public:
00895       GETOBJFILTER_ISNOTEMPTY () {}
00896    private:
00897       #ifndef GENERATING_DOXYGEN_OUTPUT
00898       virtual bool v_IsSelectable (const RVC::OBJITEM& ObjItem, int position);
00899       #endif // GENERATING_DOXYGEN_OUTPUT
00900    };
00901    
00902 //! Geometric object selection filter to disallow selection of non geometric objects
00903 class GEOMETRIC::GETOBJFILTER_ISSELECTABLE : public GETOBJFILTER {
00904    public:
00905       GETOBJFILTER_ISSELECTABLE () {}
00906    private:
00907       #ifndef GENERATING_DOXYGEN_OUTPUT
00908       virtual bool v_IsSelectable (const RVC::OBJITEM& ObjItem, int position);
00909       #endif // GENERATING_DOXYGEN_OUTPUT
00910    };
00911    
00912       
00913 //! Make parameter base class for RVC::GEOMETRIC objects.
00914 class GEOMETRIC::MAKEPARMSBASE {
00915    public:
00916    
00917       //! Default constructor
00918       MAKEPARMSBASE (
00919          POINTTYPE PointType
00920          ) :
00921          m_PointType(PointType),
00922          m_XScale(1.0),
00923          m_YScale(1.0),
00924          m_ZScale(1.0)
00925          {}
00926          
00927       //! Get vector object extents
00928       //! @return Extents of the vector object
00929       const DRECT3D& GetExtents (
00930          ) const {return (m_Extents);}
00931    
00932       //! Obtain point coordinate type for vector creation
00933       //! @return RVCGEOMETRIC::POINTTYPE coordinate type
00934       POINTTYPE GetPointType (
00935          ) const {return (m_PointType);}
00936 
00937       //! Get vector x scale value
00938       //! @return Vector X scale value
00939       double GetXScale (
00940          ) const {return (m_XScale);}
00941          
00942       //! Get vector y scale value
00943       //! @return Vector Y scale value
00944       double GetYScale (
00945          ) const {return (m_YScale);}
00946          
00947       //! Get vector z scale value
00948       //! @return Vector Z scale value
00949       double GetZScale (
00950          ) const {return (m_ZScale);}
00951 
00952       //! Set vector object extents
00953       void SetExtents (
00954          const DRECT3D& rect
00955          ) {m_Extents = rect;}
00956       
00957       //! Set coordinate point type for vector creation
00958       void SetPointType (
00959          POINTTYPE PointType
00960          ) {m_PointType = PointType;}
00961 
00962       //! Set vector x scale value
00963       void SetXScale (
00964          double xscale
00965          ) {m_XScale = xscale;}
00966          
00967       //! Set vector y scale value
00968       void SetYScale (
00969          double xscale
00970          ) {m_XScale = xscale;}
00971          
00972       //! Set vector x scale value
00973       void SetZScale (
00974          double xscale
00975          ) {m_XScale = xscale;}
00976          
00977    protected:
00978    
00979       DRECT3D m_Extents;
00980       POINTTYPE m_PointType;
00981       double m_XScale;
00982       double m_YScale;
00983       double m_ZScale;
00984    };
00985 
00986 //! OBSERVER class for RVC::GEOMETRIC objects.
00987 class GEOMETRIC::OBSERVER : public RVC::OBJECTOBSERVER {
00988    public:  
00989       enum TYPE {
00990          TYPE_ExtentsChange = 0x00000108,
00991          TYPE_PointTypeChange = 0x00000110
00992 //!         TYPE_AddElement = 0x00000201
00993          };
00994 
00995       explicit OBSERVER (
00996          RVC::GEOMETRIC& object
00997          ) : OBJECTOBSERVER(object) {}
00998          
00999       virtual ~OBSERVER (
01000          ) {}
01001          
01002 //!      virtual void OnAddElement (
01003 //!         ELEMTYPE ElemType,
01004 //!         INT32 ElemNum
01005 //!         ) { return; }
01006       
01007       //! Called when the geoemtric object extents has changed
01008       virtual void OnExtentsChanged (
01009          const DRECT3D& NewExtents
01010          ) { return; }
01011 
01012       //! Called when the geoemtric object extents has changed
01013       virtual void OnPointTypeChanged (
01014          GEOMETRIC::POINTTYPE NewPointType
01015          ) { return; }
01016 
01017    private:
01018       #ifndef GENERATING_DOXYGEN_OUTPUT
01019       virtual void OnNotifyRaw (UINT32 reason, void *data);
01020       #endif // GENERATING_DOXYGEN_OUTPUT
01021    };
01022 
01023 
01024 //! Filter search class for FindClosestElement() method
01025 class GEOMETRIC::SEARCHFILTER {
01026    public:
01027       //! Element filter for locating correct elements.
01028       //! @return True to use element in search, False to not use element in search
01029       virtual bool Filter (
01030          const RVC::GEOMETRIC& object,
01031          ELEMTYPE ElemType,
01032          INT32 ElemNum
01033          ) = 0;
01034          
01035    protected:
01036       //! Destructor 
01037       virtual ~SEARCHFILTER () {}
01038    };
01039    
01040 
01041 //! Filter search class for FindClosestElement() method supporting bit-set.
01042 class GEOMETRIC::SEARCHFILTER_BITSET : public GEOMETRIC::SEARCHFILTER {
01043    public:
01044 
01045       //! Construct from BITSET_UNOWNED.
01046       SEARCHFILTER_BITSET (
01047          const BITSET_UNOWNED& bitset
01048          ) : m_bitset(bitset) { }
01049 
01050       //! Construct from bit array and count.
01051       SEARCHFILTER_BITSET (
01052          const UINT8 *set,
01053          UINT32 NumEntries
01054          ) : m_bitset(const_cast<UINT8*>(set),NumEntries) { }
01055 
01056       //! Destructor 
01057       virtual ~SEARCHFILTER_BITSET () {}
01058 
01059    protected:
01060 
01061       //! Element filter for locating correct elements.
01062       //! @return True if element in set, false if not.
01063       virtual bool Filter (
01064          const RVC::GEOMETRIC& object,
01065          ELEMTYPE ElemType,
01066          INT32 ElemNum
01067          );
01068          
01069    private:
01070       #ifndef GENERATING_DOXYGEN_OUTPUT
01071       BITSET_UNOWNED m_bitset;
01072       #endif // GENERATING_DOXYGEN_OUTPUT
01073    };
01074    
01075 
01076 //! Filter search class for FindClosestElement() method supporting bit-set.
01077 class GEOMETRIC::SEARCHFILTER_ELEMTRANSLIST : public GEOMETRIC::SEARCHFILTER {
01078    public:
01079 
01080       //! Construct from ELEMTRANSLIST
01081       SEARCHFILTER_ELEMTRANSLIST (
01082          const GEOMETRIC::ELEMTRANSLIST& ElemTransList
01083          ) : m_ElemTransList(ElemTransList) { }
01084 
01085       //! Destructor 
01086       virtual ~SEARCHFILTER_ELEMTRANSLIST () {}
01087 
01088    protected:
01089 
01090       //! Element filter for locating correct elements.
01091       //! @return True if element in set, false if not.
01092       virtual bool Filter (
01093          const RVC::GEOMETRIC& object,
01094          ELEMTYPE ElemType,
01095          INT32 ElemNum
01096          );
01097          
01098    private:
01099       #ifndef GENERATING_DOXYGEN_OUTPUT
01100       GEOMETRIC::ELEMTRANSLIST m_ElemTransList;
01101       #endif // GENERATING_DOXYGEN_OUTPUT
01102    };
01103    
01104 
01105 class GEOMETRIC::SEARCHRESULT {
01106    public:
01107    
01108       class CONST_ITERATOR;
01109       friend class CONST_ITERATOR;
01110 
01111       class CONST_ITERATOR {
01112          public:
01113          
01114             //! Default constructor
01115             CONST_ITERATOR (
01116                ) :
01117                m_IsRange(false),
01118                m_CurElemNum(0),
01119                m_CurIndex(0),
01120                m_sr(0)
01121                {}
01122 
01123             //! Internal constructor, used by container.
01124             CONST_ITERATOR (
01125                const SEARCHRESULT* sr,
01126                bool CreateEnd = false
01127                );
01128 
01129             //! Copy constructor
01130             CONST_ITERATOR (
01131                const CONST_ITERATOR& rhs
01132                ) : 
01133                m_IsRange(rhs.m_IsRange),
01134                m_CurElemNum(rhs.m_CurElemNum),
01135                m_CurIndex(rhs.m_CurIndex),
01136                m_sr(rhs.m_sr)
01137                {}
01138 
01139             //! Dereference operator, returns current element number.
01140             const INT32& operator* (
01141                ) const { return (m_CurElemNum); }
01142 
01143             //! Pre-increment operator.
01144             CONST_ITERATOR& operator++ (
01145                );
01146 
01147             //! Post-increment operator.
01148             CONST_ITERATOR operator++(int
01149                ) {
01150                CONST_ITERATOR temp = *this;
01151                ++*this;
01152                return (temp);
01153                }
01154 
01155             bool operator== (          //! Equality operator
01156                const CONST_ITERATOR& rhs
01157                ) const { return (m_CurElemNum == rhs.m_CurElemNum); }
01158 
01159             bool operator!= (          //! Inequality operator
01160                const CONST_ITERATOR& rhs
01161                ) const { return (!(*this == rhs)); }
01162          
01163          private:
01164             #ifndef GENERATING_DOXYGEN_OUTPUT
01165             bool m_IsRange;
01166             INT32 m_CurElemNum;
01167             INT32 m_CurIndex;
01168             const SEARCHRESULT* m_sr;
01169             #endif // GENERATING_DOXYGEN_OUTPUT
01170          };
01171       
01172       SEARCHRESULT (
01173          );
01174    
01175       SEARCHRESULT (
01176          const SEARCHRESULT& rhs
01177          );
01178    
01179       ~SEARCHRESULT (
01180          );
01181          
01182       SEARCHRESULT& operator= (
01183          const SEARCHRESULT& rhs
01184          );
01185          
01186       CONST_ITERATOR Begin (
01187          ) const {return (CONST_ITERATOR(this));}
01188          
01189       void Clear (
01190          );
01191          
01192       CONST_ITERATOR End (
01193          ) const {return (CONST_ITERATOR(this, true));}
01194          
01195       ERRVALUE FindElements (
01196          ELEMTYPE ElemType,
01197          const DRECT2D& SearchExtents,
01198          RVC::QSEARCHTREE& QTreeObj
01199          );
01200    
01201       ERRVALUE FindElements (
01202          ELEMTYPE ElemType,
01203          const DRECT2D& SearchExtents,
01204          RVC::SPATIALTREE& STreeObj
01205          );
01206          
01207       ERRVALUE GetElementSet (
01208          BITSET& SelectSet
01209          ) const;
01210          
01211       ERRVALUE GetElementSet (
01212          SIMPLE_ARRAY<INT32>& SelectList
01213          ) const;
01214          
01215       INT32 GetNumItems (
01216          ) const;
01217          
01218       bool IsEmpty (
01219          ) const;
01220          
01221       //! Set the search result for the all elements set
01222       void SetAll (
01223          INT32 NumElements
01224          );
01225          
01226       //! Set the search result for array passed in
01227       void SetArray (
01228          const SIMPLE_ARRAY<INT32>& ElemSet
01229          );
01230          
01231       //! Sort the elements in the list using the elements extents from smallest to largest
01232       void SortItemsByExtentArea (
01233          const RVC::GEOMETRIC& GeoObj,
01234          ELEMTYPE ElemType
01235          );
01236    
01237    private:
01238       #ifndef GENERATING_DOXYGEN_OUTPUT
01239       SIMPLE_ARRAY<INT32> m_list;
01240       SIMPLE_ARRAY<INT32_RANGE> m_range;
01241       #endif // GENERATING_DOXYGEN_OUTPUT
01242    };
01243    
01244       
01245 }     //! End of RVC namespace
01246 
01247 #endif   //!< INC_RVC_GEOMETRC_H

Generated on Tue Dec 14 13:18:50 2004 for TNTsdk by  doxygen 1.3.8-20040913