Qt Virtual Chart Table (QVCT)
CDataTimeValidity.hpp
Go to the documentation of this file.
1 // INDENTING (emacs/vi): -*- mode:c++; tab-width:2; c-basic-offset:2; intent-tabs-mode:nil; -*- ex: set tabstop=2 expandtab:
2 
3 /*
4  * Qt Virtual Chart Table (QVCT)
5  * Copyright (C) 2012 Cedric Dufour <http://cedric.dufour.name>
6  * Author: Cedric Dufour <http://cedric.dufour.name>
7  *
8  * The Qt Virtual Chart Table (QVCT) is free software:
9  * you can redistribute it and/or modify it under the terms of the GNU General
10  * Public License as published by the Free Software Foundation, Version 3.
11  *
12  * The Qt Virtual Chart Table (QVCT) is distributed in the hope
13  * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
14  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU General Public License for more details.
17  */
18 
19 #ifndef QVCT_CDATATIMEVALIDITY_HPP
20 #define QVCT_CDATATIMEVALIDITY_HPP
21 
22 // QVCT
23 #include "data/CDataValidity.hpp"
24 
25 
27 
33 {
34 
35  //------------------------------------------------------------------------------
36  // FIELDS
37  //------------------------------------------------------------------------------
38 
39 private:
41 
44 
45  double fdErrorTime;
47 
49 
50 
51  //------------------------------------------------------------------------------
52  // CONSTRUCTORS / DESTRUCTOR
53  //------------------------------------------------------------------------------
54 
55 public:
57  virtual ~CDataTimeValidity() {};
58 
59 
60  //------------------------------------------------------------------------------
61  // METHODS
62  //------------------------------------------------------------------------------
63 
64  // SETTERS
65 public:
67  void setValidityTime( double _fdTimeLastTime, double _fdErrorTime, bool _bInvalidTime = false )
68  { fdTimeLastTime = _fdTimeLastTime; fdErrorTime = _fdErrorTime; bInvalidTime = _bInvalidTime; };
69 
70  // GETTERS
71 public:
73  double getTimeLastTime() const { return fdTimeLastTime; };
75  double getErrorTime() const { return fdErrorTime; };
77  bool isInvalidTime() const { return bInvalidTime; };
79 
80  bool isValidTime() const;
81 
82 };
83 
84 #endif // QVCT_CDATATIMEVALIDITY_HPP
Time data validity.
double fdErrorTime
Time error, in seconds.
bool isInvalidTime() const
Returns the time's (forced) invalidity status.
bool isValidTime() const
Returns the time's (global) validity status.
double getErrorTime() const
Returns the time's error, in seconds.
double fdTimeLastTime
Time last-set time, in seconds from Unix epoch.
void setValidityTime(double _fdTimeLastTime, double _fdErrorTime, bool _bInvalidTime=false)
Sets the time's validity parameters.
double getTimeLastTime() const
Returns the time's last-set time, in seconds from Unix epoch.
bool bInvalidTime
Time (forced) invalidity status.
Generic data validity management class.