Remove classname from mjs* structs.

PiperOrigin-RevId: 647277317
Change-Id: Ic3cb0d3bf890d6be2712c0538e21910a8f12ab44
This commit is contained in:
Alessio Quaglino
2024-06-27 05:12:16 -07:00
committed by Copybara-Service
parent 62e2842116
commit f6cc3f4091
9 changed files with 110 additions and 254 deletions
+14 -6
View File
@@ -17,6 +17,7 @@
#include <cstdlib>
#include <string>
#include <string_view>
#include <mujoco/mjspec.h>
#include "user/user_objects.h"
@@ -49,7 +50,6 @@ class mjXWriter : public mjXBase {
void Extension(tinyxml2::XMLElement* root); // extension section
void Custom(tinyxml2::XMLElement* root); // custom section
void Asset(tinyxml2::XMLElement* root); // asset section
void Body(tinyxml2::XMLElement* elem, mjCBody* body); // body/world section
void Contact(tinyxml2::XMLElement* root); // contact section
void Deformable(tinyxml2::XMLElement* root); // deformable section
void Equality(tinyxml2::XMLElement* root); // equality section
@@ -58,16 +58,24 @@ class mjXWriter : public mjXBase {
void Sensor(tinyxml2::XMLElement* root); // sensor section
void Keyframe(tinyxml2::XMLElement* root); // keyframe section
// body/world section
void Body(tinyxml2::XMLElement* elem, mjCBody* body, std::string_view childclass = "");
// single element writers, used in defaults and main body
void OneFlex(tinyxml2::XMLElement* elem, const mjCFlex* pflex);
void OneMesh(tinyxml2::XMLElement* elem, const mjCMesh* pmesh, mjCDef* def);
void OneSkin(tinyxml2::XMLElement* elem, const mjCSkin* pskin);
void OneMaterial(tinyxml2::XMLElement* elem, const mjCMaterial* pmaterial, mjCDef* def);
void OneJoint(tinyxml2::XMLElement* elem, const mjCJoint* pjoint, mjCDef* def);
void OneGeom(tinyxml2::XMLElement* elem, const mjCGeom* pgeom, mjCDef* def);
void OneSite(tinyxml2::XMLElement* elem, const mjCSite* psite, mjCDef* def);
void OneCamera(tinyxml2::XMLElement* elem, const mjCCamera* pcamera, mjCDef* def);
void OneLight(tinyxml2::XMLElement* elem, const mjCLight* plight, mjCDef* def);
void OneJoint(tinyxml2::XMLElement* elem, const mjCJoint* pjoint, mjCDef* def,
std::string_view classname = "");
void OneGeom(tinyxml2::XMLElement* elem, const mjCGeom* pgeom, mjCDef* def,
std::string_view classname = "");
void OneSite(tinyxml2::XMLElement* elem, const mjCSite* psite, mjCDef* def,
std::string_view classname = "");
void OneCamera(tinyxml2::XMLElement* elem, const mjCCamera* pcamera,
mjCDef* def, std::string_view classname = "");
void OneLight(tinyxml2::XMLElement* elem, const mjCLight* plight, mjCDef* def,
std::string_view classname = "");
void OnePair(tinyxml2::XMLElement* elem, const mjCPair* ppair, mjCDef* def);
void OneEquality(tinyxml2::XMLElement* elem, const mjCEquality* pequality, mjCDef* def);
void OneTendon(tinyxml2::XMLElement* elem, const mjCTendon* ptendon, mjCDef* def);