Support FilePaths instead of raw strings in XML code.
PiperOrigin-RevId: 655177026 Change-Id: I55b055551384b01ba7a4baa5d75fbe3329b7d25d
This commit is contained in:
committed by
Copybara-Service
parent
2d24c58819
commit
2746cb8559
+5
-8
@@ -16,22 +16,19 @@
|
||||
#define MUJOCO_SRC_XML_XML_H_
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <mujoco/mjexport.h>
|
||||
#include <mujoco/mjmodel.h>
|
||||
#include <mujoco/mjspec.h>
|
||||
|
||||
// Top level API
|
||||
|
||||
// Main writer function
|
||||
std::string mjWriteXML(const mjSpec* spec, char* error, int error_sz);
|
||||
|
||||
// Main parser function
|
||||
mjSpec* mjParseXML(const char* filename, const mjVFS* vfs, char* error, int error_sz);
|
||||
mjSpec* ParseXML(const char* filename, const mjVFS* vfs, char* error, int nerror);
|
||||
|
||||
// Returns a newly-allocated mjSpec, loaded from the contents of xml.
|
||||
// On failure returns nullptr and populates the error array if present.
|
||||
mjSpec* ParseSpecFromString(std::string_view xml, char* error = nullptr, int error_size = 0);
|
||||
mjSpec* ParseSpecFromString(std::string_view xml, char* error = nullptr, int nerror = 0);
|
||||
|
||||
// Main writer function
|
||||
std::string WriteXML(const mjSpec* spec, char* error, int nerror);
|
||||
|
||||
#endif // MUJOCO_SRC_XML_XML_H_
|
||||
|
||||
Reference in New Issue
Block a user