| 1 |
#ifndef CARYLL_cff_DICT_H |
| 2 |
#define CARYLL_cff_DICT_H |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
#include <stdio.h> |
| 6 |
#include <stdlib.h> |
| 7 |
#include <string.h> |
| 8 |
#include "support/util.h" |
| 9 |
#include "cff-value.h" |
| 10 |
|
| 11 |
typedef struct { |
| 12 |
uint32_t op; |
| 13 |
uint32_t cnt; |
| 14 |
cff_Value *vals; |
| 15 |
} cff_DictEntry; |
| 16 |
|
| 17 |
typedef struct { |
| 18 |
uint32_t count; |
| 19 |
cff_DictEntry *ents; |
| 20 |
} cff_Dict; |
| 21 |
|
| 22 |
extern caryll_ElementInterfaceOf(cff_Dict) { |
| 23 |
caryll_RT(cff_Dict); |
| 24 |
cff_Dict *(*parse)(const uint8_t *data, const uint32_t len); |
| 25 |
void (*parseToCallback)(const uint8_t *data, const uint32_t len, void *context, |
| 26 |
void (*callback)(uint32_t op, uint8_t top, cff_Value * stack, void *context)); |
| 27 |
cff_Value (*parseDictKey)(const uint8_t *data, const uint32_t len, const uint32_t op, const uint32_t idx); |
| 28 |
caryll_Buffer *(*build)(const cff_Dict *dict); |
| 29 |
} |
| 30 |
cff_iDict; |
| 31 |
|
| 32 |
#endif |