![]() |
Computer Assited Medical Intervention Tool Kit
version 3.4
|
Allows one to read loads from an XML file (LML)/. More...
#include <XMLLoads.h>
Public Member Functions | |
| void | addLoad (Load *) |
| add a new load to the list (creates one if no loads yet) More... | |
| Loads * | getLoads () |
| get the list of loads More... | |
| XMLLoads (std::string fileName, Loads *allLoads) | |
| create a list of loads from an LML file. More... | |
| XMLLoads () | |
| create an empty list of loads More... | |
| XMLLoads (std::string fileName) | |
| (deprecated) create a list of loads from an LML file (instanciate a new Loads class object) More... | |
| void | xmlRead (std::string) |
| Read the loads from an LML file. More... | |
| ~XMLLoads () | |
| destructor (delete all loads) More... | |
Protected Member Functions | |
| bool | parseElement (xmlNodePtr elem) |
| Read a load xml element, from lml file Uses xmlNodePtr from libxml2. More... | |
| void | readLoadAppliedTo (xmlNodePtr elem, Load *currentLoad) |
| Read a load AppliedTo property, from lml file Uses xmlNodePtr from libxml2 AppliedTo contains the list of atoms on which the load is applied. More... | |
| void | readLoadDirection (xmlNodePtr elem, Load *currentLoad) |
| Read a load Direction property, from lml file Uses xmlNodePtr from libxml2 Direction contains a 3D vector. More... | |
| void | readLoadUnit (xmlNodePtr elem, Load *currentLoad) |
| Read a load Unit property, from lml file Uses xmlNodePtr from libxml2 Unit contains the unit value of the load. More... | |
| void | readLoadValueEvent (xmlNodePtr elem, Load *currentLoad) |
| Read a load valueEvent property, from lml file Uses xmlNodePtr from libxml2 valueEvent contains a pair of date/value. More... | |
Private Attributes | |
| Loads * | l |
| const char * | xmlFile |
Allows one to read loads from an XML file (LML)/.
| XMLLoads::XMLLoads | ( | std::string | fileName, |
| Loads * | allLoads | ||
| ) |
| XMLLoads::XMLLoads | ( | ) |
create an empty list of loads
References l.
| XMLLoads::XMLLoads | ( | std::string | fileName | ) |
| XMLLoads::~XMLLoads | ( | ) |
destructor (delete all loads)
| void XMLLoads::addLoad | ( | Load * | load | ) |
add a new load to the list (creates one if no loads yet)
References Loads::addLoad(), and l.
Referenced by parseElement().
|
protected |
Read a load xml element, from lml file Uses xmlNodePtr from libxml2.
References addLoad(), readLoadAppliedTo(), readLoadDirection(), readLoadUnit(), and readLoadValueEvent().
Referenced by xmlRead().
|
protected |
Read a load AppliedTo property, from lml file Uses xmlNodePtr from libxml2 AppliedTo contains the list of atoms on which the load is applied.
References Load::addTarget().
Referenced by parseElement().
|
protected |
Read a load Direction property, from lml file Uses xmlNodePtr from libxml2 Direction contains a 3D vector.
References Load::setDirection(), Direction::setNullX(), Direction::setNullY(), Direction::setNullZ(), Direction::setX(), Direction::setY(), and Direction::setZ().
Referenced by parseElement().
|
protected |
Read a load Unit property, from lml file Uses xmlNodePtr from libxml2 Unit contains the unit value of the load.
References AccelerationUnit::CMSm2(), RotationUnit::DEG(), Load::getType(), ForceUnit::KN(), PressureUnit::KPA(), TranslationUnit::M(), TranslationUnit::MICRO_M(), TranslationUnit::MM(), PressureUnit::MMHG(), AccelerationUnit::MMSm2(), AccelerationUnit::MSm2(), ForceUnit::N(), TranslationUnit::NM(), PressureUnit::PA(), ForceUnit::PN(), RotationUnit::RAD(), and Load::setUnit().
Referenced by parseElement().
|
protected |
Read a load valueEvent property, from lml file Uses xmlNodePtr from libxml2 valueEvent contains a pair of date/value.
References Load::addEvent().
Referenced by parseElement().
| void XMLLoads::xmlRead | ( | std::string | fileName | ) |
Read the loads from an LML file.
Uses libxml2.
References parseElement(), and xmlFile.
Referenced by XMLLoads().
|
private |
Referenced by addLoad(), getLoads(), and XMLLoads().
|
private |
Referenced by xmlRead().
1.8.8