System::Collections::BitArray クラス
コンテンツ
[
隠れる
]BitArray class
Array of bits which can be addressed by index. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class BitArray : public virtual System::Object,
public System::Collections::Generic::ICollection<bool>
Nested classes
- Class Enumerator
- Class Reference
メソッド
| メソッド | 説明 |
|---|---|
| Add(const bool&) override | コンテナの末尾に値を追加します。 |
| And(const BitArrayPtr&) | 2 つの BitSet のビット単位の AND を計算します。 |
| BitArray(const bitset&) | コピーコンストラクタ。 |
| BitArray(const BitArray&) | コピーコンストラクタ。 |
| BitArray(const BitArrayPtr&) | コピーコンストラクタ。 |
| BitArray(const System::ArrayPtr<bool>&) | コピーコンストラクタ。 |
| BitArray(const System::ArrayPtr<uint8_t>&) | コピーコンストラクタ。 |
| BitArray(const System::ArrayPtr<int>&) | コピーコンストラクタ。 |
| BitArray(int, bool) | フィルコンストラクタ。 |
| Clear() override | すべての要素を削除します。 |
| Contains(const bool&) const override | コンテナに特定の値が存在するかチェックします。未実装です。 |
| CopyTo(System::ArrayPtr<bool>, int) override | 既存の配列要素にデータをコピーします。 |
| data() | 基礎となるデータ構造へのアクセス。 |
| data() const | 基礎となるデータ構造へのアクセス。 |
| Get(int) const | BitArray 要素を取得します。 |
| get_Count() const override | コンテナのサイズを取得します。 |
| get_Length() const | コンテナのサイズを取得します。 |
| GetEnumerator() override | 列挙子オブジェクトを作成します。 |
| idx_get(int) const | ゲッタ関数。 |
| idx_set(int, bool) | セッタ関数。 |
| Not() | BitSet を否定します。 |
| operator!=(const BitArray&) const | ビット単位の比較演算子。 |
| operator==(const BitArray&) const | ビット単位の比較演算子。 |
| operator[](int) | アクセサ関数。 |
| Or(const BitArrayPtr&) | 2つの BitSet のビット単位の ‘or’ を計算します。 |
| Remove(const bool&) override | 指定された値の最初の出現を返します。実装されていません。 |
| Set(int, bool) | BitArray の要素を設定します。 |
| SetAll(bool) | すべての要素を特定の値に設定します。 |
| SetTemplateWeakPtr(uint32_t) override | 弱いテンプレート引数メカニズムの正式な実装です;このクラスには適用できません。 |
| virtualizeBeginConstIterator() const override | 現在のコンテナの begin const イテレータの実装を取得します。 |
| virtualizeBeginIterator() override | 現在のコンテナの begin イテレータの実装を取得します。 |
| virtualizeEndConstIterator() const override | 現在のコンテナの end const イテレータの実装を取得します。 |
| virtualizeEndIterator() override | 現在のコンテナの end イテレータの実装を取得します。 |
| Xor(const BitArrayPtr&) | 2つの BitSet のビット単位の ‘xor’ を計算します。 |
Typedefs
| 型定義 | 説明 |
|---|---|
| bitset | RTTI 情報。 |
備考
#include <system/collections/bitarray.h>
#include <system/smart_ptr.h>
using namespace System;
using namespace System::Collections::Generic;
void Print(const System::SmartPtr<System::Collections::Generic::IEnumerable<bool>> &bitArray)
{
for (const auto item: bitArray)
{
std::cout << item << ' ';
}
std::cout << std::endl;
}
int main()
{
// BitArray クラスの新しいインスタンスを構築します。
auto bitArray = MakeObject<System::Collections::BitArray>(3);
// 値を出力します。
Print(bitArray);
return 0;
}
/*
This code example produces the following output:
0 0 0
*/
参照
- Class Object
- Class ICollection
- Namespace System::Collections
- Library Aspose.Page for C++