Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loads.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef LOADS_H
27 #define LOADS_H
28 
29 class Load;
30 #include "Load.h"
31 #include "ValueEvent.h"
32 #include "Direction.h"
33 
70 class Loads {
71 
72  public:
74  Loads() {};
75 
77  Loads(std::string);
78 
80  ~Loads();
81 
83  void addLoad(Load *ld);
84 
86  Load * getLoad(const unsigned int i) const;
87 
89  void deleteLoad(const unsigned int i);
90 
92  unsigned int numberOfLoads() const;
93 
97  friend std::ostream & operator << (std::ostream &, const Loads);
98 
100  void xmlPrint(std::ostream &) const;
101 
103  void ansysPrint(std::ostream &) const;
104 
108  double getFirstEventDate();
109 
113  double getLastEventDate();
114 
116  static const char * VERSION;
117 
118  private:
120  std::vector <Load*> loads;
121 
122 };
123 
124 
125 #endif //LOADS_H
double getFirstEventDate()
get the first event date present in the list of loads
~Loads()
destructor
void addLoad(Load *ld)
add a load to the list
double getLastEventDate()
get the last event date present in the list of loads
This class makes it possible to manage a list of "Load".
Definition: Loads.h:70
friend std::ostream & operator<<(std::ostream &, const Loads)
print to an output stream in XML format.
unsigned int numberOfLoads() const
get the number of "Load" stored in the list
void xmlPrint(std::ostream &) const
Print to an ostream.
Loads()
default constructor
Definition: Loads.h:74
std::vector< Load * > loads
vector of loads : these "Load" are created while the file is parsed
Definition: Loads.h:120
void deleteLoad(const unsigned int i)
delete a load and remove it from the list using its index
Load * getLoad(const unsigned int i) const
get a load by its index in the list
void ansysPrint(std::ostream &) const
Print the load list in ansys format (BEWARE: not everything is implemented)
Class that describes a load to be used in the simulation.
Definition: Load.h:53
static const char * VERSION
current version of the library
Definition: Loads.h:116