| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

Classes | Defines | Typedefs | Functions
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/PostgreSQL/TePGInterface.cpp File Reference
`#include "TePGInterface.h"`
`#include "TePGUtils.h"`
`#include <stdexcept>`
`#include <string>`
`#include <climits>`
`#include "../../kernel/TeUtils.h"`

## Classes

struct | BIN_PG_POINT
struct | te_pg_tm

## Defines

#define | INV_WRITE 0x00020000
#define | INV_READ 0x00040000
#define | BUFFSIZE 1024
#define | UNIX_EPOCH_JDATE 2440588
#define | POSTGRES_EPOCH_JDATE 2451545
#define | MAXDATELEN 51
#define | MAXDATEFIELDS 25
#define | INT64CONST(x) ((te_int64) x##LL)
#define | DT_NOBEGIN (-INT64CONST(0x7fffffffffffffff) - 1)
#define | DT_NOEND (INT64CONST(0x7fffffffffffffff))
#define | TIMESTAMP_NOBEGIN(j) do {j = DT_NOBEGIN;} while (0)
#define | TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN)
#define | TIMESTAMP_NOEND(j) do {j = DT_NOEND;} while (0)
#define | TIMESTAMP_IS_NOEND(j) ((j) == DT_NOEND)
#define | TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))
#define | TMODULO_INT64(t, q, u)

## Typedefs

typedef int | TeDateADT
typedef long long int | te_int64
typedef te_int64 | te_pg_time_t
typedef int | te_fsec_t

## Functions

unsigned int | TePGSwapUInt (const unsigned int &uintVal)
unsigned char | parse_hex (char *str)
void | j2date (int jd, int *year, int *month, int *day)
bool | EncodeDateOnly (struct te_pg_tm *tm, char *str)
int | time2tm (te_int64 time, struct te_pg_tm *tm, te_fsec_t *fsec)
bool | EncodeTimeOnly (struct te_pg_tm *tm, te_fsec_t fsec, int *tzp, char *str)
void | TrimTrailingZeros (char *str)
bool | EncodeDateTime (struct te_pg_tm *tm, te_fsec_t fsec, int *tzp, char **, char *str)
bool | EncodeSpecialTimestamp (te_int64 dt, char *str)
void | dt2time (te_int64 jd, int *hour, int *min, int *sec, te_fsec_t *fsec)
bool | timestamp2tm (te_int64 dt, int *tzp, struct te_pg_tm *tm, te_fsec_t *fsec, char **tzn)
char * | TeLine2DToPGBinary (const TeLine2D &line, unsigned int &size)
char * | TeBoxToPGBinary (const TeBox &box, unsigned int &size)
double | TeConvertToBigEndian (const double &value)
void | TeConvert2OGCWKBType (unsigned int &gType, bool &isPostGIS)
void | TeConvert2PostGISWKBType (unsigned int &gType)
char * | TePointToWKBPoint (const TePoint &point, unsigned int &size)
char * | TeLine2DToWKBLineString (const TeLine2D &line, unsigned int &size)
char * | TePolygonToWKBPolygon (const TePolygon &polygon, unsigned int &size)

## Define Documentation

#define BUFFSIZE 1024

#define DT_NOBEGIN (-INT64CONST(0x7fffffffffffffff) - 1)

#define DT_NOEND (INT64CONST(0x7fffffffffffffff))

#define INT64CONST | ( |  | x | ) | ((te_int64) x##LL)

#define INV_READ 0x00040000

#define INV_WRITE 0x00020000

#define MAXDATEFIELDS 25

#define MAXDATELEN 51

#define POSTGRES_EPOCH_JDATE 2451545

#define TIMESTAMP_IS_NOBEGIN | ( |  | j | ) | ((j) == DT_NOBEGIN)

#define TIMESTAMP_IS_NOEND | ( |  | j | ) | ((j) == DT_NOEND)

#define TIMESTAMP_NOBEGIN | ( |  | j | ) | do {j = DT_NOBEGIN;} while (0)

#define TIMESTAMP_NOEND | ( |  | j | ) | do {j = DT_NOEND;} while (0)

#define TIMESTAMP_NOT_FINITE | ( |  | j | ) | (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))

#define TMODULO_INT64 | ( |  | t,
|  |  | q,
|  |  | u
| ) |  |

Value:

    do { \
               q = (t / u); \
               if (q != 0) t -= (q * u); \
    } while(0)

#define UNIX_EPOCH_JDATE 2440588

## Typedef Documentation

typedef int te_fsec_t

typedef long long int te_int64

typedef te_int64 te_pg_time_t

typedef int TeDateADT

## Function Documentation

void dt2time | ( | te_int64 | jd,
|  | int * | hour,
|  | int * | min,
|  | int * | sec,
|  | te_fsec_t * | fsec
| ) |  | `[inline]`

bool EncodeDateOnly | ( | struct te_pg_tm * | tm,
|  | char * | str
| ) |  | `[inline]`

bool EncodeDateTime | ( | struct te_pg_tm * | tm,
|  | te_fsec_t | fsec,
|  | int * | tzp,
|  | char ** | ,
|  | char * | str
| ) |  | `[inline]`

bool EncodeSpecialTimestamp | ( | te_int64 | dt,
|  | char * | str
| ) |  | `[inline]`

bool EncodeTimeOnly | ( | struct te_pg_tm * | tm,
|  | te_fsec_t | fsec,
|  | int * | tzp,
|  | char * | str
| ) |  | `[inline]`

void j2date | ( | int | jd,
|  | int * | year,
|  | int * | month,
|  | int * | day
| ) |  | `[inline]`

unsigned char parse_hex | ( | char * | str | ) | `[inline]`

char* TeBoxToPGBinary | ( | const TeBox & | box,
|  | unsigned int & | size
| ) |  |

void TeConvert2OGCWKBType | ( | unsigned int & | gType,
|  | bool & | isPostGIS
| ) |  |

void TeConvert2PostGISWKBType | ( | unsigned int & | gType | ) |

double TeConvertToBigEndian | ( | const double & | value | ) |

char* TeLine2DToPGBinary | ( | const TeLine2D & | line,
|  | unsigned int & | size
| ) |  |

char* TeLine2DToWKBLineString | ( | const TeLine2D & | line,
|  | unsigned int & | size
| ) |  |

unsigned int TePGSwapUInt | ( | const unsigned int & | uintVal | ) |

char* TePointToWKBPoint | ( | const TePoint & | point,
|  | unsigned int & | size
| ) |  |

char* TePolygonToWKBPolygon | ( | const TePolygon & | polygon,
|  | unsigned int & | size
| ) |  |

int time2tm | ( | te_int64 | time,
|  | struct te_pg_tm * | tm,
|  | te_fsec_t * | fsec
| ) |  | `[inline]`

bool timestamp2tm | ( | te_int64 | dt,
|  | int * | tzp,
|  | struct te_pg_tm * | tm,
|  | te_fsec_t * | fsec,
|  | char ** | tzn
| ) |  |

void TrimTrailingZeros | ( | char * | str | ) | `[inline]`

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines