Show
Ignore:
Timestamp:
11/27/07 16:30:08 (14 months ago)
Author:
gyuque
Message:

lang/ruby/RubyESRIShape: extracted point-list implementation

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/RubyESRIShape/Shape_int.h

    r2043 r2054  
    2424typedef std::vector<ShpRecordObject*> RecordContentList; 
    2525 
    26 #define SHPPOLYGON_Z 0x1 
    27 #define SHPPOLYGON_M 0x2 
     26class IndexedPointList 
     27{ 
     28public: 
     29        IndexedPointList(); 
     30        virtual ~IndexedPointList(); 
     31        void copyFrom(const IndexedPointList& aSrc); 
     32 
     33        void allocBuffers(); 
     34        void freeBuffers(); 
     35 
     36        ESDouble mBounds[4]; 
     37        ESInt32 mNParts; 
     38        ESInt32 mNPoints; 
     39 
     40        ESInt32* mPartIndexes; 
     41        ESPointEx* mPoints; 
     42 
     43        ESDouble mZRange[2]; 
     44        ESDouble mMRange[2]; 
     45}; 
     46 
     47 
     48#define SHPRECORD_WITH_Z 0x1 
     49#define SHPRECORD_WITH_M 0x2 
    2850 
    2951class ShpPolygon : public ShpRecordObject 
     
    4365        es_error_t readFromMainFile(FILE* fp, ShpReadContext& rctx); 
    4466private: 
    45         void allocBuffers(); 
    46         void freeBuffers(); 
     67        ESInt32 mType; 
     68        IndexedPointList mPList; 
     69        int mOption; 
     70}; 
    4771 
     72class ShpPolyline : public ShpRecordObject 
     73{ 
     74public: 
     75        ShpPolyline(int option); 
     76        virtual ~ShpPolyline(); 
     77        virtual VALUE toRubyObject(); 
     78        virtual ShpRecordObject* clone(); 
     79private: 
    4880        ESInt32 mType; 
    49         ESDouble mBounds[4]; 
    50         ESInt32 mNParts; 
    51         ESInt32 mNPoints; 
    52  
    53         ESInt32* mPartIndexes; 
    54         ESPointEx* mPoints; 
    55  
    56         ESDouble mZRange[2]; 
    57         ESDouble mMRange[2]; 
    58  
     81        IndexedPointList mPList; 
    5982        int mOption; 
    6083};