16#define realpath( a, b ) GetFullPathName( a, PATH_MAX, b, NULL )
17#define strtoll _strtoi64
25#if defined __cplusplus
72 xDataTOME_initializeElement( smr, &(TOM->
root), NULL, 0, 0,
"" );
82 if( TOM == NULL )
return( NULL );
84 if( TOMp == NULL )
return( NULL );
103 if( fileName != NULL ) {
105 if( realpath( fileName, realPath ) != NULL ) {
132 if( xDataTOME_initializeElement( smr, element, parent, ordinal, index, name ) )
smr_freeMemory( (
void **) &element );
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;
218 return( ( xDataTOM_initialize_xData( smr, &(element->
xDataInfo) ) || ( element->
name == NULL ) ) ? 1 : 0 );
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 );
343 xDataTOME_displayTree( smr, child, printAttributes, level + 1 );
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
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_allocateCopyString2(smr, s, forItem)
void * smr_freeMemory(void **p)
int smr_isOk(statusMessageReporting *smr)
#define smr_malloc2(smr, size, zero, forItem)
xDataTOM_attribute * next
xDataTOM_attribute * attributes
xDataTOM_element * children
xDataTOM_xDataInfo xDataInfo
xDataTOM_attributionList attributes
xDataTOM_element * parent
xDataTOM_element * element
int xDataTOM_numberOfElementsByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name)
int xDataTOM_V_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
int xDataTOM_regionsXYs_free(xDataTOM_xDataInfo *xDI)
int xDataTOM_regionsW_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
int xDataTOMAL_addAttribute(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, char const *value)
xDataTOM_TOM * xDataTOM_importFile(statusMessageReporting *smr, const char *fileName)
xDataTOM_TOM * xDataTOM_mallocTOM(statusMessageReporting *smr)
int xDataTOMAL_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, double *d)
xDataTOM_element * xDataTOM_mallocElement(statusMessageReporting *smr, xDataTOM_element *parent, int ordinal, int index, char const *name)
int xDataTOME_addAttribute(statusMessageReporting *smr, xDataTOM_element *element, char const *name, char const *value)
int xDataTOME_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
int xDataTOM_V_W_XYs_free(xDataTOM_xDataInfo *xDI)
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
xDataTOM_element * xDataTOM_addElementInElement(statusMessageReporting *smr, xDataTOM_element *parent, int index, char const *name)
int xDataTOM_setFileNameTOM(statusMessageReporting *smr, xDataTOM_TOM *doc, const char *fileName)
int xDataTOMAL_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_attributionList *attributes, char const *name, int *n)
int xDataTOM_initializeTOM(statusMessageReporting *smr, xDataTOM_TOM *doc)
void * xData_initializeData(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID, size_t size)
int xDataTOM_XYs_free(xDataTOM_xDataInfo *xDI)
void * xDataTOM_freeTOM(statusMessageReporting *smr, xDataTOM_TOM **TOM)
xDataTOM_interpolationFlag
void xDataTOM_freeElement(xDataTOM_element **element)
int xDataTOM_axes_getInterpolation(statusMessageReporting *smr, xDataTOM_axes *axes, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
int xDataTOM_isXDataID(xDataTOM_element *TE, char const *ID)
xDataTOM_element * xDataTOME_getNextElement(xDataTOM_element *element)
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
int xDataTOME_getInterpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
xDataTOM_element * xDataTOM_getDocumentsElement(xDataTOM_TOM *TOM)
void xDataTOM_releaseElement(xDataTOM_element *element)
xDataTOM_element * xDataTOME_getFirstElement(xDataTOM_element *element)
int xDataTOME_convertAttributeToDouble(statusMessageReporting *smr, xDataTOM_element *element, char const *name, double *d)
int xDataTOMAL_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_attributionList *src)
xDataTOM_interpolationQualifier
void xDataTOM_displayTree(statusMessageReporting *smr, xDataTOM_TOM *TOM, int printAttributes)
int xDataTOM_W_XYs_freeFrom_xDataInfo(xDataTOM_xDataInfo *xDI)
int xDataTOM_KalbachMann_free(xDataTOM_xDataInfo *xDI)
void * xDataTOME_getXDataIfID(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID)
xDataTOM_xDataInfo * xDataTOME_getXData(xDataTOM_element *TE)
int xDataTOM_W_XYs_LegendreSeries_free(xDataTOM_xDataInfo *xDI)
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
int xDataTOM_axes_release(xDataTOM_axes *axes)
int xDataTOM_polynomial_free(xDataTOM_xDataInfo *xDI)
xDataTOM_TOM * xDataXML_importFile(statusMessageReporting *smr, char const *fileName)
char const * xDataTOM_KalbachMann_ID
char const * xDataTOM_V_W_XYs_ID
char const * xDataTOM_regionsW_XYs_LegendreSeries_ID
char const * xDataTOM_polynomial_ID
char const * xDataTOM_W_XYs_ID
char const * xDataTOM_regionsXYs_ID
char const * xDataTOM_W_XYs_LegendreSeries_ID
char const * xDataTOM_XYs_ID
char const * xDataTOM_V_W_XYs_LegendreSeries_ID
int xDataTOM_smrLibraryID