Evita  0.16
evBit.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 
24 #ifndef __evBit_h
25 #define __evBit_h
26 
27 
28 #include "evDataObject.h"
29 
30 
31 class evBit : public evDataObject
32 {
33 public:
34  evBit(void);
35  evBit(int bit);
36  evBit(const evBit &bit);
37  evBit operator = (const evBit &bit);
38  evBit operator = (const int bit);
39  ~evBit(void);
40 
41  int GetBit(void) const;
42 
43  int operator == (const evBit &bit) const;
44  int operator != (const evBit &bit) const;
45  evBit operator ^ (const evBit &bit) const;
46  evBit operator & (const evBit &bit) const;
47  evBit operator | (const evBit &bit) const;
48  evBit &operator ^= (const evBit &bit);
49  evBit &operator &= (const evBit &bit);
50  evBit &operator |= (const evBit &bit);
51 
52 protected:
53 
54 private:
55  char Bit;
56 
57 };
58 
59 
60 inline evBit evBit::operator = (const evBit &bit)
61 {
62  this->Bit = bit.Bit;
63  return(*this);
64 }
65 
66 
67 inline evBit evBit::operator = (const int bit)
68 {
69  this->Bit = bit;
70  return(*this);
71 }
72 
73 
74 inline int evBit::GetBit(void) const
75 {
76  return(this->Bit);
77 }
78 
79 
80 inline int evBit::operator == (const evBit &bit) const
81 {
82  return(this->Bit == bit.Bit);
83 }
84 
85 
86 inline int evBit::operator != (const evBit &bit) const
87 {
88  return(!(*this == bit));
89 }
90 
91 
92 inline evBit evBit::operator ^ (const evBit &bit) const
93 {
94  return(evBit(this->Bit ^ bit.Bit));
95 }
96 
97 
98 inline evBit evBit::operator & (const evBit &bit) const
99 {
100  return(evBit(this->Bit & bit.Bit));
101 }
102 
103 
104 inline evBit evBit::operator | (const evBit &bit) const
105 {
106  return(evBit(this->Bit | bit.Bit));
107 }
108 
109 
110 inline evBit &evBit::operator ^= (const evBit &bit)
111 {
112  this->Bit ^= bit.Bit;
113  return(*this);
114 }
115 
116 
117 inline evBit &evBit::operator &= (const evBit &bit)
118 {
119  this->Bit &= bit.Bit;
120  return(*this);
121 }
122 
123 
124 inline evBit &evBit::operator |= (const evBit &bit)
125 {
126  this->Bit |= bit.Bit;
127  return(*this);
128 }
129 
130 
131 #endif
int operator!=(const evBit &bit) const
Definition: evBit.h:86
char Bit
Definition: evBit.h:55
evBit operator|(const evBit &bit) const
Definition: evBit.h:104
evBit & operator|=(const evBit &bit)
Definition: evBit.h:124
Definition: evDataObject.h:31
Definition: evBit.h:31
~evBit(void)
evBit & operator^=(const evBit &bit)
Definition: evBit.h:110
int GetBit(void) const
Definition: evBit.h:74
evBit operator^(const evBit &bit) const
Definition: evBit.h:92
int operator==(const evBit &bit) const
Definition: evBit.h:80
evBit & operator&=(const evBit &bit)
Definition: evBit.h:117
evBit operator&(const evBit &bit) const
Definition: evBit.h:98
evBit(void)
evBit operator=(const evBit &bit)
Definition: evBit.h:60