~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to frmts/hfa/hfa_p.h

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: hfa_p.h 19689 2010-05-13 12:07:48Z warmerdam $
 
2
 * $Id: hfa_p.h 23495 2011-12-08 00:16:33Z rouault $
3
3
 *
4
4
 * Project:  Erdas Imagine (.img) Translator
5
5
 * Purpose:  Private class declarations for the HFA classes used to read
35
35
#include "cpl_port.h"
36
36
#include "cpl_error.h"
37
37
#include "cpl_vsi.h"
 
38
#include <vector>
38
39
 
39
40
#ifdef CPL_LSB
40
41
#  define HFAStandard(n,p)      {}
63
64
/*      dataset within hfaopen.cpp                                      */
64
65
/************************************************************************/
65
66
typedef struct hfainfo {
66
 
    FILE        *fp;
 
67
    VSILFILE    *fp;
67
68
 
68
69
    char        *pszPath;
69
70
    char        *pszFilename; /* sans path */
154
155
                
155
156
    HFAInfo_t   *psInfo;
156
157
 
157
 
    FILE        *fpExternal;
 
158
    VSILFILE    *fpExternal;
158
159
                         
159
160
    int         nDataType;
160
161
    HFAEntry    *poNode;
187
188
                        double ** );
188
189
    CPLErr      SetPCT( int, double *, double *, double *, double * );
189
190
 
190
 
    int         CreateOverview( int nOverviewLevel );
 
191
    int         CreateOverview( int nOverviewLevel, const char *pszResampling );
191
192
    CPLErr      CleanOverviews();
192
193
 
193
194
    CPLErr      LoadOverviews();
227
228
 
228
229
    void        LoadData();
229
230
 
230
 
    int         GetFieldValue( const char *, char, void * );
 
231
    int         GetFieldValue( const char *, char, void *,
 
232
                               int *pnRemainingDataSize );
231
233
    CPLErr      SetFieldValue( const char *, char, void * );
232
234
 
233
235
    int         bIsMIFObject;
234
236
 
 
237
                HFAEntry( HFAEntry *poContainer,
 
238
                          const char *pszMIFObjectPath,
 
239
                          const char * pszDictionnary, 
 
240
                          const char * pszTypeName,
 
241
                          int nDataSizeIn,
 
242
                          GByte* pabyDataIn );
 
243
 
235
244
public:
236
245
                HFAEntry( HFAInfo_t * psHFA, GUInt32 nPos,
237
246
                          HFAEntry * poParent, HFAEntry *poPrev);
241
250
                          const char *pszTypeName,
242
251
                          HFAEntry *poParent );
243
252
 
244
 
                HFAEntry( HFAEntry *poContainer, const char *pszMIFObjectPath );
245
253
                          
246
254
    virtual     ~HFAEntry();                
 
255
    
 
256
    static HFAEntry*  BuildEntryFromMIFObject( HFAEntry *poContainer, const char *pszMIFObjectPath );
247
257
 
248
258
    CPLErr      RemoveAndDestroy();
249
259
 
262
272
    HFAEntry    *GetChild();
263
273
    HFAEntry    *GetNext();
264
274
    HFAEntry    *GetNamedChild( const char * );
 
275
    std::vector<HFAEntry*> FindChildren( const char *pszName, 
 
276
                                         const char *pszType,
 
277
                                         int nRecLevel = 0);
265
278
 
266
279
    GInt32      GetIntField( const char *, CPLErr * = NULL );
267
280
    double      GetDoubleField( const char *, CPLErr * = NULL );
268
 
    const char  *GetStringField( const char *, CPLErr * = NULL );
 
281
    const char  *GetStringField( const char *, CPLErr * = NULL, int *pnRemainingDataSize = NULL );
269
282
    GIntBig     GetBigIntField( const char *, CPLErr * = NULL );
270
283
    int         GetFieldCount( const char *, CPLErr * = NULL );
271
284
 
304
317
 
305
318
    char        *pszFieldName;
306
319
 
307
 
    char        szNumberString[28]; /* buffer used to return an int as a string */
 
320
    char        szNumberString[36]; /* buffer used to return an int as a string */
308
321
 
309
322
                HFAField();
310
323
                ~HFAField();
317
330
 
318
331
    int         ExtractInstValue( const char * pszField, int nIndexValue,
319
332
                     GByte *pabyData, GUInt32 nDataOffset, int nDataSize,
320
 
                     char chReqType, void *pReqReturn );
 
333
                     char chReqType, void *pReqReturn, int *pnRemainingDataSize = NULL );
321
334
 
322
335
    CPLErr      SetInstValue( const char * pszField, int nIndexValue,
323
336
                     GByte *pabyData, GUInt32 nDataOffset, int nDataSize,
340
353
 
341
354
class HFAType
342
355
{
 
356
    int     bInCompleteDefn;
 
357
 
343
358
  public:
344
359
    int         nBytes;
345
360
    
362
377
                          GByte *pabyData, GUInt32 nDataOffset, int nDataSize);
363
378
    int         ExtractInstValue( const char * pszField,
364
379
                                  GByte *pabyData, GUInt32 nDataOffset, int nDataSize,
365
 
                               char chReqType, void *pReqReturn );
 
380
                               char chReqType, void *pReqReturn, int *pnRemainingDataSize );
366
381
    CPLErr      SetInstValue( const char * pszField,
367
382
                           GByte *pabyData, GUInt32 nDataOffset, int nDataSize,
368
383
                           char chReqType, void * pValue );