Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
XMLLoads Class Reference

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
 

Detailed Description

Allows one to read loads from an XML file (LML)/.

Deprecated:
Please use now Loads(std::string) constructor...

Constructor & Destructor Documentation

XMLLoads::XMLLoads ( std::string  fileName,
Loads *  allLoads 
)

create a list of loads from an LML file.

Parameters
fileNamethe name of the lml file (xml)
allLoadsthe pointer to the Loads instance (to store all loads), if null a new one is instanciated

References xmlRead().

XMLLoads::XMLLoads ( )

create an empty list of loads

References l.

XMLLoads::XMLLoads ( std::string  fileName)

(deprecated) create a list of loads from an LML file (instanciate a new Loads class object)

References xmlRead().

XMLLoads::~XMLLoads ( )

destructor (delete all loads)

Member Function Documentation

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().

Loads * XMLLoads::getLoads ( )

get the list of loads

References l.

bool XMLLoads::parseElement ( xmlNodePtr  elem)
protected

Read a load xml element, from lml file Uses xmlNodePtr from libxml2.

References addLoad(), readLoadAppliedTo(), readLoadDirection(), readLoadUnit(), and readLoadValueEvent().

Referenced by xmlRead().

void XMLLoads::readLoadAppliedTo ( xmlNodePtr  elem,
Load *  currentLoad 
)
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().

void XMLLoads::readLoadDirection ( xmlNodePtr  elem,
Load *  currentLoad 
)
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().

void XMLLoads::readLoadUnit ( xmlNodePtr  elem,
Load *  currentLoad 
)
protected
void XMLLoads::readLoadValueEvent ( xmlNodePtr  elem,
Load *  currentLoad 
)
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().

Member Data Documentation

Loads* XMLLoads::l
private

Referenced by addLoad(), getLoads(), and XMLLoads().

const char* XMLLoads::xmlFile
private

Referenced by xmlRead().


The documentation for this class was generated from the following files: