-
Notifications
You must be signed in to change notification settings - Fork 3
/
class_private.h
91 lines (80 loc) · 2.84 KB
/
class_private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef class_private_header
#define class_private_header
#include <stdint.h>
#include "class.h"
#include "pb_class_types.h"
struct data_table{
uint32_t data_length;
unsigned metadata_count;
const uint8_t *data;
const struct pbtable_info *metadata;
};
struct type_defs{
struct data_table table;
unsigned count;
const struct pbtype_def *types;
const char **names;
};
struct variable_def_private{
struct variable_definition pub;
const struct pbtype_def *type;
unsigned dimension_count;
const struct pbarray_dimension *dimensions;
};
struct arg_def_private{
struct argument_definition pub;
unsigned dimension_count;
const struct pbarray_dimension *dimensions;
};
struct script_implementation{
uint16_t number;
uint16_t code_size;
const uint8_t *code;
uint16_t debugline_count;
const struct pbdebug_line_num *debug_lines;
struct type_defs local_variables;
struct data_table resources;
};
struct script_def_private{
struct script_definition pub;
struct script_implementation *body;
const struct pbscript_short_header *short_header;
const struct pbscript_header *header;
const struct pbarg_def *arguments;
const struct pbtable_info *argument_info;
const uint16_t *throw_types;
};
struct class_def_private{
struct class_definition pub;
const struct pbtype_header *type_header;
const struct pbclass_header *header;
struct type_defs imports;
struct type_defs instance_variables;
const struct pbvalue *instance_values;
const struct pbindirect_ref *indirect_refs;
};
struct class_group_private{
struct class_group pub;
struct pool *pool;
struct pbfile_header header;
uint16_t ext_ref_count;
const struct pbext_reference *external_refs;
struct data_table main_table;
const char **ref_names;
struct type_defs global_types;
uint16_t class_count;
struct data_table function_name_table;
struct data_table arguments_table;
struct type_defs type_list; // main type list
struct type_defs enum_values;
const struct pbtype_header *type_headers;
};
const void *get_table_ptr(struct class_group_private *class_group, struct data_table *table, uint32_t offset);
const struct pbtable_info *get_table_info(struct class_group_private *class_group, struct data_table *table, uint32_t offset);
const char *get_table_string(struct class_group_private *class_group, struct data_table *table, uint32_t offset);
struct class_def_private *get_class_by_type(struct class_group_private *class_group, uint16_t type);
const char *get_type_name(struct class_group_private *class_group, uint16_t type);
const char *get_table_resource(struct class_group_private *class_group, struct data_table *table, uint32_t offset);
const char *get_value(struct class_group_private *class_group, struct data_table *table, const struct pbvalue *value);
const char *quote_escape_string(struct class_group_private *class_group, const char *str);
#endif