Stricter parsing of XML array attributes.
PiperOrigin-RevId: 451456510 Change-Id: I2556d4365762378261c04d3c9f1942166fbd156e
This commit is contained in:
committed by
Copybara-Service
parent
0741273c86
commit
f3453cf87f
@@ -98,6 +98,12 @@ class mjXUtil {
|
||||
// find value in map, return key ("": not found)
|
||||
static std::string FindValue(const mjMap* map, int mapsz, int value);
|
||||
|
||||
// read any type from attribute, return number read
|
||||
template<typename T>
|
||||
static int ReadAttrCpp(tinyxml2::XMLElement* elem, const char* attr, const int len,
|
||||
T* data, std::string& text,
|
||||
bool required = false, bool exact = true);
|
||||
|
||||
// read DOUBLE array from attribute, return number read
|
||||
static int ReadAttr(tinyxml2::XMLElement* elem, const char* attr, const int len,
|
||||
double* data, std::string& text,
|
||||
|
||||
Reference in New Issue
Block a user