OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Classes | Macros | Typedefs | Enumerations | Functions | Variables
vpftable.h File Reference
#include <stdio.h>
#include <ossim/vpfutil/machine.h>
#include <ossim/ossimConfig.h>
#include <ossim/vpfutil/vpfio.h>
#include <ossim/vpfutil/values.h>
#include <math.h>

Go to the source code of this file.

Classes

union  null_field
 
struct  header_cell
 
struct  column_type
 
struct  index_cell
 
struct  vpf_table_type
 
struct  coordinate_type
 
struct  double_coordinate_type
 
struct  tri_coordinate_type
 
struct  double_tri_coordinate_type
 
union  key_field
 
struct  id_triplet_type
 

Macros

#define TRUE   1
 
#define FALSE   0
 
#define LEAST_SIGNIFICANT   0
 
#define MOST_SIGNIFICANT   1
 
#define MACHINE_BYTE_ORDER   (vpfutilMachineByteOrder())
 
#define RAM   0
 
#define DISK   1
 
#define EITHER   2
 
#define COMPUTE   3
 
#define CLOSED   0
 
#define OPENED   1
 
#define TYPE0(cell)   ((cell>>6)&(3))
 
#define TYPE1(cell)   ((cell>>4)&(3))
 
#define TYPE2(cell)   ((cell>>2)&(3))
 
#define TYPE3(cell)   ((cell)&(3))
 
#define SETTYPE0(cell, value)   cell = (((cell)&(~(3<<6)))|(((3)&(value))<<6))
 
#define SETTYPE1(cell, value)   cell = (((cell)&(~(3<<4)))|(((3)&(value))<<4))
 
#define SETTYPE2(cell, value)   cell = (((cell)&(~(3<<2)))|(((3)&(value))<<2))
 
#define SETTYPE3(cell, value)   cell = (((cell)&(~(3)))|(((3)&(value))))
 
#define ASSIGN_KEY(tYPE, kEY, loc, val)
 
#define VARIABLE_STRING_NULL_LENGTH   10
 
#define NULLCHAR   ' '
 
#define NULLTEXT   " "
 
#define NULLSHORT   -MAXSHORT
 
#define NULLINT   -MAXLONG
 
#define NULLDATE   " "
 
#define NULLFLOAT   ((float) quiet_nan (0))
 
#define NULLDOUBLE   ((double) quiet_nan (0))
 

Typedefs

typedef char date_type[21]
 
typedef struct header_cellheader_type
 
typedef column_typerow_type
 
typedef struct index_cellindex_type
 

Enumerations

enum  storage_type { ram, disk, either, compute }
 
enum  file_mode { Read, Write }
 
enum  ddef_state_type {
  idle_state, name_state, type_state, tuple_state,
  count_state
}
 

Functions

int vpfutilMachineByteOrder ()
 
int is_vpf_null_float (float num)
 
int is_vpf_null_double (double num)
 
char * get_string (ossim_int32 *ind, char *src, char delimit)
 
char get_char (ossim_int32 *ind, char *src)
 
ossim_int32 get_number (ossim_int32 *ind, char *src, char delemit)
 
ossim_int32 parse_data_def (vpf_table_type *table)
 
char * read_text_defstr (FILE *infile, FILE *outerr)
 
ossim_int32 index_length (ossim_int32 row_number, vpf_table_type table)
 
ossim_int32 index_pos (ossim_int32 row_number, vpf_table_type table)
 
row_type read_next_row (vpf_table_type table)
 
row_type read_row (ossim_int32 row_number, vpf_table_type table)
 
vpf_table_type vpf_open_table (const char *tablename, storage_type storage, const char *mode, char *defstr)
 
row_type get_row (ossim_int32 row_number, vpf_table_type table)
 
void free_row (row_type row, vpf_table_type table)
 
ossim_int32 table_pos (const char *field_name, vpf_table_type table)
 
void * get_table_element (ossim_int32 field_number, row_type row, vpf_table_type table, void *value, ossim_int32 *count)
 
void * named_table_element (char *field_name, ossim_int32 row_number, vpf_table_type table, void *value, ossim_int32 *count)
 
void * table_element (ossim_int32 field_number, ossim_int32 row_number, vpf_table_type table, void *value, ossim_int32 *count)
 
void vpf_close_table (vpf_table_type *table)
 
void vpf_dump_table (char *tablename, char *outname)
 
ossim_int32 is_vpf_table (const char *fname)
 
ossim_int32 write_next_row (row_type row, vpf_table_type *table)
 
