GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sixtp-stack.h
1 /********************************************************************
2  * sixtp-stack.h *
3  * Copyright 2001 Gnumatic, Inc. *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21  * *
22  ********************************************************************/
23 
24 #ifndef SIXTP_STACK_H
25 #define SIXTP_STACK_H
26 
27 #include <glib.h>
28 
29 #include "sixtp.h"
30 
31 typedef struct sixtp_stack_frame
32 {
33  sixtp *parser;
34  gchar *tag;
35  gpointer data_for_children;
36  GSList *data_from_children; /* in reverse chronological order */
37  gpointer frame_data;
38 
39  /* Line and column [of the start tag]; set during parsing. */
40  int line;
41  int col;
43 
45 {
46  xmlSAXHandler handler;
47  sixtp_sax_data data;
48  sixtp_stack_frame *top_frame;
49  gpointer top_frame_data;
50 };
52 
53 void sixtp_stack_frame_destroy(sixtp_stack_frame *sf);
54 
55 void sixtp_stack_frame_print(sixtp_stack_frame *sf, gint indent, FILE *f);
56 
57 GSList* sixtp_pop_and_destroy_frame(GSList *frame_stack);
58 
59 void sixtp_print_frame_stack(GSList *stack, FILE *f);
60 
61 sixtp_stack_frame* sixtp_stack_frame_new(sixtp* next_parser, char *tag);
62 
63 sixtp_parser_context* sixtp_context_new(sixtp *initial_parser,
64  gpointer global_data,
65  gpointer top_level_data);
66 void sixtp_context_destroy(sixtp_parser_context* context);
67 void sixtp_context_run_end_handler(sixtp_parser_context* ctxt);
68 
69 #endif /* _SIXTP_STACK_H_ */
Definition: sixtp.h:93