From b374d40854a23f2177b6e36afdd2eea18cb5e535 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 24 Mar 2009 12:39:26 +0000 Subject: Convert Text to use vtable structure. Now the whole libdom is compiled successfully again. svn path=/trunk/dom/; revision=6833 --- src/core/text.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/core/text.h') diff --git a/src/core/text.h b/src/core/text.h index 7af0f76..faf88cc 100644 --- a/src/core/text.h +++ b/src/core/text.h @@ -27,6 +27,16 @@ struct dom_text { * content whitespace */ }; +/* Vitual functions for dom_text */ +dom_exception _dom_text_split_text(struct dom_text *text, + unsigned long offset, struct dom_text **result); +dom_exception _dom_text_get_is_element_content_whitespace( + struct dom_text *text, bool *result); +dom_exception _dom_text_get_whole_text(struct dom_text *text, + struct dom_string **result); +dom_exception _dom_text_replace_whole_text(struct dom_text *text, + struct dom_string *content, struct dom_text **result); + dom_exception dom_text_create(struct dom_document *doc, struct dom_string *name, struct dom_string *value, struct dom_text **result); @@ -39,4 +49,10 @@ dom_exception dom_text_initialise(struct dom_text *text, void dom_text_finalise(struct dom_document *doc, struct dom_text *text); +#define DOM_TEXT_VTABLE \ + _dom_text_split_text, \ + _dom_text_get_is_element_content_whitespace, \ + _dom_text_get_whole_text, \ + _dom_text_replace_whole_text + #endif -- cgit v1.2.3