21 #define NODE_PREALLOC_CHILDREN 5 24 #define MESSAGE_PREALLOC_CHILDREN 10 27 #define MAX_FIELDS 1000 int id
Definition: node.h:192
void free_node_t(node_t *node)
cleanup all memory of a node
Definition: node.c:269
const char * node_type_to_string(node_type_t type)
string representation of node_type_t
Definition: node.c:40
primary storage type of a delimited element
Definition: node.h:188
size_t length
Definition: node.h:56
struct raw_field_t raw_field_t
structure to track delmiter fields in a fieldset
int num_children
Definition: node.h:256
int message_append(message_t **parent, node_t *node)
append a segment to the message
Definition: node.c:383
void disply_raw_node(raw_field_t *raw_e)
dump raw_e structure to stdout
Definition: node.c:23
int node_parent_child_pos(node_t *node)
find the position in parent's children struct
Definition: node.c:69
hl7_meta_t * meta
Definition: node.h:261
struct node_t ** segments
Definition: node.h:253
unsigned char * data
Definition: node.h:205
void free_raw_field(raw_field_t *raw_e)
free raw fiel structure
Definition: node.c:14
private message structures
hl7_addr_t * addr_from_node(node_t *node)
generate an addr from any node in a message
Definition: node.c:468
logging functioins and macros
unsigned char * field
Definition: node.h:48
struct node_t ** children
Definition: node.h:197
message_state_t * state
Definition: node.h:264
int _num_children_allocated
Definition: node.h:258
raw_field_t * create_raw_field_t(void)
create raw fied structure
Definition: node.c:3
hl7 element address
Definition: address.h:49
int num_children
Definition: node.h:200
hl7 address structures and utilities
int pos
Definition: node.h:209
int id
Definition: node.h:248
struct node_t node_t
primary storage type of a delimited element
struct node_t * parent
Definition: node.h:195
node_type_t
Node types.
Definition: node.h:62
node_t * process_node(raw_field_t *raw_e, hl7_meta_t *meta, int start_pos)
Definition: node.c:82
int _num_children_allocated
Definition: node.h:202
unsigned int pos[MAX_FIELDS]
Definition: node.h:52
holds callbacks and associated variables
Definition: message_state.h:84
unsigned char delim[MAX_FIELDS]
Definition: node.h:50
message_t * create_message_t(hl7_meta_t *meta)
initialize an empty messagte_t struct
Definition: node.c:335
node_t * node_in_segment(node_t *segment, hl7_addr_t *addr)
check if a node with given addres exists
Definition: node.c:403
unsigned int delim_l
Definition: node.h:54
node_type_t type
Definition: node.h:190
node_type_t type
Definition: node.h:246
structure to track delmiter fields in a fieldset
Definition: node.h:46
size_t length
Definition: node.h:207
void free_message_t(message_t *message)
free message_t an all it's child objects
Definition: node.c:357
struct node_t * parent
Definition: node.h:251
int node_append(node_t **parent, node_t *node)
append a child node
Definition: node.c:298
node_t * create_node_t(node_type_t type, unsigned char *data, size_t length, int pos)
create a new node
Definition: node.c:242
#define MAX_FIELDS
maximum number of temporary elements to allocate in the parser buffer
Definition: node.h:27