Computer Assited Medical Intervention Tool Kit  version 4.0
ValueEvent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2016 Univ. Grenoble Alpes, 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 VALUEEVENT_H
27 #define VALUEEVENT_H
28 
29 #include <iostream>
30 
41 class ValueEvent {
42 
43 public:
45  ValueEvent(const double v, const double d):value(v),date(d) {};
46 
48  ValueEvent():value(0.0), date(0.0) {};
49 
52 
54  bool isActive(const double t) const;
55 
57  double getValue() ;
59  double getValue(const double t) ;
61  double getValue(const double t, ValueEvent * nextE) ;
62 
64  void setDate(const double);
66  void setValue(const double);
67 
69  double getDate() const;
70 
74  friend std::ostream & operator << (std::ostream &, ValueEvent);
75 
77  void xmlPrint(std::ostream &);
78 
79 private:
81  double value;
83  double date;
84 
85 };
86 
87 #endif //VALUEEVENT_H
double value
actual value
Definition: ValueEvent.h:81
double getDate() const
double get start time
Definition: ValueEvent.cpp:58
double date
actual date
Definition: ValueEvent.h:83
bool isActive(const double t) const
return true if the event is active at time t
Definition: ValueEvent.cpp:31
void setValue(const double)
set the value event value
Definition: ValueEvent.cpp:85
friend std::ostream & operator<<(std::ostream &, ValueEvent)
print to an output stream in XML format.
Definition: ValueEvent.cpp:70
ValueEvent()
default constructor
Definition: ValueEvent.h:48
ValueEvent(const double v, const double d)
constructor with initial values
Definition: ValueEvent.h:45
~ValueEvent()
destructor
Definition: ValueEvent.h:51
double getValue()
return the scalar value of the event
Definition: ValueEvent.cpp:36
void setDate(const double)
set the value event date
Definition: ValueEvent.cpp:80
A valueEvent of a load is composed of a value and a date.
Definition: ValueEvent.h:41
void xmlPrint(std::ostream &)
Print to an ostream.
Definition: ValueEvent.cpp:63