SST/macro
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
sprockit
sprockit
metadata_bits.h
Go to the documentation of this file.
1
#ifndef METADATA_BITS_H
2
#define METADATA_BITS_H
3
4
#include <stdint.h>
5
6
namespace
sprockit
{
7
8
template
<
class
int
eger>
9
class
metadata_bits
{
10
11
public
:
12
bool
13
bit
(
int
bitnum)
const
{
14
return
metadata_
& (1<<bitnum);
15
}
16
17
void
18
clear
() {
19
metadata_
= 0;
20
}
21
22
void
23
set_bit
(
int
bitnum) {
24
metadata_
=
metadata_
| (1<<bitnum);
25
}
26
27
void
28
unset_bit
(
int
bitnum) {
29
metadata_
=
metadata_
& ~(1<<bitnum);
30
}
31
32
integer
33
bit_integer
()
const
{
34
return
metadata_
;
35
}
36
37
void
38
set_bit_integer
(integer i) {
39
metadata_
= i;
40
}
41
42
metadata_bits
() :
43
metadata_
(0)
44
{
45
}
46
47
metadata_bits
(
const
metadata_bits
& mdata) :
48
metadata_
(mdata.
metadata_
)
49
{
50
}
51
52
public
:
53
integer
metadata_
;
54
};
55
56
57
}
58
59
#endif // METADATA_BITS_H
sprockit::metadata_bits::set_bit
void set_bit(int bitnum)
Definition:
metadata_bits.h:23
sprockit::metadata_bits
Definition:
metadata_bits.h:9
sprockit
Definition:
basic_string_tokenizer.h:21
sprockit::metadata_bits::clear
void clear()
Definition:
metadata_bits.h:18
sprockit::metadata_bits::metadata_bits
metadata_bits()
Definition:
metadata_bits.h:42
sprockit::metadata_bits::metadata_bits
metadata_bits(const metadata_bits &mdata)
Definition:
metadata_bits.h:47
sprockit::metadata_bits::bit_integer
integer bit_integer() const
Definition:
metadata_bits.h:33
sprockit::metadata_bits::metadata_
integer metadata_
Definition:
metadata_bits.h:53
sprockit::metadata_bits::set_bit_integer
void set_bit_integer(integer i)
Definition:
metadata_bits.h:38
sprockit::metadata_bits::bit
bool bit(int bitnum) const
Definition:
metadata_bits.h:13
sprockit::metadata_bits::unset_bit
void unset_bit(int bitnum)
Definition:
metadata_bits.h:28
Generated by
1.8.11