16 #define realpath( a, b ) GetFullPathName( a, PATH_MAX, b, NULL )
17 #define strtoll _strtoi64
25 #if defined __cplusplus
82 if( TOM == NULL )
return( NULL );
84 if( TOMp == NULL )
return( NULL );
103 if( fileName != NULL ) {
105 if( realpath( fileName, realPath ) != NULL ) {
141 if( element == NULL )
return;
152 if( element == NULL )
return;
154 for( child = element->
children; child != NULL; child = nextChild ) {
155 nextChild = child->
next;
179 printf(
"not freed for %s\n", element->
xDataInfo.
ID );
199 last->
next = element;
211 element->
index = index;
213 element->
next = NULL;
232 if( element != NULL ) element = element->
children;
240 if( element != NULL ) element = element->
next;
252 if( strcmp( child->
name, name ) == 0 ) {
253 if( n == 0 ) desired = child;
319 if( xDI->
ID == NULL )
return( 1 );
331 for( i = 0; i < level; i++ ) printf(
" " );
332 printf(
"/%s", element->
name );
333 if( element->
index >= 0 ) printf(
" (%d)", element->
index );
334 if( printAttributes ) {
338 printf(
" (%s, \"%s\")", attribute->
name, attribute->
value );
365 for( attribute = attributes->
attributes; attribute != NULL; attribute = next ) {
366 next = attribute->
next;
389 last->
next = attribute;
407 for( attribute = attributes->
attributes; attribute != NULL; attribute = attribute->
next ) {
408 if( !strcmp( attribute->
name, name ) )
return( attribute->
value );
420 for( attribute = src->
attributes; attribute != NULL; attribute = attribute->
next ) {
438 if( value != NULL ) {
439 *n = (
int) strtoll( value, &e, 10 );
440 if( *e == 0 )
return( 0 );
455 if( value != NULL ) {
456 *d = strtod( value, &e );
457 if( *e == 0 )
return( 0 );
486 return( xDI->
data = (
void *)
smr_malloc2( smr, size, 1,
"xDI->data" ) );
495 if( xDI->
ID != NULL ) {
496 return( !strcmp( xDI->
ID, ID ) );
520 if( strcmp( ID, xDI->
ID ) ) {
528 #if defined __cplusplus
xDataTOM_TOM * xDataTOM_mallocTOM(statusMessageReporting *smr)
int xDataTOM_axes_release(xDataTOM_axes *axes)
int xDataTOM_polynomial_free(xDataTOM_xDataInfo *xDI)
#define smr_allocateCopyString2(smr, s, forItem)
int xDataTOM_regionsXYs_free(xDataTOM_xDataInfo *xDI)
int xDataTOM_smrLibraryID
char const * xDataTOM_XYs_ID
void xDataTOM_releaseElement(xDataTOM_element *element)
int xDataTOM_initializeTOM(statusMessageReporting *smr, xDataTOM_TOM *doc)
int xDataTOME_addAttribute(statusMessageReporting *smr, xDataTOM_element *element, char const *name, char const *value)
int xDataTOM_W_XYs_freeFrom_xDataInfo(xDataTOM_xDataInfo *xDI)
xDataTOM_TOM * xDataXML_importFile(statusMessageReporting *smr, char const *fileName)
xDataTOM_xDataInfo * xDataTOME_getXData(xDataTOM_element *TE)
int xDataTOM_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
xDataTOM_attribute * attributes
xDataTOM_element * xDataTOME_getFirstElement(xDataTOM_element *element)
static int xDataTOM_initialize_xData(statusMessageReporting *smr, xDataTOM_xDataInfo *xDataInfo)
void xDataTOM_freeElement(xDataTOM_element **element)
xDataTOM_attribute * next
int xDataTOM_axes_getInterpolation(statusMessageReporting *smr, xDataTOM_axes *axes, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
int xDataTOM_isXDataID(xDataTOM_element *TE, char const *ID)
int xDataTOMAL_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_attributionList *src)
xDataTOM_attributionList attributes
char const * xDataTOM_V_W_XYs_ID
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
int xDataTOME_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d)
int xDataTOME_getInterpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
xDataTOM_interpolationFlag
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
static int xDataTOME_initializeElement(statusMessageReporting *smr, xDataTOM_element *element, xDataTOM_element *parent, int ordinal, int index, char const *name)
char const * xDataTOM_KalbachMann_ID
int xDataTOM_KalbachMann_free(xDataTOM_xDataInfo *xDI)
xDataTOM_element * xDataTOM_getDocumentsElement(xDataTOM_TOM *TOM)
xDataTOM_TOM * xDataTOM_importFile(statusMessageReporting *smr, const char *fileName)
int xDataTOM_setFileNameTOM(statusMessageReporting *smr, xDataTOM_TOM *doc, const char *fileName)
char const * xDataTOM_W_XYs_LegendreSeries_ID
#define smr_setReportError2(smr, libraryID, code, fmt,...)
xDataTOM_element * xDataTOM_addElementInElement(statusMessageReporting *smr, xDataTOM_element *parent, int index, char const *name)
void xDataTOM_displayTree(statusMessageReporting *smr, xDataTOM_TOM *TOM, int printAttributes)
const XML_Char int const XML_Char * value
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
int xDataTOMAL_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, double *d)
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
void * xData_initializeData(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID, size_t size)
void * xDataTOME_getXDataIfID(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID)
#define smr_malloc2(smr, size, zero, forItem)
int xDataTOMAL_addAttribute(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value)
int smr_isOk(statusMessageReporting *smr)
int xDataTOM_V_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
xDataTOM_interpolationQualifier
int xDataTOM_regionsW_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
void * smr_freeMemory(void **p)
xDataTOM_element * children
int xDataTOM_numberOfElementsByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name)
char const * xDataTOM_V_W_XYs_LegendreSeries_ID
xDataTOM_element * xDataTOM_mallocElement(statusMessageReporting *smr, xDataTOM_element *parent, int ordinal, int index, char const *name)
int xDataTOM_V_W_XYs_free(xDataTOM_xDataInfo *xDI)
void * xDataTOM_freeTOM(statusMessageReporting *smr, xDataTOM_TOM **TOM)
static void xDataTOME_displayTree(statusMessageReporting *smr, xDataTOM_element *element, int printAttributes, int level)
xDataTOM_xDataInfo xDataInfo
char const * xDataTOM_regionsW_XYs_LegendreSeries_ID
xDataTOM_element * xDataTOME_getNextElement(xDataTOM_element *element)
char const * xDataTOM_W_XYs_ID
int xDataTOMAL_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, int *n)
char const * xDataTOM_polynomial_ID
int xDataTOM_XYs_free(xDataTOM_xDataInfo *xDI)
int xDataTOME_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
char const * xDataTOM_regionsXYs_ID
xDataTOM_element * element
xDataTOM_element * parent