The generic XML reader for legacy MMM motions. The following XML tags are initially supported by this reader: "comments", "description","joint_order","motion". Custom tag processors can be registered in order to read other data. Unknown tags are ignored by default.
More...
#include <LegacyMotionReaderXML.h>
|
| LegacyMotionPtr | createMotionFromString (const std::string &xmlString, const std::string &motionName=std::string(), const std::filesystem::path &motionFilePath=std::string()) |
| |
|
std::vector< std::string > | getMotionNames (const std::filesystem::path &xmlFile) const |
| |
|
std::vector< std::string > | getMotionNamesFromXMLString (std::string motionXML) const |
| |
|
bool | isModelLoaded () |
| |
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | LegacyMotionReaderXML (bool mmmOnly=false, bool logging=true) |
| |
|
LegacyMotionList | loadAllMotions (const std::filesystem::path &xmlFile) |
| |
|
LegacyMotionList | loadAllMotionsFromString (const std::string &xmlDataString) |
| |
|
LegacyMotionPtr | loadMotion (const rapidxml::xml_node< char > *motionNode, const std::string &motionName, const std::filesystem::path &motionFilePath) |
| |
| LegacyMotionPtr | loadMotion (const std::filesystem::path &xmlFile, const std::string &motionName=std::string()) |
| |
|
virtual bool | processMotionFrameXMLTag (rapidxml::xml_node< char > *tag, MotionFramePtr motionframe) |
| | Implement the XMLMotionFrameTagProcessor method in order to process the standard motion-data tags.
|
| |
|
virtual bool | processMotionXMLTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| | Implement the XMLTagProcessor method in order to process the standard MMM tags.
|
| |
| bool | registerMotionFrameXMLTag (const std::string &xmlTag, XMLMotionFrameTagProcessorPtr processor) |
| |
| bool | registerMotionXMLTag (const std::string &xmlTag, XMLMotionTagProcessorPtr processor) |
| |
|
void | setHandleMissingModelFile (const std::function< void(std::filesystem::path &)> &handleMissingModelFile) |
| |
|
|
bool | processCommentsTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| |
|
bool | processJointOrderTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| |
|
bool | processModelProcessorConfigTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| |
|
bool | processModelTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| |
|
bool | processMotionFramesTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| |
|
bool | processMotionFrameTag (rapidxml::xml_node< char > *tag, LegacyMotionPtr motion) |
| |
|
bool | registerMotionFrameXMLTag (const std::string &xmlTag, XMLMotionFrameTagProcessor *processor) |
| |
|
bool | registerMotionXMLTag (const std::string &xmlTag, XMLMotionTagProcessor *processor) |
| |
|
|
bool | logging |
| |
|
bool | mmmOnly |
| |
|
ModelReaderXMLPtr | mr |
| |
|
std::vector< XMLMotionTagProcessorPtr > | processorList |
| |
|
std::vector< XMLMotionFrameTagProcessorPtr > | processorListMotionFrame |
| |
|
std::map< std::string, XMLMotionTagProcessor * > | xmlProcessors |
| |
|
std::map< std::string, XMLMotionFrameTagProcessor * > | xmlProcessorsMotionFrame |
| |
The generic XML reader for legacy MMM motions. The following XML tags are initially supported by this reader: "comments", "description","joint_order","motion". Custom tag processors can be registered in order to read other data. Unknown tags are ignored by default.
- See also
- XMLTagProcessor
-
XMLMotionFrameTagProcessor
◆ createMotionFromString()
| LegacyMotionPtr MMM::LegacyMotionReaderXML::createMotionFromString |
( |
const std::string & |
xmlString, |
|
|
const std::string & |
motionName = std::string(), |
|
|
const std::filesystem::path & |
motionFilePath = std::string() |
|
) |
| |
Parse the XML string and generate motion. A complete XML string is expected e.g <MMM><Motion> ... </Motion></MMM> In case an error was detected, an empty LegacyMotionPtr is returned.
- Parameters
-
| motionName | The name of the motion. If empty, the first motion is used. |
◆ loadMotion()
| LegacyMotionPtr MMM::LegacyMotionReaderXML::loadMotion |
( |
const std::filesystem::path & |
xmlFile, |
|
|
const std::string & |
motionName = std::string() |
|
) |
| |
Load XML data.
- Parameters
-
| xmlFile | The xmlFile path. |
| motionName | The name of the motion. If empty the first motion is selected. |
◆ registerMotionFrameXMLTag()
| bool MMM::LegacyMotionReaderXML::registerMotionFrameXMLTag |
( |
const std::string & |
xmlTag, |
|
|
XMLMotionFrameTagProcessorPtr |
processor |
|
) |
| |
Register factory methods for processing custom MotionFrame XML tags.
- Parameters
-
| xmlTag | The string that identifies this custom tag. Existing tag processors that are already registered with this name are overwritten. |
| processor | The factory that will create MotionFrameEntry objects. |
- Returns
- True on success.
◆ registerMotionXMLTag()
| bool MMM::LegacyMotionReaderXML::registerMotionXMLTag |
( |
const std::string & |
xmlTag, |
|
|
XMLMotionTagProcessorPtr |
processor |
|
) |
| |
Register factory methods for processing custom Motion XML tags.
- Parameters
-
| xmlTag | The string that identifies this custom tag. Existing tag processors that are already registered with this name are overwritten. |
| processor | The factory that will create MotionEntry objects. |
- Returns
- True on success.
The documentation for this class was generated from the following files:
- /builds/sw/mmm/core/MMM/Motion/Legacy/LegacyMotionReaderXML.h
- /builds/sw/mmm/core/MMM/Motion/Legacy/LegacyMotionReaderXML.cpp