Class TBitSet

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TBitSet = class(TContainer)

Description

Class to store collections of bits.

Hierarchy

Overview

Methods

Public procedure AndBits(BitSet : TBitSet);
Public function All : Boolean;
Public function Any : Boolean;
Public function Cardinality : Integer;
Public procedure Clear(Index: Integer);
Public procedure ClearAll;
Public constructor Create(Size: Integer);
Public constructor Create(Size: Integer; Value: QWord);
Public constructor Create(Size: Integer; const Value: String);
Public constructor Create(Value: TBitSet);
Public constructor Create(Size: Integer; Value: TBitSet);
Public procedure Debug;
Public function Equals(Obj: TObject) : Boolean; override;
Public procedure Flip(Index: Integer);
Public procedure FlipAll;
Public procedure FlipFast(Index: Integer); inline;
Public procedure Initialize(Value: Int64);
Public procedure Initialize(const Value : String);
Public procedure Initialize(Value : TBitSet);
Public function None : Boolean;
Public procedure NotBits(BitSet : TBitSet);
Public procedure OrBits(BitSet : TBitSet);
Public procedure SetAll;
Public procedure SetBit(Index : Integer; Value: Boolean);
Public procedure SetBitFast(Index : Integer; Value: Boolean); inline;
Public procedure SetOn(Index: Integer);
Public procedure ShiftLeft(Count : Integer = 1);
Public procedure ShiftRight(Count : Integer = 1);
Public function Test(Index: Integer) : Boolean;
Public function TestFast(Index : Integer): Boolean; inline;
Public function ToInteger: Integer;
Public function ToInt64: Int64;
Public function ToQWord: QWord;
Public function ToString: String; override;
Public procedure XorBits(BitSet : TBitSet);

Properties

Public property Bits[Index:Integer]: Boolean read TestFast write SetBitFast;
Public property Size : Integer read fSize;

Description

Methods

Public procedure AndBits(BitSet : TBitSet);

Performs a logical AND on the bits in the bitset with the bits of BitSet.

Public function All : Boolean;

Returns True if all the bits of the bitset are set, and False otherwise.

Public function Any : Boolean;

Returns True if any of the bits in the bitset is set, and False otherwise.

Public function Cardinality : Integer;

Returns the number of bits in the bitset that are set.

Public procedure Clear(Index: Integer);

Sets to False the bit at position Index.

Public procedure ClearAll;

Sets to False all bits in the bitset.

Public constructor Create(Size: Integer);
 
Public constructor Create(Size: Integer; Value: QWord);
 
Public constructor Create(Size: Integer; const Value: String);
 
Public constructor Create(Value: TBitSet);
 
Public constructor Create(Size: Integer; Value: TBitSet);
 
Public procedure Debug;
 
Public function Equals(Obj: TObject) : Boolean; override;

Returns True only if the bitset and Value are of the same size and have exactly the same set of bits set to True.

Public procedure Flip(Index: Integer);

Flips the bit at position Index.

Public procedure FlipAll;

Flips all bits in the bitset.

Public procedure FlipFast(Index: Integer); inline;
 
Public procedure Initialize(Value: Int64);
 
Public procedure Initialize(const Value : String);
 
Public procedure Initialize(Value : TBitSet);
 
Public function None : Boolean;

Returns True if none of the bits in the bitset is set to True, and False otherwise.

Public procedure NotBits(BitSet : TBitSet);
 
Public procedure OrBits(BitSet : TBitSet);

Performs a logical OR on the bits in the bitset with the bits of BitSet.

Public procedure SetAll;

Sets to True all bits in the bitset.

Public procedure SetBit(Index : Integer; Value: Boolean);

Sets to Value the bit at position Index.

Public procedure SetBitFast(Index : Integer; Value: Boolean); inline;
 
Public procedure SetOn(Index: Integer);

Sets to True the bit at position Index.

Public procedure ShiftLeft(Count : Integer = 1);
 
Public procedure ShiftRight(Count : Integer = 1);
 
Public function Test(Index: Integer) : Boolean;

Returns True if the bit at position Index is set, and False otherwise.

Public function TestFast(Index : Integer): Boolean; inline;
 
Public function ToInteger: Integer;
 
Public function ToInt64: Int64;
 
Public function ToQWord: QWord;
 
Public function ToString: String; override;
 
Public procedure XorBits(BitSet : TBitSet);

Performs a logical XOR on the bits in the bitset with the bits of BitSet.

Properties

Public property Bits[Index:Integer]: Boolean read TestFast write SetBitFast;
 
Public property Size : Integer read fSize;
 

Generated by PasDoc 0.13.0 on 2014-07-29 16:12:40