Add support for printing to stdout in mj_saveLastXML.

PiperOrigin-RevId: 546849864
Change-Id: I799ea3fcd723cf036f82ef5c1ef8152c314072dc
This commit is contained in:
Kyle Bayes
2023-07-10 06:07:24 -07:00
committed by Copybara-Service
parent 5cfbb6ac8b
commit 24c1ec9aec
7 changed files with 69 additions and 45 deletions
+4 -1
View File
@@ -15,6 +15,7 @@
#ifndef MUJOCO_SRC_XML_XML_BASE_H_
#define MUJOCO_SRC_XML_XML_BASE_H_
#include <cstdlib>
#include <string>
#include "tinyxml2.h"
@@ -82,7 +83,9 @@ class mjXBase : public mjXUtil {
virtual void Parse(tinyxml2::XMLElement* root) {};
// write: implemented in derived writer class
virtual void Write(FILE* fp) {};
virtual std::string Write(char *error, std::size_t error_sz) {
return "";
};
// set the model allocated externally
void SetModel(mjCModel*);