From 04622f7d2210cbb8036502afadf5bcdcb0394d28 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 21 Feb 2008 13:27:51 +0000 Subject: first steps in implementing object interfaces (stage work for later dynamic class loading) --- expr.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'expr.h') diff --git a/expr.h b/expr.h index 66516d7d..78005a5a 100644 --- a/expr.h +++ b/expr.h @@ -39,11 +39,19 @@ typedef struct expr_s { } expr_t; +/* interfaces */ +typedef struct expr_if_s { + ifBEGIN; /* This MUST always be the first interface member */ + INTERFACEObjDebugPrint(expr); + rsRetVal (*Construct)(expr_t **ppThis); + rsRetVal (*ConstructFinalize)(expr_t __attribute__((unused)) *pThis); + rsRetVal (*Destruct)(expr_t **ppThis); + rsRetVal (*Parse)(expr_t *pThis, ctok_t *ctok); +} expr_if_t; +#define exprCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ + /* prototypes */ -rsRetVal exprConstruct(expr_t **ppThis); -rsRetVal exprConstructFinalize(expr_t __attribute__((unused)) *pThis); -rsRetVal exprDestruct(expr_t **ppThis); -rsRetVal exprParse(expr_t *pThis, ctok_t *ctok); PROTOTYPEObjClassInit(expr); +PROTOTYPEObjQueryInterface(expr); #endif /* #ifndef INCLUDED_EXPR_H */ -- cgit v1.2.3