Generates an XML string corresponding to this MJCF element. Args: prefix_root: (optional) A `NameScope` object to be treated as root for the purpose of calculating the prefix. If `None` then no prefix is included. self_only: (optional) A boolean, whether to generate
(self, prefix_root=None,
self_only=False, pretty_print=True, debug_context=None,
*,
precision=constants.XML_DEFAULT_PRECISION,
zero_threshold=0)
| 247 | |
| 248 | @abc.abstractmethod |
| 249 | def to_xml_string(self, prefix_root=None, |
| 250 | self_only=False, pretty_print=True, debug_context=None, |
| 251 | *, |
| 252 | precision=constants.XML_DEFAULT_PRECISION, |
| 253 | zero_threshold=0): |
| 254 | """Generates an XML string corresponding to this MJCF element. |
| 255 | |
| 256 | Args: |
| 257 | prefix_root: (optional) A `NameScope` object to be treated as root |
| 258 | for the purpose of calculating the prefix. |
| 259 | If `None` then no prefix is included. |
| 260 | self_only: (optional) A boolean, whether to generate an XML corresponding |
| 261 | only to this element without any children. |
| 262 | pretty_print: (optional) A boolean, whether to the XML string should be |
| 263 | properly indented. |
| 264 | debug_context: (optional) A `debugging.DebugContext` object to which |
| 265 | the debugging information associated with the generated XML is written. |
| 266 | This is intended for internal use within PyMJCF; users should never need |
| 267 | manually pass this argument. |
| 268 | precision: (optional) Number of digits to output for floating point |
| 269 | quantities. |
| 270 | zero_threshold: (optional) When outputting XML, floating point quantities |
| 271 | whose absolute value falls below this threshold will be treated as zero. |
| 272 | |
| 273 | Returns: |
| 274 | A string. |
| 275 | """ |
| 276 | |
| 277 | @abc.abstractmethod |
| 278 | def resolve_references(self): |
no outgoing calls