Computer Assisted Medical Intervention Tool Kit  version 5.2
 
Loading...
Searching...
No Matches
Loads Class Reference

This class makes it possible to manage a list of "Load". More...

#include <Loads.h>

+ Collaboration diagram for Loads:

Public Member Functions

void addLoad (Load *ld)
 add a load to the list
 
void ansysPrint (std::ostream &) const
 Print the load list in ansys format (BEWARE: not everything is implemented)
 
void deleteLoad (const unsigned int i)
 delete a load and remove it from the list using its index
 
double getFirstEventDate ()
 get the first event date present in the list of loads
 
double getLastEventDate ()
 get the last event date present in the list of loads
 
LoadgetLoad (const unsigned int i) const
 get a load by its index in the list
 
 Loads ()=default
 default constructor
 
 Loads (std::string)
 build a list of load from an LML file
 
unsigned int numberOfLoads () const
 get the number of "Load" stored in the list
 
void xmlPrint (std::ostream &) const
 Print to an ostream.
 
void xmlRead (std::string filename)
 read the input xml file using xsd and instantiate the loads
 
 ~Loads ()
 destructor
 

Static Public Attributes

static const char * VERSION
 current version of the library
 

Friends

std::ostream & operator<< (std::ostream &, const Loads)
 print to an output stream in XML format.
 

Detailed Description

This class makes it possible to manage a list of "Load".

Remember that Load is an abstract class (concrete instances are in instances of Translation, Force...etc)

Usage example:

 // reading:
 main()
 {
     Loads allLoads("myFile.lml");
     ...
     cout << allLoads;
 }

 // creating and writing:
 main()
 {
     Loads allLoads;
     Translation *t = new Translation();
     t->setUnit(..);
     ...
     allLoads->addLoad(t);
     ...
     cout << allLoads;
 }
 
Note
All loads that are added to an object of this class are then taking over by it (i.e. when an object of this class is deleted, it will delete all its loads).

Constructor & Destructor Documentation

◆ Loads() [1/2]

Loads::Loads ( )
default

default constructor

◆ Loads() [2/2]

Loads::Loads ( std::string  fileName)

build a list of load from an LML file

References xmlRead().

+ Here is the call graph for this function:

◆ ~Loads()

Loads::~Loads ( )

destructor

Member Function Documentation

◆ addLoad()

void Loads::addLoad ( Load ld)

add a load to the list

Referenced by xmlRead().

+ Here is the caller graph for this function:

◆ ansysPrint()

void Loads::ansysPrint ( std::ostream &  o) const

Print the load list in ansys format (BEWARE: not everything is implemented)

References Load::ansysPrint(), getLoad(), Load::getType(), and numberOfLoads().

Referenced by PrepWriter::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteLoad()

void Loads::deleteLoad ( const unsigned int  i)

delete a load and remove it from the list using its index

◆ getFirstEventDate()

double Loads::getFirstEventDate ( )

get the first event date present in the list of loads

Returns
-1.0 if no events are found

References ValueEvent::getDate().

+ Here is the call graph for this function:

◆ getLastEventDate()

double Loads::getLastEventDate ( )

get the last event date present in the list of loads

Returns
-1.0 if no events are found

References ValueEvent::getDate().

+ Here is the call graph for this function:

◆ getLoad()

Load * Loads::getLoad ( const unsigned int  i) const

get a load by its index in the list

Referenced by ansysPrint(), and xmlPrint().

+ Here is the caller graph for this function:

◆ numberOfLoads()

unsigned int Loads::numberOfLoads ( ) const

get the number of "Load" stored in the list

Referenced by ansysPrint(), and xmlPrint().

+ Here is the caller graph for this function:

◆ xmlPrint()

void Loads::xmlPrint ( std::ostream &  o) const

Print to an ostream.

print the prolog of the xml file

References getLoad(), numberOfLoads(), and Load::xmlPrint().

+ Here is the call graph for this function:

◆ xmlRead()

void Loads::xmlRead ( std::string  filename)

read the input xml file using xsd and instantiate the loads

Parameters
filenamethe input lml file (xml).

References Load::addEvent(), addLoad(), Load::addTarget(), AccelerationUnit::CMSm2(), RotationUnit::DEG(), ForceUnit::KN(), PressureUnit::KPA(), Load::LoadFactory(), TranslationUnit::M(), TranslationUnit::MICRO_M(), TranslationUnit::MM(), PressureUnit::MMHG(), AccelerationUnit::MMSm2(), AccelerationUnit::MSm2(), ForceUnit::N(), TranslationUnit::NM(), PressureUnit::PA(), ForceUnit::PN(), RotationUnit::RAD(), Load::setDirection(), Direction::setToward(), Load::setUnit(), Direction::setX(), Direction::setY(), and Direction::setZ().

Referenced by Loads().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  o,
const Loads  l 
)
friend

print to an output stream in XML format.

See also
Loads.xsd

Member Data Documentation

◆ VERSION

const char* Loads::VERSION
static

current version of the library


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