row_type create_row (vpf_table_type table)
 
void nullify_table_element (ossim_int32 field, row_type row, vpf_table_type table)
 
ossim_int32 put_table_element (ossim_int32 field, row_type row, vpf_table_type table, void *value, ossim_int32 count)
 
void vpf_dump_doc_table (char *tablename, char *outname)
 
void swap_two (char *, char *)
 
void swap_four (char *, char *)
 
void swap_eight (char *, char *)
 

Variables

FILE * errorfp
 

Macro Definition Documentation

◆ ASSIGN_KEY

#define ASSIGN_KEY (   tYPE,
  kEY,
  loc,
  val 
)
Value:
{ \
if (val < 1) \
{ \
tYPE(kEY.type,0); \
} else if (val < (1<<8)) \
{ \
tYPE(kEY.type,1); \
kEY.loc = val ; \
} else if ( val < (1<<16)) \
{ \
tYPE(kEY.type,2); \
kEY.loc = val; \
} else \
{ \
tYPE(kEY.type,3); \
kEY.loc = val; \
} \
}

Definition at line 157 of file vpftable.h.

◆ CLOSED

#define CLOSED   0

◆ COMPUTE

#define COMPUTE   3

Definition at line 78 of file vpftable.h.

◆ DISK

#define DISK   1

Definition at line 76 of file vpftable.h.

Referenced by ossimVpfDatabaseHeader::open().

◆ EITHER

#define EITHER   2

Definition at line 77 of file vpftable.h.

◆ FALSE

#define FALSE   0

Definition at line 30 of file vpftable.h.

◆ LEAST_SIGNIFICANT

#define LEAST_SIGNIFICANT   0

Definition at line 34 of file vpftable.h.

◆ MACHINE_BYTE_ORDER

#define MACHINE_BYTE_ORDER   (vpfutilMachineByteOrder())

Definition at line 39 of file vpftable.h.

◆ MOST_SIGNIFICANT

#define MOST_SIGNIFICANT   1

Definition at line 35 of file vpftable.h.

◆ NULLCHAR

#define NULLCHAR   ' '

Definition at line 194 of file vpftable.h.

◆ NULLDATE

#define NULLDATE   " "

Definition at line 198 of file vpftable.h.

◆ NULLDOUBLE

#define NULLDOUBLE   ((double) quiet_nan (0))

Definition at line 201 of file vpftable.h.

◆ NULLFLOAT

#define NULLFLOAT   ((float) quiet_nan (0))

Definition at line 200 of file vpftable.h.

◆ NULLINT

#define NULLINT   -MAXLONG

Definition at line 197 of file vpftable.h.

◆ NULLSHORT

#define NULLSHORT   -MAXSHORT

Definition at line 196 of file vpftable.h.

◆ NULLTEXT

#define NULLTEXT   " "

Definition at line 195 of file vpftable.h.

◆ OPENED

#define OPENED   1

Definition at line 83 of file vpftable.h.

Referenced by ossimVpfTable::getColumnValues().

◆ RAM

#define RAM   0

Definition at line 75 of file vpftable.h.

◆ SETTYPE0

#define SETTYPE0 (   cell,
  value 
)    cell = (((cell)&(~(3<<6)))|(((3)&(value))<<6))

Definition at line 150 of file vpftable.h.

◆ SETTYPE1

#define SETTYPE1 (   cell,
  value 
)    cell = (((cell)&(~(3<<4)))|(((3)&(value))<<4))

Definition at line 151 of file vpftable.h.

◆ SETTYPE2

#define SETTYPE2 (   cell,
  value 
)    cell = (((cell)&(~(3<<2)))|(((3)&(value))<<2))

Definition at line 152 of file vpftable.h.

◆ SETTYPE3

#define SETTYPE3 (   cell,
  value 
)    cell = (((cell)&(~(3)))|(((3)&(value))))

Definition at line 153 of file vpftable.h.

◆ TRUE

#define TRUE   1

Definition at line 27 of file vpftable.h.

◆ TYPE0

#define TYPE0 (   cell)    ((cell>>6)&(3))

Definition at line 143 of file vpftable.h.

◆ TYPE1

#define TYPE1 (   cell)    ((cell>>4)&(3))

Definition at line 144 of file vpftable.h.

◆ TYPE2

#define TYPE2 (   cell)    ((cell>>2)&(3))

Definition at line 145 of file vpftable.h.

◆ TYPE3

#define TYPE3 (   cell)    ((cell)&(3))

Definition at line 146 of file vpftable.h.

◆ VARIABLE_STRING_NULL_LENGTH

#define VARIABLE_STRING_NULL_LENGTH   10

Definition at line 193 of file vpftable.h.

Typedef Documentation

◆ date_type

typedef char date_type[21]

Definition at line 47 of file vpftable.h.

◆ header_type

typedef struct header_cell * header_type

◆ index_type

typedef struct index_cell * index_type

◆ row_type

Definition at line 93 of file vpftable.h.

Enumeration Type Documentation

◆ ddef_state_type

Enumerator
idle_state 
name_state 
type_state 
tuple_state 
count_state 

Definition at line 219 of file vpftable.h.

◆ file_mode

enum file_mode
Enumerator
Read 
Write 

Definition at line 80 of file vpftable.h.

80 { Read, Write } file_mode ;
file_mode
Definition: vpftable.h:80
Definition: vpftable.h:80
Definition: vpftable.h:80

◆ storage_type

Enumerator
ram 
disk 
either 
compute 

Definition at line 74 of file vpftable.h.

Definition: vpftable.h:74
storage_type
Definition: vpftable.h:74
Definition: vpftable.h:74

Function Documentation

◆ create_row()

row_type create_row ( vpf_table_type  table)

◆ free_row()

void free_row ( row_type  row,
vpf_table_type  table 
)

◆ get_char()

char get_char ( ossim_int32 ind,
char *  src 
)

◆ get_number()

ossim_int32 get_number ( ossim_int32 ind,
char *  src,
char  delemit 
)

◆ get_row()

row_type get_row ( ossim_int32  row_number,
vpf_table_type  table 
)

◆ get_string()

char* get_string ( ossim_int32 ind,
char *  src,
char  delimit 
)

◆ get_table_element()

void* get_table_element ( ossim_int32  field_number,
row_type  row,
vpf_table_type  table,
void *  value,
ossim_int32 count 
)

◆ index_length()

ossim_int32 index_length ( ossim_int32  row_number,
vpf_table_type  table 
)

◆ index_pos()

ossim_int32 index_pos ( ossim_int32  row_number,
vpf_table_type  table 
)

◆ is_vpf_null_double()

int is_vpf_null_double ( double  num)

◆ is_vpf_null_float()

int is_vpf_null_float ( float  num)

◆ is_vpf_table()

ossim_int32 is_vpf_table ( const char *  fname)

◆ named_table_element()

void* named_table_element ( char *  field_name,
ossim_int32  row_number,
vpf_table_type  table,
void *  value,
ossim_int32 count 
)

◆ nullify_table_element()

void nullify_table_element ( ossim_int32  field,
row_type  row,
vpf_table_type  table 
)

◆ parse_data_def()

ossim_int32 parse_data_def ( vpf_table_type table)

◆ put_table_element()

ossim_int32 put_table_element ( ossim_int32  field,
row_type  row,
vpf_table_type  table,
void *  value,
ossim_int32  count 
)

◆ read_next_row()

row_type read_next_row ( vpf_table_type  table)

◆ read_row()

row_type read_row ( ossim_int32  row_number,
vpf_table_type  table 
)

◆ read_text_defstr()

char* read_text_defstr ( FILE *  infile,
FILE *  outerr 
)

◆ swap_eight()

void swap_eight ( char *  ,
char *   
)

◆ swap_four()

void swap_four ( char *  ,
char *   
)

◆ swap_two()

void swap_two ( char *  ,
char *   
)

◆ table_element()

void* table_element ( ossim_int32  field_number,
ossim_int32  row_number,
vpf_table_type  table,
void *  value,
ossim_int32 count 
)

◆ table_pos()

ossim_int32 table_pos ( const char *  field_name,
vpf_table_type  table 
)

◆ vpf_close_table()

void vpf_close_table ( vpf_table_type table)

◆ vpf_dump_doc_table()

void vpf_dump_doc_table ( char *  tablename,
char *  outname 
)

◆ vpf_dump_table()

void vpf_dump_table ( char *  tablename,
char *  outname 
)

◆ vpf_open_table()

vpf_table_type vpf_open_table ( const char *  tablename,
storage_type  storage,
const char *  mode,
char *  defstr 
)

◆ vpfutilMachineByteOrder()

int vpfutilMachineByteOrder ( )

◆ write_next_row()

ossim_int32 write_next_row ( row_type  row,
vpf_table_type table 
)

Variable Documentation

◆ errorfp

FILE* errorfp