mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2025-12-08 20:36:04 +00:00
Comment API functions in doxygen style.
Ignore build artifacts. File for schema object support.
This commit is contained in:
parent
1a048c64a0
commit
9e3bc1e622
@ -1,11 +1,13 @@
|
||||
|
||||
OBJS = \
|
||||
pc_core.o \
|
||||
pc_mem.o
|
||||
pc_mem.o \
|
||||
pc_schema.o
|
||||
|
||||
LIB = pc_lib.a
|
||||
|
||||
all: $(LIB)
|
||||
$(MAKE) -C cunit $@
|
||||
|
||||
$(LIB): $(OBJS)
|
||||
ar rs $@ $^
|
||||
|
||||
1
core/cunit/.gitignore
vendored
Normal file
1
core/cunit/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
cu_tester
|
||||
@ -20,7 +20,7 @@
|
||||
#define PCCOMPRESSIONTYPES 2
|
||||
|
||||
/**
|
||||
* How can PCPOINTS in a PCPATCH be compressed?
|
||||
* Compression types for PCPOINTS in a PCPATCH
|
||||
*/
|
||||
enum COMPRESSIONS
|
||||
{
|
||||
@ -29,7 +29,7 @@ enum COMPRESSIONS
|
||||
};
|
||||
|
||||
/**
|
||||
* We will need to flag endianness for inter-architecture
|
||||
* Flags of endianness for inter-architecture
|
||||
* data transfers.
|
||||
*/
|
||||
enum ENDIANS
|
||||
@ -39,7 +39,7 @@ enum ENDIANS
|
||||
};
|
||||
|
||||
/**
|
||||
* We need interpretation types for our dimension descriptions
|
||||
* Interpretation types for our dimension descriptions
|
||||
*/
|
||||
enum INTERPRETATIONS
|
||||
{
|
||||
@ -111,7 +111,7 @@ typedef struct
|
||||
PCDIMENSION *dims;
|
||||
} PCSCHEMA;
|
||||
|
||||
/* Global functions for memory/logging handlers. */
|
||||
/* Global function signatures for memory/logging handlers. */
|
||||
typedef void* (*pc_allocator)(size_t size);
|
||||
typedef void* (*pc_reallocator)(void *mem, size_t size);
|
||||
typedef void (*pc_deallocator)(void *mem);
|
||||
@ -121,31 +121,42 @@ typedef void (*pc_message_handler)(const char *string, va_list ap);
|
||||
* FUNCTION PROTOTYPES
|
||||
*/
|
||||
|
||||
/* Memory management and logging */
|
||||
/** Allocate memory using the appropriate means (system/db) */
|
||||
void* pcalloc(size_t size);
|
||||
/** Reallocate memory using the appropriate means (system/db) */
|
||||
void* pcrealloc(void* mem, size_t size);
|
||||
/** Free memory using the appropriate means (system/db) */
|
||||
void pcfree(void* mem);
|
||||
/** Emit an error message using the appropriate means (system/db) */
|
||||
void pcerror(const char *fmt, ...);
|
||||
/** Emit an info message using the appropriate means (system/db) */
|
||||
void pcinfo(const char *fmt, ...);
|
||||
/** Emit a warning message using the appropriate means (system/db) */
|
||||
void pcwarn(const char *fmt, ...);
|
||||
|
||||
/* Set allocators and messaging */
|
||||
/** Set custom memory allocators and messaging (used by PgSQL module) */
|
||||
void pc_set_handlers(pc_allocator allocator, pc_reallocator reallocator,
|
||||
pc_deallocator deallocator, pc_message_handler error_handler,
|
||||
pc_message_handler info_handler, pc_message_handler warning_handler);
|
||||
|
||||
/* Use system allocators and messaging */
|
||||
/** Set program to use system memory allocators and messaging */
|
||||
void pc_install_default_handlers(void);
|
||||
|
||||
|
||||
/* Utility */
|
||||
/** Release the memory in a schema structure */
|
||||
void pc_schema_free(PCSCHEMA *pcf);
|
||||
/** Build a schema structure from the XML serialisation */
|
||||
PCSCHEMA* pc_schema_construct(const char *xmlstr);
|
||||
|
||||
/* Accessors */
|
||||
/** Read the value of a dimension, as an int8 */
|
||||
int8 pc_point_get_int8 (const PCPOINT *pt, uint32 dim);
|
||||
/** Read the value of a dimension, as an unsigned int8 */
|
||||
uint8 pc_point_get_uint8 (const PCPOINT *pt, uint32 dim);
|
||||
/** Read the value of a dimension, as an int16 */
|
||||
int16 pc_point_get_int16 (const PCPOINT *pt, uint32 dim);
|
||||
/** Read the value of a dimension, as an unsigned int16 */
|
||||
uint16 pc_point_get_uint16 (const PCPOINT *pt, uint32 dim);
|
||||
/** Read the value of a dimension, as an int32 */
|
||||
int32 pc_point_get_int32 (const PCPOINT *pt, uint32 dim);
|
||||
/** Read the value of a dimension, as an unsigned int32 */
|
||||
uint32 pc_point_get_uint32 (const PCPOINT *pt, uint32 dim);
|
||||
|
||||
|
||||
@ -1,3 +1,14 @@
|
||||
/***********************************************************************
|
||||
* pc_mem.c
|
||||
*
|
||||
* Memory and message management routines.
|
||||
* Allow this library to be used both inside and outside a
|
||||
* PgSQL backend.
|
||||
*
|
||||
* Portions Copyright (c) 2012, OpenGeo
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "pc_c.h"
|
||||
|
||||
14
core/pc_schema.c
Normal file
14
core/pc_schema.c
Normal file
@ -0,0 +1,14 @@
|
||||
/***********************************************************************
|
||||
* pc_schema.c
|
||||
*
|
||||
* Pointclound schema handling. Parse and emit the XML format for
|
||||
* representing packed multidimensional point data.
|
||||
*
|
||||
* Portions Copyright (c) 2012, OpenGeo
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "pc_c.h"
|
||||
#include "pc_api.h"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user