GL Studio C++ Runtime API
vpf_util.h
Go to the documentation of this file.
1 /*! \file
2  \brief Util functions for VPF
3 
4  \par Copyright Information
5 
6  Copyright (c) 2017 The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef _VPF_UTIL_H
41 #define _VPF_UTIL_H
42 
43 #include <float.h>
44 #include <stdlib.h>
45 #include <string.h>
46 
47 #if !defined( _WIN32 )
48 # include <math.h>
49 #endif
50 
51 #if defined( DISTI_VPF_DEBUG )
52 # include <stdio.h>
53 #endif // DISTI_VPF_DEBUG
54 
55 // turn on DistiVPFAssert when DISTI_VPF_DEBUG is defined
56 #if defined( DISTI_VPF_DEBUG )
57 # include <assert.h>
58 # if defined( _WIN32 )
59 # if defined( GLS_DEBUG )
60 // use assert macro in DISTI_VPF_DEBUG / _WIN32 / _DEBUG builds
61 # define DistiVPFAssert( _expr ) assert( ( _expr ) )
62 # else
63 // use breakpt interrupt in DISTI_VPF_DEBUG / _WIN32 / non _DEBUG builds
64 # define DistiVPFAssert( _expr ) \
65  if( !( _expr ) ) \
66  { \
67  __asm int 3 \
68  }
69 # endif // _DEBUG
70 # else
71 // use assert macro in DISTI_VPF_DEBUG / non _WIN32 builds
72 # define DistiVPFAssert( _expr ) assert( ( _expr ) )
73 # endif // _WIN32
74 #else
75 // disable DistiVPFAssert when DISTI_VPF_DEBUG is not defined
76 # define DistiVPFAssert( _expr )
77 #endif // DISTI_VPF_DEBUG
78 
79 namespace disti
80 {
81 /** collection of VPF related utility functions, types, and constants */
82 class VPFUtil
83 {
84 public:
85  static const char* const DHT_NAME; /**< name of database header table */
86  static const char* const LAT_NAME; /**< name of library attribute table */
87  static const char* const BROWSE_LIB_NAME; /**< name of browse library */
88  static const char* const LHT_NAME; /**< name of library header table */
89  static const char* const GRT_NAME; /**< name of geographic reference table */
90  static const char* const CAT_NAME; /**< name of coverage attribute table */
91  static const char* const FCS_NAME; /**< name of feature class schema table */
92  static const char* const FCA_NAME; /**< name of feature class attribute table */
93  static const char* const NRAT_NAME; /**< name of notes related attribute table */
94  static const char* const CVDT_NAME; /**< name of character value descriptor table */
95  static const char* const IVDT_NAME; /**< name of integer value descriptor table */
96  static const char* const CND_NAME; /**< name of connected node primitive table */
97  static const char* const END_NAME; /**< name of entity node primitive table */
98  static const char* const EDG_NAME; /**< name of edge primitive table */
99  static const char* const FAC_NAME; /**< name of face primitive table */
100  static const char* const TXT_NAME; /**< name of text primitive table */
101  static const char* const RNG_NAME; /**< name of ring table */
102  static const char* const EBR_NAME; /**< name of edge bounding rectangle table */
103  static const char* const FBR_NAME; /**< name of face bounding rectangle table */
104  static const char* const TILEREF_COV_NAME; /**< name of the tileref coverage */
105  static const char* const LIBREF_COV_NAME; /**< name of the libref coverage */
106  static const char* const LIB_COV_NAME; /**< name of the library coverage */
107  static const char* const TILEREF_AFT_NAME; /**< name of the tileref area feature table */
108  static const char* const LIBREF_LFT_NAME; /**< name of the libref line feature table */
109  static const char* const POINT_FEATURE_EXT; /**< file extension for a point feature table */
110  static const char* const LINE_FEATURE_EXT; /**< file extension for a line feature table */
111  static const char* const AREA_FEATURE_EXT; /**< file extension for an area feature table */
112  static const char* const TEXT_FEATURE_EXT; /**< file extension for a text feature table */
113  static const char* const LINE_FEATURE_JOIN_EXT; /**< file extension for a line join table */
114  static const char* const AREA_FEATURE_JOIN_EXT; /**< file extension for an area join table */
115  static const char* const COMPLEX_FEATURE_EXT; /**< file extension for a complex feature table */
116  static const char* const ID_COLUMN_NAME; /**< name of ID column in any VPF table (always first column) */
117  static const char* const TILE_ID_COLUMN_NAME; /**< name of tile ID column in a VPF table */
118  static const char* const END_ID_COLUMN_NAME; /**< name of entity node ID column in a VPF table */
119  static const char* const RIGHT_FACE_COLUMN_NAME; /**< name of right face column in a VPF table */
120  static const char* const LEFT_FACE_COLUMN_NAME; /**< name of left face column in a VPF table */
121  static const char* const RIGHT_EDGE_COLUMN_NAME; /**< name of right edge column in a VPF table */
122  static const char* const LEFT_EDGE_COLUMN_NAME; /**< name of left edge column in a VPF table */
123  static const char* const EDGE_ID_COLUMN_NAME; /**< name of edge ID column in a VPF table */
124  static const char* const TEXT_ID_COLUMN_NAME; /**< name of text ID column in a VPF table */
125  static const char* const FACC_CODE_COLUMN_NAME; /**< name of facc code column in a VPF table */
126 
127  enum
128  {
129  FACC_CODE_LENGTH = 5u
130  }; /**< length of a FACC code in a VPF table _not_ including a terminator */
131 
132  typedef float Float32; /**< 32-bit floating point */
133  typedef double Float64; /**< 64-bit floating point */
134  typedef unsigned short UInt16; /**< 16-bit VPF unsigned integer */
135  typedef unsigned int UInt32; /**< 32-bit VPF unsigned integer */
136 
137  /** enum of byte ordering modes */
139  {
140  ENDIAN_MODE_LITTLE,
141  ENDIAN_MODE_BIG
142  };
143 
144  /** possible VPF data types */
145  enum DataType
146  {
147  DATA_TYPE_TEXT, /**< text */
148  DATA_TYPE_TEXT_LATIN, /**< text Level 1, Latin 1 - ISO 8859 */
149  DATA_TYPE_TEXT_FULL_LATIN, /**< text Level 2, Full Latin - ISO 6937 */
150  DATA_TYPE_TEXT_MULTILINGUAL, /**< text Level 3, Multilingual ISO 10646 */
151  DATA_TYPE_SHORT_FLOAT, /**< IEEE 784 single precision float 32-bits */
152  DATA_TYPE_LONG_FLOAT, /**< IEEE 784 double precision float 64-bits */
153  DATA_TYPE_SHORT_INTEGER, /**< 16-bit integer */
154  DATA_TYPE_LONG_INTEGER, /**< 32-bit integer */
155  DATA_TYPE_2D_COORD_SHORT, /**< 2D coordinate of short float */
156  DATA_TYPE_2D_COORD_LONG, /**< 2D coordinate of long float */
157  DATA_TYPE_3D_COORD_SHORT, /**< 3D coordinate of short float */
158  DATA_TYPE_3D_COORD_LONG, /**< 3D coordinate of long float */
159  DATA_TYPE_DATE_TIME, /**< Date and Time */
160  DATA_TYPE_NULL, /**< NULL field */
161  DATA_TYPE_TRIPLET /**< Triplet ID */
162  };
163 
164  /** possible VPF table column key types */
165  enum KeyType
166  {
167  KEY_TYPE_PRIMARY, /**< primary key */
168  KEY_TYPE_UNIQUE, /**< unique key */
169  KEY_TYPE_NON_UNIQUE, /**< non unique key */
170  };
171 
172  /** possible VPF feature types */
174  {
175  FEATURE_TYPE_POINT,
176  FEATURE_TYPE_LINE,
177  FEATURE_TYPE_AREA,
178  FEATURE_TYPE_TEXT,
179  FEATURE_TYPE_COMPLEX
180  };
181 
182  /** security classifications */
184  {
185  SECURITY_CLASS_TOP_SECRET,
186  SECURITY_CLASS_SECRET,
187  SECURITY_CLASS_CONFIDENTIAL,
188  SECURITY_CLASS_RESTRICTED,
189  SECURITY_CLASS_UNCLASSIFIED
190  };
191 
192  /** 2D float coord */
194  {
195  Float32 x, y;
196  };
197 
198  /** 2D double coord */
199  struct Coord2DLong
200  {
201  Float64 x, y;
202  };
203 
204  /** 3D float coord */
206  {
207  Float32 x, y, z;
208  };
209 
210  /** 3D double coord */
211  struct Coord3DLong
212  {
213  Float64 x, y, z;
214  };
215 
216  /** VPF triplet contains information for crossing tile boundaries */
217  struct Triplet
218  {
219  bool rowIDValid;
220  UInt32 rowID;
221  bool tileIDValid;
222  UInt32 tileID;
223  bool externalIDValid;
224  UInt32 externalID;
225  bool reservedValid;
226  UInt32 reserved;
227  };
228 
229  /** VPF date and time string */
230  struct DateTime
231  {
232  enum
233  {
234  DATE_TIME_LENGTH = 20u
235  }; /**< length of a date time field */
236 
237  char dateStr[ DATE_TIME_LENGTH + 1u ]; /**< date and time plus one for terminator */
238  };
239 
240 #if defined( DISTI_VPF_DEBUG )
241  /** debug class for trapping when a bool is set to false with operator= */
242  class WarningBool
243  {
244  public:
245  /** Ctor
246  * \param initialVal initial boolean value (does not warn here if false)
247  */
248  WarningBool( const bool initialVal )
249  : _val( initialVal )
250  {}
251 
252  /** Assign a boolean value - warn if false
253  * \param val new value
254  * \return ref to this
255  */
256  WarningBool& operator=( const bool val );
257 
258  /** Get the contained boolean value
259  * \return contained boolean value
260  */
261  operator bool( void ) const { return ( _val ); }
262 
263  protected:
264  bool _val; /**< actual boolean value */
265  };
266 #else
267  typedef bool WarningBool;
268 #endif // DISTI_VPF_DEBUG
269 
270  /** encapsulates a growable array of pointers */
271  template<class T>
273  {
274  public:
275  /** default initial size of array */
276  enum
277  {
278  DEFAULT_INITIAL_SIZE = 16u
279  };
280 
281  /** Ctor
282  * \param initialSize [optional, defaults to DEFAULT_INITIAL_SIZE] initial size of array (>0)
283  */
284  PointerArray( const unsigned int initialSize = DEFAULT_INITIAL_SIZE )
285  : _isValid( false )
286  , _arraySize( initialSize )
287  , _arrayCount( 0u )
288  , _pointers( NULL )
289  {
290  _isValid = ( _arraySize > 0u );
291  _pointers = (T**)( _isValid ? malloc( sizeof( T* ) * _arraySize ) : NULL );
292  _isValid = ( NULL != _pointers );
293 
294  // clear pointer array
295  if( _isValid )
296  {
297  memset( _pointers, 0, sizeof( T* ) * _arraySize );
298  }
299  }
300 
301  /** Dtor */
303  {
304  if( NULL != _pointers )
305  {
306  // destroy objects
307  for( unsigned int index = 0u; index < _arrayCount; ++index )
308  {
309  delete( _pointers[ index ] );
310  _pointers[ index ] = NULL;
311  }
312 
313  // destroy pointer array
314  free( _pointers );
315  _pointers = NULL;
316  }
317  }
318 
319  /** Insert a pointer into the array at the end of the array
320  * \param p pointer to add (non NULL)
321  * \return true on success else false
322  */
323  bool InsertPointer( T* const p )
324  {
325  bool success = ( _isValid && ( NULL != p ) );
326 
327  if( success )
328  {
329  // need to grow array ?
330  if( _arrayCount == _arraySize )
331  {
332  // grow array (double size)
333  const unsigned int newArraySize = ( 2u * _arraySize );
334  T** newArray = (T**)realloc( _pointers, sizeof( T* ) * newArraySize );
335  _isValid = success = ( NULL != newArray );
336 
337  if( success )
338  {
339  // clear added pointers
340  memset( &( newArray[ _arraySize ] ), 0, sizeof( T* ) * _arraySize );
341  // store new array and size
342  _pointers = newArray;
343  _arraySize = newArraySize;
344  }
345  }
346 
347  // insert if (any) grow array operation succeeded
348  if( success )
349  {
350  // insert new pointer
351  _pointers[ _arrayCount++ ] = p;
352  }
353  }
354 
355  return ( success );
356  }
357 
358  /** Move a pointer from one index in the array to another index in the array.
359  * array elements are shifted down accordingly.
360  * \param curIndex current index of pointer
361  * \param newIndex new desired index of pointer
362  * \return true if success else false
363  */
364  bool MovePointer( const unsigned int curIndex, const unsigned int newIndex )
365  {
366  bool success = ( _isValid && ( curIndex < _arrayCount ) && ( newIndex < _arrayCount ) );
367 
368  if( success )
369  {
370  // hold temp copy of pointer to move
371  T* const temp = _pointers[ curIndex ];
372 
373  // remove pointer (move up pointers after this pointer)
374  {
375  for( unsigned int index = ( curIndex + 1u ); index < _arrayCount; ++index )
376  {
377  _pointers[ index - 1u ] = _pointers[ index ];
378  }
379  }
380 
381  {
382  // move back pointers after the new pointer index
383  for( unsigned int index = ( _arrayCount - 1u ); index > newIndex; --index )
384  {
385  _pointers[ index ] = _pointers[ index - 1u ];
386  }
387  }
388 
389  // store pointer into new location
390  _pointers[ newIndex ] = temp;
391  }
392 
393  return ( success );
394  }
395 
396  /** Get number of pointers in the array
397  * \return number of pointers in the array
398  */
399  unsigned int GetCount( void ) const { return ( _arrayCount ); }
400 
401  /** Get a pointer in the array
402  * \param index zero based index into array
403  * \return pointer at index else NULL
404  */
405  T* GetPointer( const unsigned int index )
406  {
407  return ( ( ( NULL != _pointers ) && ( index < _arrayCount ) ) ? _pointers[ index ] : NULL );
408  }
409 
410  /** Get a const pointer in the array
411  * \param index zero based index into array
412  * \return pointer at index else NULL
413  */
414  const T* GetPointer( const unsigned int index ) const
415  {
416  return ( ( ( NULL != _pointers ) && ( index < _arrayCount ) ) ? _pointers[ index ] : NULL );
417  }
418 
419  /** Determine if the array is in a valid state
420  * \return true if valid else false
421  */
422  bool IsValid( void ) const { return ( _isValid ); }
423 
424  protected:
425  WarningBool _isValid; /**< true if array is valid else false */
426  unsigned int _arraySize; /**< length of _pointers pointer array */
427  unsigned int _arrayCount; /**< number of elements in _pointers pointer array */
428  T** _pointers; /**< array of T pointers */
429 
430  private:
431  // Disable implicit generated members
432  PointerArray& operator=( const PointerArray& rhs );
433  PointerArray( const PointerArray& src );
434  };
435 
436  /** encapsulates full path / full filename to a directory / file */
437  class FilePath
438  {
439  public:
440  /** directory separator char */
441  static const char DIR_SEPARATOR;
442 
443  /** Ctor */
444  FilePath( void );
445 
446  /** copy Ctor */
447  FilePath( const FilePath& src );
448 
449  /** Construct from a path
450  * \param path path
451  * \param isDirectory true if path is a directory path else false
452  */
453  FilePath( const char* const path, const bool isDirectory );
454 
455  /** Append a filename or directory name. Check IsValid()
456  * \param name name of file or directory (should not end in DIR_SEPARATOR)
457  * \param isDirectory true if appending a directory name else false
458  * \param forceUpperCase [optional, defaults to true] true to force appended string to all uppercase
459  * \param killTrailingWS [optional, defaults to true] true to kill any traling whitespace in appended string
460  * \return updated path string
461  */
462  const char* Append( const char* const name, const bool isDirectory, const bool forceUpperCase = true,
463  const bool killTrailingWS = true );
464 
465  /** Determine if the path is valid
466  * \return true if valid else false
467  */
468  bool IsValid( void ) const { return ( _isValid ); }
469 
470  /** Get the file path string
471  * \return the file path string
472  */
473  const char* GetFilePath( void ) const { return ( _pathStr ); }
474 
475  protected:
476  /** longest possible path */
477  enum
478  {
479  MAX_PATH_LENGTH = 512
480  };
481 
482  WarningBool _isValid; /**< true if path is valid else false */
483  char _pathStr[ MAX_PATH_LENGTH + 1u ]; /**< full path plus terminator */
484 
485  private:
486  // Disable implicit generated members
487  FilePath& operator=( const FilePath& rhs );
488  };
489 
490  /** Construct an UInt16 from tow bytes of data read from a VPF file, correcting for
491  * source and target endian mode as needed.
492  * \param intData tow bytes of data
493  * \param srcMode endian mode of intData
494  * \return UInt16 integer value
495  */
496  static UInt32 DecodeUInt16( const unsigned char* const intData, const EndianMode srcMode );
497 
498  /** Construct an UInt32 from four bytes of data read from a VPF file, correcting for
499  * source and target endian mode as needed.
500  * \param intData four bytes of data
501  * \param srcMode endian mode of intData
502  * \return UInt32 integer value
503  */
504  static UInt32 DecodeUInt32( const unsigned char* const intData, const EndianMode srcMode );
505 
506  /** Construct a Float32 from four bytes of data read from a VPF file, correcting for
507  * source and target endian mode as needed.
508  * \param floatData four bytes of data
509  * \param srcMode endian mode of floatData
510  * \return Float32 value
511  */
512  static Float32 DecodeFloat32( const unsigned char* const floatData, const EndianMode srcMode );
513 
514  /** Construct a Float64 from eight bytes of data read from a VPF file, correcting for
515  * source and target endian mode as needed.
516  * \param floatData eight bytes of data
517  * \param srcMode endian mode of floatData
518  * \return Float64 value
519  */
520  static Float64 DecodeFloat64( const unsigned char* const floatData, const EndianMode srcMode );
521 
522  /** Determine if the given Float32 is a NULL value
523  * \param f Float32 in question
524  * \return true if NULL else false
525  */
526  static bool IsFloat32NULL( const Float32 f )
527  {
528 #ifdef _WIN32
529  return ( 0 != _isnan( f ) );
530 #else
531  return ( 0 != isnan( f ) );
532 #endif
533  }
534 
535  /** Determine if the given Float64 is a NULL value
536  * \param f Float64 in question
537  * \return true if NULL else false
538  */
539  static bool IsFloat64NULL( const Float64 f )
540  {
541 #ifdef _WIN32
542  return ( 0 != _isnan( f ) );
543 #else
544  return ( 0 != isnan( f ) );
545 #endif
546  }
547 
548  /** Determine if the given UInt16 is NULL value
549  * \param i UInt16 in question
550  * \return true if NULL else false
551  */
552  static bool IsUInt16NULL( const UInt16 i ) { return ( UINT16_NULL_VALUE == i ); }
553 
554  /** Determine if the given UInt32 is NULL value
555  * \param i UInt32 in question
556  * \return true if NULL else false
557  */
558  static bool IsUInt32NULL( const UInt32 i ) { return ( UINT32_NULL_VALUE == i ); }
559 
560  /** Determine if the given text value is a NULL value
561  * \param txt text in question
562  * \return true if NULL text value else NULL
563  */
564  static bool IsTextNULL( const char* const txt )
565  {
566  return ( ( NULL != txt ) && VPFUtil::StricmpWS( "N/A", txt ) );
567  }
568 
569  /** Kill any trailing white space in the given string
570  * \param src string in question
571  */
572  static void KillTrailingWS( char* const src );
573 
574  /** Perform a lower case comparison of the two strings, stopping at the first whitespace character
575  * \param s1 first string to compare
576  * \param s2 second string to compare
577  * \return true if strings match else false
578  */
579  static bool StricmpWS( const char* const s1, const char* const s2 );
580 
581  /** Determine if a file exists
582  * \param fname name of file
583  * \return true if file exists else false
584  */
585  static bool FileExists( const char* const fname );
586 
587  /** Decode a feature type character indicator from a VPF table into a feature type
588  * \param featTypeChar feature type character indicator
589  * \param &featType [out] gets feature type on success
590  * \return true on success else false
591  */
592  static bool DecodeFeatureType( const char featTypeChar, FeatureType& featType );
593 
594  /** Decode a security class character indicator from a VPF table into a security class
595  * \param securityClassChar security class character indicator
596  * \param &securityClass [out] gets security class on success
597  * \return true on success else false
598  */
599  static bool DecodeSecurityClass( const char securityClassChar, SecurityClass& securityClass );
600 
601 protected:
602  /** a NULL UInt16 value */
603  enum
604  {
605  UINT16_NULL_VALUE = 0x8000u
606  };
607  /** a NULL UInt32 value */
608  enum
609  {
610  UINT32_NULL_VALUE = 0x80000000U
611  };
612 
613  static const EndianMode _targetEndianMode; /**< endian mode of target architecture */
614 
615  /** Swap (reverse) the given two byte buffer if its endian mode does not match the
616  * mode of the endian mode of the target architecture
617  * \param src source data to swap (must be at least 2 bytes long)
618  * \param dst [out] receives potentially swapped data (must be at least 2 bytes long)
619  * \param srcMode endian mode of source data
620  */
621  static void SwapTwo( const unsigned char* const src, unsigned char* const dst, const EndianMode srcMode );
622 
623  /** Swap (reverse) the given four byte buffer if its endian mode does not match the
624  * mode of the endian mode of the target architecture
625  * \param src source data to swap (must be at least 4 bytes long)
626  * \param dst [out] receives potentially swapped data (must be at least 4 bytes long)
627  * \param srcMode endian mode of source data
628  */
629  static void SwapFour( const unsigned char* const src, unsigned char* const dst, const EndianMode srcMode );
630 
631  /** Swap (reverse) the given eight byte buffer if its endian mode does not match the
632  * mode of the endian mode of the target architecture
633  * \param src source data to swap (must be at least 8 bytes long)
634  * \param dst [out] receives potentially swapped data (must be at least 8 bytes long)
635  * \param srcMode endian mode of source data
636  */
637  static void SwapEight( const unsigned char* const src, unsigned char* const dst, const EndianMode srcMode );
638 };
639 
640 } // end namespace disti
641 
642 #endif // _VPF_UTIL_H
static bool DecodeSecurityClass(const char securityClassChar, SecurityClass &securityClass)
static const char *const FACC_CODE_COLUMN_NAME
Definition: vpf_util.h:125
unsigned int GetCount(void) const
Definition: vpf_util.h:399
Definition: vpf_util.h:217
Definition: vpf_util.h:151
static const char *const CAT_NAME
Definition: vpf_util.h:90
Definition: vpf_util.h:147
unsigned int UInt32
Definition: vpf_util.h:135
static void KillTrailingWS(char *const src)
static const char *const AREA_FEATURE_EXT
Definition: vpf_util.h:111
static Float32 DecodeFloat32(const unsigned char *const floatData, const EndianMode srcMode)
static const char *const LIBREF_LFT_NAME
Definition: vpf_util.h:108
static const char *const FBR_NAME
Definition: vpf_util.h:103
Definition: vpf_util.h:230
char dateStr[DATE_TIME_LENGTH+1u]
Definition: vpf_util.h:237
static const char *const FCA_NAME
Definition: vpf_util.h:92
static const char *const NRAT_NAME
Definition: vpf_util.h:93
static bool IsFloat64NULL(const Float64 f)
Definition: vpf_util.h:539
Definition: vpf_util.h:159
FeatureType
Definition: vpf_util.h:173
unsigned short UInt16
Definition: vpf_util.h:134
static bool FileExists(const char *const fname)
static const char *const EBR_NAME
Definition: vpf_util.h:102
static bool IsUInt16NULL(const UInt16 i)
Definition: vpf_util.h:552
Definition: vpf_util.h:161
static const char *const EDGE_ID_COLUMN_NAME
Definition: vpf_util.h:123
T * GetPointer(const unsigned int index)
Definition: vpf_util.h:405
static const char *const DHT_NAME
Definition: vpf_util.h:85
bool IsValid(void) const
Definition: vpf_util.h:468
static bool DecodeFeatureType(const char featTypeChar, FeatureType &featType)
static const char *const TILEREF_AFT_NAME
Definition: vpf_util.h:107
unsigned int _arrayCount
Definition: vpf_util.h:427
static const char *const ID_COLUMN_NAME
Definition: vpf_util.h:116
static const char DIR_SEPARATOR
Definition: vpf_util.h:441
Definition: vpf_util.h:437
static const char *const RNG_NAME
Definition: vpf_util.h:101
Definition: vpf_util.h:154
static const char *const FCS_NAME
Definition: vpf_util.h:91
Definition: vpf_util.h:199
static const char *const COMPLEX_FEATURE_EXT
Definition: vpf_util.h:115
static const EndianMode _targetEndianMode
Definition: vpf_util.h:613
bool MovePointer(const unsigned int curIndex, const unsigned int newIndex)
Definition: vpf_util.h:364
static const char *const EDG_NAME
Definition: vpf_util.h:98
WarningBool _isValid
Definition: vpf_util.h:425
static const char *const AREA_FEATURE_JOIN_EXT
Definition: vpf_util.h:114
static Float64 DecodeFloat64(const unsigned char *const floatData, const EndianMode srcMode)
static const char *const END_ID_COLUMN_NAME
Definition: vpf_util.h:118
static const char *const FAC_NAME
Definition: vpf_util.h:99
const T * GetPointer(const unsigned int index) const
Definition: vpf_util.h:414
T ** _pointers
Definition: vpf_util.h:428
Definition: vpf_util.h:169
KeyType
Definition: vpf_util.h:165
static const char *const LAT_NAME
Definition: vpf_util.h:86
double Float64
Definition: vpf_util.h:133
DataType
Definition: vpf_util.h:145
Definition: vpf_util.h:152
static void SwapFour(const unsigned char *const src, unsigned char *const dst, const EndianMode srcMode)
Definition: vpf_util.h:158
Definition: vpf_util.h:153
static const char *const POINT_FEATURE_EXT
Definition: vpf_util.h:109
static const char *const IVDT_NAME
Definition: vpf_util.h:95
const char * GetFilePath(void) const
Definition: vpf_util.h:473
Definition: vpf_util.h:148
static const char *const TEXT_ID_COLUMN_NAME
Definition: vpf_util.h:124
static const char *const BROWSE_LIB_NAME
Definition: vpf_util.h:87
bool IsValid(void) const
Definition: vpf_util.h:422
static bool IsTextNULL(const char *const txt)
Definition: vpf_util.h:564
~PointerArray()
Definition: vpf_util.h:302
static const char *const LIBREF_COV_NAME
Definition: vpf_util.h:105
static const char *const TILE_ID_COLUMN_NAME
Definition: vpf_util.h:117
static const char *const RIGHT_FACE_COLUMN_NAME
Definition: vpf_util.h:119
static void SwapEight(const unsigned char *const src, unsigned char *const dst, const EndianMode srcMode)
Definition: vpf_util.h:193
static void SwapTwo(const unsigned char *const src, unsigned char *const dst, const EndianMode srcMode)
static UInt32 DecodeUInt16(const unsigned char *const intData, const EndianMode srcMode)
Definition: vpf_util.h:160
float Float32
Definition: vpf_util.h:132
char _pathStr[MAX_PATH_LENGTH+1u]
Definition: vpf_util.h:483
static const char *const LINE_FEATURE_EXT
Definition: vpf_util.h:110
static const char *const GRT_NAME
Definition: vpf_util.h:89
SecurityClass
Definition: vpf_util.h:183
Definition: vpf_util.h:167
static bool StricmpWS(const char *const s1, const char *const s2)
unsigned int _arraySize
Definition: vpf_util.h:426
static const char *const END_NAME
Definition: vpf_util.h:97
Definition: vpf_util.h:272
static const char *const TXT_NAME
Definition: vpf_util.h:100
Definition: vpf_util.h:211
static const char *const TEXT_FEATURE_EXT
Definition: vpf_util.h:112
Definition: vpf_util.h:168
static bool IsFloat32NULL(const Float32 f)
Definition: vpf_util.h:526
Definition: vpf_util.h:82
WarningBool _isValid
Definition: vpf_util.h:482
static bool IsUInt32NULL(const UInt32 i)
Definition: vpf_util.h:558
Definition: vpf_util.h:205
static const char *const LINE_FEATURE_JOIN_EXT
Definition: vpf_util.h:113
static const char *const LHT_NAME
Definition: vpf_util.h:88
static const char *const CND_NAME
Definition: vpf_util.h:96
static const char *const LEFT_EDGE_COLUMN_NAME
Definition: vpf_util.h:122
EndianMode
Definition: vpf_util.h:138
static const char *const CVDT_NAME
Definition: vpf_util.h:94
static const char *const LEFT_FACE_COLUMN_NAME
Definition: vpf_util.h:120
static const char *const TILEREF_COV_NAME
Definition: vpf_util.h:104
const char * Append(const char *const name, const bool isDirectory, const bool forceUpperCase=true, const bool killTrailingWS=true)
PointerArray(const unsigned int initialSize=DEFAULT_INITIAL_SIZE)
Definition: vpf_util.h:284
Definition: bmpimage.h:46
static const char *const RIGHT_EDGE_COLUMN_NAME
Definition: vpf_util.h:121
static const char *const LIB_COV_NAME
Definition: vpf_util.h:106
static UInt32 DecodeUInt32(const unsigned char *const intData, const EndianMode srcMode)
bool InsertPointer(T *const p)
Definition: vpf_util.h:323
Definition: vpf_util.h:156