MAK RTIspy API Documentation for HLA Evolved
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
libsrc
rtiutil
bitMask.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1998 MaK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: bitMask.h,v $ $Revision: 1.4 $ $State: Exp $
7
*********************************************************************/
8
11
12
#ifndef DtBitMask_H_
13
#define DtBitMask_H_
14
15
#include <vlutil/vlMachineTypes.h>
16
#include <
rtiMsConfig.h
>
17
18
//
24
class
DT_DLL_RTIUTIL
DtBitMask
25
{
26
public
:
28
DtBitMask
(
unsigned
int
length );
29
32
DtBitMask
(
const
char
* bitMask,
unsigned
int
length );
33
35
DtBitMask
(
const
DtBitMask
& orig );
36
38
virtual
~
DtBitMask
();
39
41
virtual
const
DtBitMask
& operator=(
const
DtBitMask
& orig );
42
44
virtual
const
DtBitMask
& operator&=(
const
DtBitMask
& orig );
45
47
virtual
const
DtBitMask
& operator|=(
const
DtBitMask
& orig );
48
50
virtual
inline
unsigned
int
length()
const
;
51
53
virtual
bool
isEmpty()
const
;
54
56
virtual
unsigned
int
numSet()
const
;
57
59
virtual
void
reset(
bool
value=
false
);
60
62
virtual
void
setBit(
unsigned
int
bitPosition,
bool
isOn =
true
);
63
65
virtual
bool
getBit(
unsigned
int
bitPosition )
const
;
66
68
virtual
unsigned
int
netSize()
const
;
69
72
virtual
void
encode(
char
* buffer )
const
;
73
75
virtual
void
decode(
const
char
* buffer,
unsigned
int
numBytes);
76
79
virtual
void
print(
bool
listHandles=
false
)
const
;
80
81
public
:
82
84
static
unsigned
int
lengthToWords(
unsigned
int
length );
85
87
static
unsigned
int
lengthToChars(
unsigned
int
length );
88
89
protected
:
90
92
94
MAKRti::DtU32*
myBitField
;
95
97
unsigned
int
myLength
;
98
99
};
100
101
103
DtBitMask
DT_DLL_RTIUTIL
operator&
(
const
DtBitMask
& first,
const
DtBitMask
& second );
104
DtBitMask
DT_DLL_RTIUTIL
operator|
(
const
DtBitMask
& first,
const
DtBitMask
& second );
105
106
107
inline
unsigned
int
DtBitMask::length
()
const
108
{
109
return
myLength
;
110
}
111
112
#endif
113
Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (
www.mak.com
)