41 #if defined __cplusplus
93 if( ( data = (
double*)
xData_malloc2( smr, 2 * xDT->
length *
sizeof(
double ), 0,
"data" ) ) ) {
94 for( i = 0; i < 2 * xDT->
length; i++ ) data[i] = ((
double *) xDT->
data)[i];
119 1,
"bad xDataType instance" ) );
122 for( i = 0, s = text, p = (
double *) xDT->
data; i < 2 * xDT->length; i++, p++, s = e ) {
126 while( isspace( *e ) ) e++;
128 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"text contains extra data = %s", e );
132 if( status != 0 ) release( smr, xDT );
143 double *
data = (
double *) xDT->
data;
146 if( ( str = (
char *)
malloc( 2 * ( n + 1 ) * 17 ) ) == NULL )
return( NULL );
147 for( i = 0, p = str; i <
n; i++, p += 2 * 16 + 1, data += 2 ) {
148 sprintf( p,
" %15.7e %15.7e\n", *data, data[1] );
162 #if defined __cplusplus
int xData_xDataTypeConvertAttributes(statusMessageReporting *smr, xData_element *element)
void * xData_get_smrUserInterfaceFromElement(xData_element *element)
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
int xData_is_xDataType(statusMessageReporting *smr, xDataType *xDT, char const *const type, int setMsg)
#define xData_malloc2(smr, size, zero, forItem)
int xData_isElement_2d_xy(statusMessageReporting *smr, xData_element *element, int setMsg)
void * xData_free(statusMessageReporting *smr, void *p)
xDT_toStringFunction toString
double * xData_2d_xy_allocateCopyData(statusMessageReporting *smr, xData_element *element, xData_Int *length)
enum xData_xDataType status
int xData_init_2d_xy(statusMessageReporting *smr, xData_element *element)
xDT_releaseFunction release
int xData_setMessageError_ReturnInt(int value, statusMessageReporting *smr, void *userData, const char *file, int line, int code, const char *fmt,...)
int xData_is_2d_xy(statusMessageReporting *smr, xDataType *xDT, int setMsg)
int xData_2d_xy_free_copyData(statusMessageReporting *smr, void *data)
const char *const xData_twod_xy_ID
void * malloc(size_t __size)
xDT_toDataFunction toData
const XML_Char const XML_Char * data
int xData_stringTo_double(statusMessageReporting *smr, void *smrUserInterface, char const *c, double *value, char const *endings, char **e)