|
@@ -944,6 +944,23 @@ cmXmlRC_t cmXmlNodeIntV(const cmXmlNode_t* np, int* retRef, va_list vl
|
944
|
944
|
cmXmlRC_t cmXmlNodeUIntV(const cmXmlNode_t* np, unsigned* retRef, va_list vl )
|
945
|
945
|
{ return cmXmlNodeIntV(np,(int*)retRef,vl); }
|
946
|
946
|
|
|
947
|
+cmXmlRC_t cmXmlNodeDoubleV(const cmXmlNode_t* np, double* retRef, va_list vl )
|
|
948
|
+{
|
|
949
|
+ const cmChar_t* valueStr;
|
|
950
|
+ if((valueStr = cmXmlNodeValueV(np,vl)) == NULL )
|
|
951
|
+ return kNodeNotFoundXmlRC;
|
|
952
|
+
|
|
953
|
+ errno = 0;
|
|
954
|
+
|
|
955
|
+ // convert the string to a double
|
|
956
|
+ *retRef = strtod(valueStr,NULL);
|
|
957
|
+
|
|
958
|
+ if( errno != 0 )
|
|
959
|
+ return kInvalidTypeXmlRC;
|
|
960
|
+
|
|
961
|
+ return kOkXmlRC;
|
|
962
|
+}
|
|
963
|
+
|
947
|
964
|
cmXmlRC_t cmXmlNodeInt( const cmXmlNode_t* np, int* retRef, ... )
|
948
|
965
|
{
|
949
|
966
|
cmXmlRC_t rc;
|
|
@@ -964,6 +981,28 @@ cmXmlRC_t cmXmlNodeUInt( const cmXmlNode_t* np, unsigned* retRef, ... )
|
964
|
981
|
return rc;
|
965
|
982
|
}
|
966
|
983
|
|
|
984
|
+cmXmlRC_t cmXmlNodeDouble(const cmXmlNode_t* np, double* retRef, ...)
|
|
985
|
+{
|
|
986
|
+ cmXmlRC_t rc;
|
|
987
|
+ va_list vl;
|
|
988
|
+ va_start(vl,retRef);
|
|
989
|
+ rc = cmXmlNodeDoubleV(np,retRef,vl);
|
|
990
|
+ va_end(vl);
|
|
991
|
+ return rc;
|
|
992
|
+
|
|
993
|
+}
|
|
994
|
+
|
|
995
|
+bool cmXmlNodeHasChild( const cmXmlNode_t* np, const cmChar_t* label )
|
|
996
|
+{
|
|
997
|
+ const cmXmlNode_t* cnp = np->children;
|
|
998
|
+ for(; cnp!=NULL; cnp=cnp->sibling)
|
|
999
|
+ if( cmTextCmp(cnp->label,label) == 0 )
|
|
1000
|
+ return true;
|
|
1001
|
+
|
|
1002
|
+ return false;
|
|
1003
|
+}
|
|
1004
|
+
|
|
1005
|
+
|
967
|
1006
|
|
968
|
1007
|
cmXmlRC_t _cmXmlPrintScore( cmXmlH_t h )
|
969
|
1008
|
{
|