PandA-2024.02
sig_variation.cpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
37 #include "sig_variation.hpp"
38 
39 #include <utility>
40 
41 sig_variation::sig_variation(unsigned long long ts, std::string val, unsigned long long d)
42  : time_stamp(ts), value(std::move(val)), duration(d)
43 {
44 }
45 
46 bool operator<(const sig_variation& w, const unsigned long long t)
47 {
48  return w.time_stamp < t;
49 }
50 
51 bool operator<=(const sig_variation& w, const unsigned long long t)
52 {
53  return w.time_stamp <= t;
54 }
55 
56 bool operator>(const sig_variation& w, const unsigned long long t)
57 {
58  return w.time_stamp > t;
59 }
60 
61 bool operator>=(const sig_variation& w, const unsigned long long t)
62 {
63  return w.time_stamp >= t;
64 }
65 
66 bool operator==(const sig_variation& w, const unsigned long long t)
67 {
68  return w.time_stamp == t;
69 }
70 
71 bool operator!=(const sig_variation& w, const unsigned long long t)
72 {
73  return w.time_stamp != t;
74 }
75 
76 bool operator<(const unsigned long long t, const sig_variation& v)
77 {
78  return t < v.time_stamp;
79 }
80 
81 bool operator<=(const unsigned long long t, const sig_variation& v)
82 {
83  return t <= v.time_stamp;
84 }
85 
86 bool operator>(const unsigned long long t, const sig_variation& v)
87 {
88  return t > v.time_stamp;
89 }
90 
91 bool operator>=(const unsigned long long t, const sig_variation& v)
92 {
93  return t >= v.time_stamp;
94 }
95 
96 bool operator==(const unsigned long long t, const sig_variation& v)
97 {
98  return t == v.time_stamp;
99 }
100 
101 bool operator!=(const unsigned long long t, const sig_variation& v)
102 {
103  return t != v.time_stamp;
104 }
105 
106 bool operator<(const sig_variation& w, const sig_variation& v)
107 {
108  return w.time_stamp < v.time_stamp;
109 }
110 
111 bool operator<=(const sig_variation& w, const sig_variation& v)
112 {
113  return w.time_stamp <= v.time_stamp;
114 }
115 
116 bool operator>(const sig_variation& w, const sig_variation& v)
117 {
118  return w.time_stamp > v.time_stamp;
119 }
120 
121 bool operator>=(const sig_variation& w, const sig_variation& v)
122 {
123  return w.time_stamp >= v.time_stamp;
124 }
125 
126 bool operator==(const sig_variation& w, const sig_variation& v)
127 {
128  return w.time_stamp == v.time_stamp;
129 }
130 
131 bool operator!=(const sig_variation& w, const sig_variation& v)
132 {
133  return w.time_stamp != v.time_stamp;
134 }
Definition of hash function for EdgeDescriptor.
Definition: graph.hpp:1321
sig_variation(unsigned long long ts=0, std::string val="", unsigned long long d=std::numeric_limits< decltype(sig_variation::duration)>::max())
constructor
This class models a single variation of a signal in vcd.
bool operator>(const sig_variation &w, const unsigned long long t)
bool operator<(const sig_variation &w, const unsigned long long t)
bool operator<=(const sig_variation &w, const unsigned long long t)
bool operator!=(const sig_variation &w, const unsigned long long t)
bool operator>=(const sig_variation &w, const unsigned long long t)
unsigned long long time_stamp
time stamp of the variation
bool operator==(const sig_variation &w, const unsigned long long t)

Generated on Mon Feb 12 2024 13:02:55 for PandA-2024.02 by doxygen 1.8.13