Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
Loads Class Reference

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

#include <Loads.h>

Public Member Functions

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

Static Public Attributes

static const char * VERSION
 current version of the library More...
 

Private Attributes

std::vector< Load * > loads
 vector of loads : these "Load" are created while the file is parsed More...
 

Friends

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

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::Loads ( )
inline

default constructor

Loads::Loads ( std::string  )

build a list of load from an LML file

Loads::~Loads ( )

destructor

Member Function Documentation

void Loads::addLoad ( Load ld)

add a load to the list

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

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

void Loads::deleteLoad ( const unsigned int  i)

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

double Loads::getFirstEventDate ( )

get the first event date present in the list of loads

Returns
-1.0 if no events are found
double Loads::getLastEventDate ( )

get the last event date present in the list of loads

Returns
-1.0 if no events are found
Load* Loads::getLoad ( const unsigned int  i) const

get a load by its index in the list

unsigned int Loads::numberOfLoads ( ) const

get the number of "Load" stored in the list

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

Print to an ostream.

Friends And Related Function Documentation

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

print to an output stream in XML format.

See Also
Loads.xsd

Member Data Documentation

std::vector<Load*> Loads::loads
private

vector of loads : these "Load" are created while the file is parsed

const char* Loads::VERSION
static

current version of the library


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