GnuCash  5.6-150-g038405b370+
sixtp-utils.h
1 /********************************************************************
2  * sixtp-utils.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 gnu@gnu.org *
21  * *
22  ********************************************************************/
23 
24 #ifndef SIXTP_UTILS_H
25 #define SIXTP_UTILS_H
26 #include "qof.h"
27 #include "sixtp.h"
28 
29 typedef struct
30 {
31  time64 time;
32  guint s_block_count;
34 
35 gboolean isspace_str (const gchar* str, int nomorethan);
36 
37 gboolean allow_and_ignore_only_whitespace (GSList* sibling_data,
38  gpointer parent_data,
39  gpointer global_data,
40  gpointer* result,
41  const char* text,
42  int length);
43 
44 gboolean generic_accumulate_chars (GSList* sibling_data,
45  gpointer parent_data,
46  gpointer global_data,
47  gpointer* result,
48  const char* text,
49  int length);
50 
51 
52 void generic_free_data_for_children (gpointer data_for_children,
53  GSList* data_from_children,
54  GSList* sibling_data,
55  gpointer parent_data,
56  gpointer global_data,
57  gpointer* result,
58  const gchar* tag);
59 
60 gchar* concatenate_child_result_chars (GSList* data_from_children);
61 
62 gboolean string_to_double (std::string_view, double* result);
63 
64 gboolean string_to_gint64 (std::string_view, gint64* v);
65 
66 gboolean string_to_guint16 (std::string_view, guint16* v);
67 
68 gboolean string_to_guint (std::string_view, guint* v);
69 
70 gboolean generic_return_chars_end_handler (gpointer data_for_children,
71  GSList* data_from_children,
72  GSList* sibling_data,
73  gpointer parent_data,
74  gpointer global_data,
75  gpointer* result,
76  const gchar* tag);
77 
78 sixtp* simple_chars_only_parser_new (sixtp_end_handler end_handler);
79 
80 gboolean generic_timespec_start_handler (GSList* sibling_data,
81  gpointer parent_data,
82  gpointer global_data,
83  gpointer* data_for_children,
84  gpointer* result,
85  const gchar* tag, gchar** attrs);
86 
87 gboolean timespec_parse_ok (Time64ParseInfo* info);
88 
89 gboolean generic_timespec_secs_end_handler (
90  gpointer data_for_children,
91  GSList* data_from_children, GSList* sibling_data,
92  gpointer parent_data, gpointer global_data,
93  gpointer* result, const gchar* tag);
94 
95 gboolean generic_timespec_nsecs_end_handler (
96  gpointer data_for_children,
97  GSList* data_from_children, GSList* sibling_data,
98  gpointer parent_data, gpointer global_data,
99  gpointer* result, const gchar* tag);
100 
101 
102 sixtp* generic_timespec_parser_new (sixtp_end_handler end_handler);
103 
104 gboolean generic_guid_end_handler (
105  gpointer data_for_children,
106  GSList* data_from_children, GSList* sibling_data,
107  gpointer parent_data, gpointer global_data,
108  gpointer* result, const gchar* tag);
109 
110 sixtp* generic_guid_parser_new (void);
111 
112 gboolean generic_gnc_numeric_end_handler (
113  gpointer data_for_children,
114  GSList* data_from_children, GSList* sibling_data,
115  gpointer parent_data, gpointer global_data,
116  gpointer* result, const gchar* tag);
117 
118 sixtp* generic_gnc_numeric_parser_new (void);
119 
120 sixtp* restore_char_generator (sixtp_end_handler ender);
121 
122 
123 
124 #endif /* _SIXTP_UTILS_H_ */
Definition: sixtp.h:129
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87