Geant4-11
xDataTOM_importXML_private.h
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# <<END-copyright>>
4*/
5#ifndef xDataTOM_importXML_private_h_included
6#define xDataTOM_importXML_private_h_included
7
8#include <expat.h>
10#include <xDataTOM_private.h>
11
12#if defined __cplusplus
13 extern "C" {
14 namespace GIDI {
15#endif
16
17#ifndef XMLCALL
18#define XMLCALL
19#endif
20
21#ifndef XML_Char
22#define XML_Char char
23#endif
24
25#ifndef XML_Size
26#define XML_Size long
27#endif
28
30
35
36typedef struct xDataTOM_importXMLTOM_s xDataTOM_importXMLTOM;
48
50 size_t line;
51 size_t column;
52};
53
55 char *name;
56 char *value;
57};
58
60 int number;
61 size_t size;
63};
64
67 size_t allocated;
68 size_t length;
69 char *text;
70};
71
73typedef char *(*xDTXML_toStringFunction)( statusMessageReporting *smr, xDataXMLType * );
75
78 const char *sortString;
79};
80
82 int n;
84};
85
88 const char *ID;
93 int indexPresent, startPresent, endPresent, lengthPresent;
94 xDataTOM_Int index, start, end, length;
95 void *data;
96};
97
102 int depth;
106};
107
110 int ordinal; /* Counting from 0. */
111 int index; /* Value from "index" attribute if present or -1 */
112 int accessed; /* For the convenience of the users, not used internally. */
116 char *name; /* Allocated in xData_parseAddElementToRoot. */
117 char *fullName; /* Allocated in xData_parseAddElementToRoot. */
118 xDataXML_attributionList attributes; /* attributes->abbributes is allocated in xData_parseAddElementToRoot. */
122};
123
127};
128
134 char *fileName;
141};
142
149 char *text;
150};
151
152xDataTOM_TOM *xDataXML_importFile( statusMessageReporting *smr, char const *fileName );
161int xDataXML_isAttributeInList( xDataXML_attributionList *attributes, char const *name );
162int xDataXML_isAttributeInElement( xDataXML_element *element, char const *name );
163char *xDataXML_getAttributesValue( xDataXML_attributionList *attributes, char const *name );
164char const *xDataXML_getAttributesValueInElement( xDataXML_element *element, char const *name );
168 xDataTOM_Int *length );
171int xDataXML_convertAttributeToDouble( statusMessageReporting *smr, xDataXML_element *element, char const *name, double *d, int required );
172int xDataXML_numberOfElementsByTagName( statusMessageReporting *smr, xDataXML_element *element, char const *tagName );
176int xDataXML_is_xDataType( statusMessageReporting *smr, xDataXMLType *xDT, char const * const type, int setMsg );
177char const *xDataXML_getFileName( xDataXML_document *doc );
182int xDataXML_stringTo_xDataTOM_Int( statusMessageReporting *smr, void *smrUserInterface, char const *c, xDataTOM_Int *value, char const *endings, char **e );
183int xDataXML_stringTo_double( statusMessageReporting *smr, void *smrUserInterface, char const *c, double *value, char const *endings, char **e );
184int xDataXML_addToAccessed( statusMessageReporting *smr, xDataXML_element *element, int increment );
186void *xDataXML_initializeData( statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE, char const *ID, size_t size );
187
188/*
189c Stuff in xDataTOM_importXML_axes.c
190*/
193
194/*
195c Stuff in xDataTOM_importXML_XYs.c
196*/
198int xDataXML_XYsDataToTOM( statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_XYs *XYs, int index, int length, double value, double accuracy,
199 enum xDataTOM_subAxesType subAxesType, int axesOffest, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation );
200int xDataXML_stringToDoubles( statusMessageReporting *smr, xDataXML_element *XE, char const *s, int length, double *d );
201
202/*
203c Stuff in xDataTOM_importXML_regionsXYs.c
204*/
206
207/*
208c Stuff in xDataTOM_importXML_W_XYs.c
209*/
211int xDataXML_W_XYsDataToTOM( statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_W_XYs *W_XYs, int index, double value, xDataTOM_axes *axes,
212 int axesOffset );
213
214/*
215c Stuff in xDataTOM_importXML_V_W_XYs.c
216*/
218
219/*
220c Stuff in xDataTOM_importXML_W_XYs_LegendreSeries.c
221*/
224
225/*
226c Stuff in xDataTOM_importXML_regionsW_XYs_LegendreSeries.c
227*/
229
230/*
231c Stuff in xDataTOM_importXML_V_W_XYs_LegendreSeries.c
232*/
234
235/*
236c Stuff in xDataTOM_importXML_polynomial.c
237*/
239
240/*
241c Stuff in xDataTOM_importXML_KalbachMann.c
242*/
244
245#if defined __cplusplus
246 }
247 }
248#endif
249
250#endif /* End of xDataTOM_importXML_private_h_included. */
static constexpr double s
Definition: G4SIunits.hh:154
XML_Error
Definition: expat.h:54
unsigned long XML_Size
const char * name(G4int ptype)
char *(* smr_userInterface)(void *userData)
xDTXML_releaseFunction release
enum xDataXML_xDataType status
xDTXML_toDataFunction toData
xDataXML_element * element
xDTXML_toStringFunction toString
statusMessageReporting * smr
xDataXML_rootElement * currentRoot
enum xDataXML_errorCodes error
xDataXML_elementListItem * items
xDataXML_rootElement childrenRoot
xDataXML_attributionList attributes
xDataXML_rootElement * parentRoot
xDataXML_element * element
enum xDataXML_itemMode mode
xDataXML_element * parentElement
xDataXML_rootElement * parentRoot
smr_userInterface smrUserInterface
xDataXML_document * doc
xDataTOM_subAxesType
Definition: xDataTOM.h:24
int xDataTOM_Int
Definition: xDataTOM.h:16
char const * xDataXML_getFileName(xDataXML_document *doc)
enum xDataXML_itemMode xDataXML_getNextItem(xDataXML_item *item)
void * xDataXML_initializeData(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE, char const *ID, size_t size)
int xDataXML_KalbachMannToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
int xDataXML_XYsDataToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_XYs *XYs, int index, int length, double value, double accuracy, enum xDataTOM_subAxesType subAxesType, int axesOffest, xDataTOM_axes *axes, xDataTOM_interpolation *interpolation)
int xDataXML_regionsW_XYs_LegendreSeriesToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
int xDataXML_getAccessed(statusMessageReporting *smr, xDataXML_element *element)
int xDataXML_polynomialToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
xDataXML_elementList * xDataXML_getElementsByTagName(statusMessageReporting *smr, xDataXML_element *element, char const *tagName)
int xDataXML_W_XYs_LegendreSeriesToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
void * xDataXML_freeDoc(statusMessageReporting *smr, xDataXML_document *doc)
void xDataXML_freeElementList(statusMessageReporting *smr, xDataXML_elementList *list)
int xDataXML_stringToDoubles(statusMessageReporting *smr, xDataXML_element *XE, char const *s, int length, double *d)
int xDataXML_is_xDataType(statusMessageReporting *smr, xDataXMLType *xDT, char const *const type, int setMsg)
int xDataXML_W_XYsDataToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_W_XYs *W_XYs, int index, double value, xDataTOM_axes *axes, int axesOffset)
int xDataXML_stringTo_double(statusMessageReporting *smr, void *smrUserInterface, char const *c, double *value, char const *endings, char **e)
int xDataXML_XYsToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
int xDataXML_V_W_XYs_LegendreSeriesToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
@ xDataXML_statusError
@ xDataXML_statusParsing
@ xDataXML_statusCompleted
void * xDataXML_get_smrUserInterfaceFromElement(xDataXML_element *element)
xDataXML_element * xDataXML_getNextElement(xDataXML_element *element)
char * xDataXML_getAttributesValue(xDataXML_attributionList *attributes, char const *name)
int xDataXML_W_XYsToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
int xDataXML_addToAccessed(statusMessageReporting *smr, xDataXML_element *element, int increment)
@ xDataXML_errFileError
@ xDataXML_errXMLParser
@ xDataXML_errXML_ParserCreate
int xDataXML_attributeListLength(xDataXML_attributionList *attributes)
int xDataXML_parseIsError(xDataXML_document *doc)
xDataTOM_Int xDataXML_convertAttributeTo_xDataTOM_Int(statusMessageReporting *smr, xDataXML_element *element, char const *name, xDataTOM_Int *n, int required)
int xDataXML_W_XYs_LegendreSeries_LegendreSeriesToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_LegendreSeries *LegendreSeries)
xDataTOM_TOM * xDataXML_importFile(statusMessageReporting *smr, char const *fileName)
xDataXML_element * xDataXML_getDocumentsElement(xDataXML_document *doc)
char const * xDataXML_getRealFileName(xDataXML_document *doc)
int xDataXML_getCommonData(statusMessageReporting *smr, xDataXML_element *element, xDataTOM_Int *index, xDataTOM_Int *start, xDataTOM_Int *end, xDataTOM_Int *length)
char *(* xDTXML_toStringFunction)(statusMessageReporting *smr, xDataXMLType *)
char const * xDataXML_getAttributesValueInElement(xDataXML_element *element, char const *name)
@ xDataXML_xDataType_Ok
@ xDataXML_xDataType_ConvertingToData
@ xDataXML_xDataType_ConvertingToString
int xDataXML_stringTo_xDataTOM_Int(statusMessageReporting *smr, void *smrUserInterface, char const *c, xDataTOM_Int *value, char const *endings, char **e)
xDataXML_element * xDataXML_getFirstElement(xDataXML_element *element)
xDataXML_document * xDataXML_getElementsDocument(xDataXML_element *element)
int xDataXML_isAttributeInElement(xDataXML_element *element, char const *name)
int xDataXML_xDataTypeConvertAttributes(statusMessageReporting *smr, xDataXML_element *element)
xDataXML_element * xDataXML_getOneElementByTagName(statusMessageReporting *smr, xDataXML_element *element, char *name, int required)
int(* xDTXML_releaseFunction)(statusMessageReporting *smr, xDataXMLType *)
int xDataXML_regionsXYsToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
int xDataXML_axesElememtToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_axes *axes)
@ xDataXML_itemModeText
@ xDataXML_itemModeElement
@ xDataXML_itemModeEnd
void * xDataXML_get_smrUserInterfaceFromDocument(xDataXML_document *doc)
int xDataXML_numberOfElementsByTagName(statusMessageReporting *smr, xDataXML_element *element, char const *tagName)
int xDataXML_convertAttributeToDouble(statusMessageReporting *smr, xDataXML_element *element, char const *name, double *d, int required)
enum xDataXML_itemMode xDataXML_getFirstItem(xDataXML_element *element, xDataXML_item *item)
int(* xDTXML_toDataFunction)(statusMessageReporting *smr, xDataXMLType *, xDataXML_attributionList *, char const *)
int xDataXML_axesToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_axes *axes)
xDataXML_attribute * xDataXML_attributeByIndex(xDataXML_attributionList *attributes, int index)
int xDataXML_V_W_XYsToTOM(statusMessageReporting *smr, xDataXML_element *XE, xDataTOM_element *TE)
int xDataXML_isAttributeInList(xDataXML_attributionList *attributes, char const *name)
struct xDataTOM_importXMLTOM_s xDataTOM_importXMLTOM
xDataXML_document * xDataXML_importFile2(statusMessageReporting *smr, char const *fileName)