#include <bitarray.h>
Public Member Functions |
|
operator bool () const | |
bool | operator! () const |
operator int () const | |
operator DWORD_PTR () const | |
operator float () const | |
bool | operator< (int n) const |
bool | operator<= (int n) const |
bool | operator> (int n) const |
bool | operator>= (int n) const |
bool | operator== (int n) const |
bool | operator!= (int n) const |
int | operator+ (int n) const |
int | operator- (int n) const |
int | operator* (int n) const |
int | operator/ (int n) const |
int | operator% (int n) const |
int | operator+ (const NumberSetProxy &proxy) const |
int | operator- (const NumberSetProxy &proxy) const |
int | operator* (const NumberSetProxy &proxy) const |
Friends |
|
class | BitArray |
operator bool | ( | ) | const [inline] |
{ return !mArray.IsEmpty(); }
bool operator! | ( | ) | const [inline] |
{ return mArray.IsEmpty(); }
operator int | ( | ) | const [inline] |
{
return mArray.NumberSetImpl();
}
operator DWORD_PTR | ( | ) | const [inline] |
{
return mArray.NumberSetImpl();
}
operator float | ( | ) | const [inline] |
{ return (float)mArray.NumberSetImpl(); }
bool operator< | ( | int | n | ) | const [inline] |
{ // if( NumberSet() < 0 ) or a negative, always returns false. // if( NumberSet() < 1 ), basically mean "IsEmpty()". // if( NumberSet() < n ), we use !(NumberSet() >= n) return (n <= 0) ? false : ((n == 1) ? mArray.IsEmpty() : !mArray.NumberSetAtLeastImpl(n)); }
bool operator<= | ( | int | n | ) | const [inline] |
{ // if( x <= n ) ==> if( !(x >= (n+1)) ) return !mArray.NumberSetAtLeastImpl(n+1); }
bool operator> | ( | int | n | ) | const [inline] |
{ // if( x > 0 ) ==> !IsEmpty() // if( x > n ) ==> if( x >= (n+1) ) return n ? mArray.NumberSetAtLeastImpl(n+1) : !mArray.IsEmpty(); }
bool operator>= | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetAtLeastImpl(n);
}
bool operator== | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetEqualImpl(n);
}
bool operator!= | ( | int | n | ) | const [inline] |
{
return !mArray.NumberSetEqualImpl(n);
}
int operator+ | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetImpl() + n;
}
int operator- | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetImpl() - n;
}
int operator* | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetImpl() * n;
}
int operator/ | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetImpl() / n;
}
int operator% | ( | int | n | ) | const [inline] |
{
return mArray.NumberSetImpl() % n;
}
int operator+ | ( | const NumberSetProxy & | proxy | ) | const [inline] |
{ return mArray.NumberSetImpl() + int(proxy); }
int operator- | ( | const NumberSetProxy & | proxy | ) | const [inline] |
{ return mArray.NumberSetImpl() - int(proxy); }
int operator* | ( | const NumberSetProxy & | proxy | ) | const [inline] |
{ return mArray.NumberSetImpl() * int(proxy); }
friend class BitArray [friend] |