25 #ifndef SU_TAG_INLINE_H
27 #define SU_TAG_INLINE_H
40 #ifndef SU_TAG_CLASS_H
46 #define tt_next tt_class->tc_next
47 #define tt_len tt_class->tc_len
48 #define tt_move tt_class->tc_move
49 #define tt_xtra tt_class->tc_xtra
50 #define tt_dup tt_class->tc_dup
51 #define tt_free tt_class->tc_free
52 #define tt_find tt_class->tc_find
53 #define tt_snprintf tt_class->tc_snprintf
54 #define tt_filter tt_class->tc_filter
56 #define TAG_TYPE_OF(t) ((t) && (t)->t_tag ? (t)->t_tag : tag_null)
72 if (tt->tt_class && tt->tt_next)
73 return tt->tt_next(t);
83 return tt->tt_move(dst, src);
94 return tt->tt_xtra(t, offset);
104 return tt->tt_dup(dst, src, bb);
116 return tt->tt_find(tt, lst);
118 for (; lst; lst = t_next(lst)) {
119 if (tt == lst->
t_tag)
131 return tt->tt_free(t);
132 else if (tt->tt_next)
133 return (
tagi_t *)tt->tt_next(t);
143 return tt->tt_len(t);
Tag item.
Definition: su_tag.h:63
tag_type_t t_tag
Tag.
Definition: su_tag.h:64
\ Object-oriented tags and tag list interface.
struct tag_type_s const * tag_type_t
Tag item type.
Definition: su_tag.h:55
tag_typedef_t tag_next
Jump to another tag list.
Definition: su_taglist.c:1033
tag_typedef_t tag_null
End of tag list.
Definition: su_taglist.c:892
int t_end(tagi_t const *t)
Check if the tag item is last in current list.
Definition: su_tag_inline.h:59