Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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-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 VALUEEVENT_H
27 #define VALUEEVENT_H
28 
29 #include <iostream>
30 #include "libxml/xmlIO.h"
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 date
actual date
Definition: ValueEvent.h:83
void setValue(const double)
set the value event value
double getDate() const
double get start time
friend std::ostream & operator<<(std::ostream &, ValueEvent)
print to an output stream in XML format.
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
void setDate(const double)
set the value event date
bool isActive(const double t) const
return true if the event is active at time t
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.