hl7parse
node_util.h
Go to the documentation of this file.
1 
9 #ifndef NODE_UTIL_H
10 #define NODE_UTIL_H
11 
16 #include "util.h"
17 #include "address.h"
18 #include "node.h"
19 #include "buffer.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
34 
57 
78 int node_remove(node_t *node);
79 
95 
106 
119 node_t *node_pad_children(node_t *parent, int count);
120 
137 
156 unsigned char *node_to_string(node_t *node, hl7_meta_t *meta, int *length);
157 
175 int message_to_file(message_t *message, char *filename);
176 
191 unsigned char *message_to_string(message_t *message);
192 
207 int node_set_data(node_t *node, unsigned char *data, int length);
208 
220 int node_set_string(node_t *node, char *data);
221 
241 int node_get_by_addr(message_t* message, hl7_addr_t *addr, node_t **node);
242 
271 int node_set_by_addr(message_t *message, hl7_addr_t *addr, unsigned char *value, int length);
272 
273 #ifdef __cplusplus
274 }
275 #endif
276 
277 #endif // NODE_UTIL_H
int node_set_string(node_t *node, char *data)
set string data to node
Definition: node_util.c:335
primary storage type of a delimited element
Definition: node.h:188
Main datastructures for HL7 nodes and messages This file contains the main parser data structures and...
int node_append_child(node_t *parent, node_t *node)
append child
Definition: node_util.c:8
int node_get_by_addr(message_t *message, hl7_addr_t *addr, node_t **node)
find a node by address
Definition: node_util.c:340
unsigned char * node_to_string(node_t *node, hl7_meta_t *meta, int *length)
convert node structure into string
Definition: node_util.c:215
node_t * node_insert_child_at(node_t *parent, node_t *child, int pos)
unimplemented: set a child at the sold position
Definition: node_util.c:12
unsigned char * data
Definition: node.h:205
int node_set_by_addr(message_t *message, hl7_addr_t *addr, unsigned char *value, int length)
set a value by address
Definition: node_util.c:438
int message_to_file(message_t *message, char *filename)
write contents of message to file
Definition: node_util.c:249
HL7 Seperator configuration.
Definition: meta.h:33
int node_set_data(node_t *node, unsigned char *data, int length)
update date of a node
Definition: node_util.c:317
int node_remove(node_t *node)
unimplemented: remove a node
Definition: node_util.c:16
hl7 element address
Definition: address.h:49
node_t * node_create_n_append(node_t *parent)
create and append and empty child node
Definition: node_util.c:24
node_t * node_remove_child(node_t *parent, node_t *child, int pos)
unimplemented: remove a child from the children array
Definition: node_util.c:20
hl7 address structures and utilities
int pos
Definition: node.h:209
hl7 utilitiy functions
struct node_t * parent
Definition: node.h:195
node_type_t
Node types.
Definition: node.h:62
node_t * node_pad_children(node_t *parent, int count)
create empty child nodes until count is reached
Definition: node_util.c:45
unsigned char * message_to_string(message_t *message)
convert message structure to hl7 file
Definition: node_util.c:285
generic growing buffer library
node_t * node_create_empty(node_type_t type)
create an empty node
Definition: node_util.c:83
Definition: node.h:244
node_type_t type
Definition: node.h:190
size_t length
Definition: node.h:207