00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024 #ifndef SEXP_DATATYPE
00025 #define SEXP_DATATYPE
00026
00027 #include <stdarg.h>
00028 #include <stdint.h>
00029 #include <sexp.h>
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00035 typedef void (*SEXP_datatypeOP_t) (SEXP_t *, const SEXP_t *, void *);
00036
00037 typedef struct SEXP_datatype SEXP_datatype_t;
00038 typedef struct SEXP_datatypeTbl SEXP_datatypeTbl_t;
00039
00040 extern SEXP_datatypeTbl_t g_datatypes;
00041
00042
00043
00044 int SEXP_datatype_register (SEXP_datatypeTbl_t *t, const char *datatype);
00045
00046
00047 int SEXP_datatype_op (uint8_t op, const SEXP_t *sexp, void *res, ...);
00048 int SEXP_datatype_op_safe (const char *datatype, uint8_t op, const SEXP_t *sexp, void *res, ...);
00049
00050 SEXP_datatype_t *SEXP_datatype_new(void);
00051 int SEXP_datatype_setflag(SEXP_datatype_t **dp, uint16_t flag, ...);
00052 int SEXP_datatype_unsetflag(SEXP_datatype_t **dp, uint16_t flag);
00053 int SEXP_datatype_addop(SEXP_datatype_t **dp, int opnum, SEXP_datatypeOP_t *op);
00054 int SEXP_datatype_delop(SEXP_datatype_t **dp, int opnum);
00055
00056 #ifdef __cplusplus
00057 }
00058 #endif
00059
00060 #endif