38 if (src->
isFile ())
return ( fscanf (src->
file(),
"%d", &dest) == 1 );
44 if (src->
isFile ())
return ( fscanf (src->
file(),
"%ld", &dest) == 1 );
50 if (src->
isFile ())
return ( fscanf (src->
file(),
"%lf", &dest) == 1 );
128 if (!answer)
_errorr (
"no child");
130 if ( strcmp(answer->
Value(), name) != 0 )
_errorr2 (
"name of xelement is not \"%s\"", name);
145 const char *
XP_giveDAtext (
const XMLNode *xelem,
int n,
bool last,
const char *format,
const char *type,
const char *name,
int *noc)
148 if (n == 0) da = xelem;
154 if (!da)
_errorr (
"no data array");
156 if ( strcmp(da->
Value(),
"DataArray") != 0 )
_errorr (
"name of xelement is not DataArray");
164 if (no) n = atol(no);
166 if (*noc && *noc != n)
_errorr3 (
"in DataArray, NumberOfComponents is not \"%s\" but %s", *noc, n);
172 _errorr(
"no text in DataArray");
void FP_skip_line_commented(FILE *stream)
move file descriptor to the start of the new noncommented line, without checking of EOF ...
void XP_check_expected_attribute(const XMLNode *xelem, const char *name, const char *value)
long GP_scan_line(Stream *stream, char *dest)
... line; return value is length of the line
const XMLElement * XP_give_unique_expected_elem(const XMLNode *xelem, const char *name, bool uniq)
long GP_scan_line_alloc(Stream *stream, char *&dest)
... line; return value is length of the line; dest is NULL and allocated here
const XMLNode * FirstChild() const
Get the first child node, or null if none exists.
long SP_scan_word(const char *&src, char *dest)
... word; return value is length of the word
bool SP_scan_array(const char *&src, int n, ArgType *a)
... array of numbers
long GP_scan_line_alloc_skip_commented(Stream *stream, char *&dest)
The element is a container class.
bool ST_scan_expected_number(Stream *src, long expctd)
... number and compare with expected one
bool FP_scan_array(FILE *stream, int n, int *dest)
scan/copy array of numbers from src to dest, src pointer is shifted over the field ...
FILE * file(void)
*** GET ***
bool ST_scan_number(Stream *src, int &dest)
*** *** *** *** TINYXML FCE *** *** *** ***
long FP_scan_line(FILE *stream, char *dest)
scan/copy line == string without ' ' from stream
long FP_scan_line_alloc(FILE *stream, char *&dest)
scan/copy line == string without ' ' from stream; dest is NULL and allocated here ...
bool SP_scan_number(const char *&src, int &dest)
... number of type int/long/double
XMLNode is a base class for every object that is in the XML Document Object Model (DOM)...
const char * Value() const
The meaning of 'value' changes for the specific type.
const char * Attribute(const char *name, const char *value=0) const
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.
const char * GetText() const
Convenience function for easy access to the text inside an element.
long SP_scan_line(const char *&src, char *dest)
... line; return value is length of the line
long SP_scan_line_alloc(const char *&src, char *&dest)
... line; return value is length of the line; dest is NULL and allocated here
#define _errorr3(_1, _2, _3)
long GP_scan_word(Stream *stream, char *dest)
... word; return value is length of the word
const char * XP_giveDAtext(const XMLNode *xelem, int n, bool last, const char *format, const char *type, const char *name, int *noc)
bool ST_scan_array(Stream *src, int n, int *dest)
scan/copy array of numbers from src to dest, src pointer is shifted over the field ...
int FP_scan_word(FILE *src, char *dest)
... word; return value is length of the word
const char ** pstring(void)
virtual XMLElement * ToElement()
Safely cast to an Element, or null.
const XMLNode * NextSibling() const
Get the next (right) sibling node of this node.