MobilityDB 1.3
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
meos.c File Reference

Functions for managing the MEOS extension and its global variables and constants. More...

#include <string.h>
#include <postgres.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <proj.h>
#include <meos.h>

Data Structures

struct  _stringlist
 

Macros

#define DATEORDER_DMY   1
 
#define DATEORDER_MDY   2
 
#define DATEORDER_YMD   0
 
#define DATESTYLE_STR_MAXLEN   32
 
#define INTERVALSTYLE_STR_MAXLEN   32
 
#define INTSTYLE_ISO_8601   3
 
#define INTSTYLE_POSTGRES   0
 
#define INTSTYLE_POSTGRES_VERBOSE   1
 
#define INTSTYLE_SQL_STANDARD   2
 
#define USE_GERMAN_DATES   3
 
#define USE_ISO_DATES   1
 
#define USE_POSTGRES_DATES   0
 
#define USE_SQL_DATES   2
 
#define USE_XSD_DATES   4
 

Typedefs

typedef struct _stringlist _stringlist
 

Functions

static void add_stringlist_item (_stringlist **listhead, const char *str)
 
static bool check_datestyle (const char **newval, void **extra)
 Check a datestyle string. More...
 
static bool check_intervalstyle (const char *newval, int *extra)
 Check an IntervalStyle string. More...
 
const char * dateorder_string (int dateorder)
 Return the string representation of the dateorder. More...
 
const char * datestyle_string (int datestyle)
 Return the string representation of the dateorder. More...
 
static void free_stringlist (_stringlist **listhead)
 
static void gsl_finalize (void)
 Finalize the Gnu Scientific Library. More...
 
gsl_rng * gsl_get_aggregation_rng (void)
 Get the random generator used by temporal aggregation. More...
 
gsl_rng * gsl_get_generation_rng (void)
 Get the random generator used by the data generator. More...
 
static void gsl_initialize (void)
 Initialize the Gnu Scientific Library. More...
 
const char * intervalstyle_string (int intervalstyle)
 Return the string representation of the intervalstyle. More...
 
void meos_finalize (void)
 
char * meos_get_datestyle (void)
 Get the DateStyle. More...
 
char * meos_get_intervalstyle (void)
 Get the IntervalStyle. More...
 
void meos_initialize (void)
 
bool meos_set_datestyle (const char *newval, void *extra)
 Set the DateStyle. More...
 
bool meos_set_intervalstyle (const char *newval, int extra)
 Set the IntervalStyle. More...
 
static void proj_finalize (void)
 Finalize the PROJ library. More...
 
PJ_CONTEXT * proj_get_context (void)
 Get the random generator used by temporal aggregation. More...
 
static void proj_initialize (void)
 Initialize the PROJ library. More...
 
static void split_to_stringlist (const char *s, const char *delim, _stringlist **listhead)
 

Variables

static const char * _DATEORDER_STRINGS []
 Global constant array containing the dateorder strings. More...
 
static const char * _DATESTYLE_STRINGS []
 Global constant array containing the datestyle strings. More...
 
static const char * _INTERVALSTYLE_STRINGS []
 Global constant array containing the intervalstyle string. More...
 
int DateOrder = DATEORDER_MDY
 
int DateStyle = USE_ISO_DATES
 
int IntervalStyle = INTSTYLE_POSTGRES
 
static gsl_rng * MEOS_AGGREGATION_RNG = NULL
 
static gsl_rng * MEOS_GENERATION_RNG = NULL
 
static bool MEOS_GSL_INITIALIZED = false
 
PJ_CONTEXT * MEOS_PJ_CONTEXT = NULL
 

Detailed Description

Functions for managing the MEOS extension and its global variables and constants.