-
首页
-
C4D R23.110 C++ SDK
#include <basebitset.h>
详细描述
template<typename ALLOCATOR = DefaultAllocator>
class maxon::BaseBitSet< ALLOCATOR >
BaseBitSet
文档编制。
Member Typedef Documentation
◆
IntType
构造函数 & 析构函数文档编制
◆
BaseBitSet()
[1/2]
Default constructor.
◆
BaseBitSet()
[2/2]
Move constructor
-
参数
-
[in]
|
rhs
|
The bitset which is moved.
|
成员函数文档编制
◆
MAXON_DISALLOW_COPY_AND_ASSIGN()
MAXON_DISALLOW_COPY_AND_ASSIGN
|
(
|
BaseBitSet
< ALLOCATOR >
|
|
)
|
|
|
private
|
◆
operator=()
Move assignment operator
-
参数
-
[in]
|
rhs
|
The bitset which is moved.
|
-
返回
-
A reference to this bitset.
◆
IsSet()
Checks if a bit is set in the bitset.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
-
返回
-
True if the bit at
index
is set, otherwise false.
◆
IsSetUnchecked()
Checks if a bit is set in the bitset. It does not check if the underlaying array is big enough to contain a bit at this index.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
-
返回
-
True if the bit at @index index is set, otherwise false.
◆
ClearUnchecked()
Clears a bit in the bitset. It does not check if the underlaying array is big enough to contain a bit at this index.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
◆
Set()
[1/2]
Sets the bit at a given index and returns if it was actually set.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
[out]
|
isSet
|
This will be set to true if the bit is actually set, otherwise to false.
|
-
返回
-
OK on success.
◆
IsEmpty()
Check if the bitset is empty.
-
返回
-
True if no bit is set, otherwise false.
◆
IsPopulated()
Bool
IsPopulated
|
(
|
|
)
|
const
|
Check if the bitset contains at least one element.
-
返回
-
False if no bit is set, otherwise true.
◆
Set()
[2/2]
Sets the bit at a given index.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
-
返回
-
OK on success.
◆
SetUnchecked()
void SetUnchecked
|
(
|
UInt
|
index
|
)
|
|
Sets the bit at a given index. It does not check if the underlaying array is big enough to contain a bit at this index.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
◆
SetAndCheckUnchecked()
Bool
SetAndCheckUnchecked
|
(
|
UInt
|
index
|
)
|
|
Sets the bit at a given index. It does not check if the underlaying array is big enough to contain a bit at this index.
-
参数
-
[in]
|
index
|
Input index of the bit which should be set.
|
-
返回
-
true, if the bit was already set.
◆
SetRange()
Sets all bits in the given range. first must be smaller or equal to last.
-
参数
-
[in]
|
first
|
First element to set.
|
[in]
|
last
|
Last element to set.
|
-
返回
-
OK on success.
◆
SetRangeUnchecked()
void SetRangeUnchecked
|
(
|
UInt
|
first
,
|
|
|
UInt
|
last
|
|
)
|
|
|
Sets all bits in the given range. first must be smaller or equal to last.
-
参数
-
[in]
|
first
|
First element to set.
|
[in]
|
last
|
Last element to set.
|
◆
Clear()
[1/2]
void Clear
|
(
|
UInt
|
index
,
|
|
|
Bool
&
|
cleared
|
|
)
|
|
|
Clears the bit at a given index and returns if it was actually cleared.
-
参数
-
[in]
|
index
|
Input index of the bit which should be cleared.
|
[out]
|
cleared
|
This will be set to true if the bit is actually cleared, otherwise to false.
|
◆
Clear()
[2/2]
void Clear
|
(
|
UInt
|
index
|
)
|
|
Clears the bit at a given index.
-
参数
-
[in]
|
index
|
Input index of the bit which should be cleared.
|
◆
Reset()
Resets the bitset.
◆
GetHashCode()
Gets the hash code for the bitset, using
GetHashCode()
of the underlaying
BaseArray
.
-
返回
-
The bitset's hash code.
◆
operator==()
Compares two bitsets, using the compare operator of the underlaying
BaseArray
.
-
参数
-
[in]
|
rhs
|
Input bitset rhs.
|
-
返回
-
The component-by-component result of
this == rhs
.
◆
operator|=()
Calculates the bitwise OR of this bitset and another bitset.
-
参数
-
[in]
|
rhs
|
Input bitset rhs.
|
-
返回
-
A reference to this bitset.
◆
operator&=()
Calculates the bitwise AND of this bitset and another bitset.
-
参数
-
[in]
|
rhs
|
Input bitset rhs.
|
-
返回
-
A reference to this bitset.
◆
CopyFrom()
Copies the data from another bitset, using
CopyFrom()
of the underlaying
BaseArray
-
参数
-
[in]
|
src
|
Source from which the data is taken
|
-
返回
-
OK on success.
◆
MergeOr()
Merges the data from another bitset with logical OR. If the other bitset is larger it will resize this one.
-
参数
-
[in]
|
src
|
Source from which the data is merged.
|
-
返回
-
OK on success.
◆
MergeOrNot()
Merges the data from another bitset with logical OR NOT. If the other bitset is larger it will resize this one.
-
参数
-
[in]
|
src
|
Source from which the data is merged.
|
-
返回
-
OK on success.
◆
MergeAnd()
Merges the data from another bitset with logical AND. If the other bitset is larger it will resize this one.
-
参数
-
[in]
|
src
|
Source from which the data is merged.
|
-
返回
-
OK on success.
◆
MergeAndNot()
Merges the data from another bitset with logical AND NOT. If the other bitset is larger it will resize this one.
-
参数
-
[in]
|
src
|
Source from which the data is merged.
|
-
返回
-
OK on success.
◆
MergeXOr()
Merges the data from another bitset with logical XOR. If the other bitset is larger it will resize this one.
-
参数
-
[in]
|
src
|
Source from which the data is merged.
|
-
返回
-
OK on success.
◆
Invert()
Inverts all bits of the
BaseBitSet
.
◆
Init()
Initializes the array to have at least as much space to contain a certain amount of bits.
-
参数
-
[in]
|
count
|
Number of bits.
|
◆
CountBits()
Counts the bits in the selection
-
参数
-
[in]
|
first
|
Index from which conting starts.
|
[in]
|
last
|
Index where counting ends.
|
-
返回
-
Number of set bits.
◆
GetCapacity()
Int
GetCapacity
|
(
|
|
)
|
const
|
Get The maximum capacity of the BitSet
-
返回
-
Number maximum bits.
◆
DescribeIO()
Describe all elements of this class for I/O operations.
-
参数
-
[in]
|
stream
|
The stream that is used to register the class members.
|
-
返回
-
OK on success.
◆
RemoveTrailingZeroes()
void RemoveTrailingZeroes
|
(
|
|
)
|
|
|
private
|
Removes trailing zero bits in the underlaying
BaseArray
◆
CountBitsInWord()
Counts the bits of a word.
-
参数
-
[in]
|
word
|
Word in which the bits have to be counted.
|
-
返回
-
Number of set bits in the word.
Member Data Documentation
◆
IntTypeBitCount
const
Int
IntTypeBitCount
|
|
static
private
|
◆
INT_WIDTH_EXPONENT
const
UInt
INT_WIDTH_EXPONENT
|
|
static
private
|
◆
INT_MASK
◆
INT_WIDTH
◆
_bits