00001
00002
00013 #ifndef EFORMAT_WRITE_NODE_H
00014 #define EFORMAT_WRITE_NODE_H
00015
00016 #include <stdint.h>
00017 #include <sys/uio.h>
00018
00019 namespace eformat {
00020
00021 namespace write {
00022
00026 typedef struct node_t {
00027 uint32_t* base;
00028 size_t size_word;
00029 node_t* next;
00030 } node_t;
00031
00040 void set (node_t& i, const uint32_t* b, size_t l, node_t* n=0);
00041
00049 void set (node_t& i, const struct iovec& v, node_t* n=0);
00050
00060 void cat (node_t* n, const struct iovec* v, uint32_t count);
00061
00070 void cat (node_t* n, uint32_t count);
00071
00077 uint32_t count (const node_t& list);
00078
00084 uint32_t count_words (const node_t& list);
00085
00098 uint32_t copy (const node_t& list, uint32_t* dest, size_t max);
00099
00113 uint32_t shallow_copy
00114 (const node_t& list, struct iovec* dest, uint32_t max);
00115
00116
00117 }
00118
00119 }
00120
00121 #endif