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

메서드

메서드설명
Add(const bool&) override컨테이너 끝에 값을 추가합니다.
And(const BitArrayPtr&)두 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) constBitArray 요소를 가져옵니다.
get_Count() const override컨테이너 크기를 가져옵니다.
get_Length() const컨테이너 크기를 가져옵니다.
GetEnumerator() override열거자 객체를 생성합니다.
idx_get(int) constGetter 함수.
idx_set(int, bool)Setter 함수.
Not()BitSet을 부정합니다.
operator!=(const BitArray&) const비트 단위 비교 연산자.
operator==(const BitArray&) const비트 단위 비교 연산자.
operator[](int)접근자 함수.
Or(const BitArrayPtr&)두 BitSet 간의 비트 단위 ‘or’ 연산을 계산합니다.
Remove(const bool&) override지정된 값의 첫 번째 발생을 반환합니다. 구현되지 않았습니다.
Set(int, bool)BitArray 요소를 설정합니다.
SetAll(bool)모든 요소를 특정 값으로 설정합니다.
SetTemplateWeakPtr(uint32_t) override약한 템플릿 인수 메커니즘의 공식 구현; 이 클래스에는 적용되지 않습니다.
virtualizeBeginConstIterator() const override현재 컨테이너에 대한 begin const iterator 구현을 가져옵니다.
virtualizeBeginIterator() override현재 컨테이너에 대한 begin iterator 구현을 가져옵니다.
virtualizeEndConstIterator() const override현재 컨테이너에 대한 end const iterator 구현을 가져옵니다.
virtualizeEndIterator() override현재 컨테이너에 대한 end iterator 구현을 가져옵니다.
Xor(const BitArrayPtr&)두 BitSet 간의 비트 단위 ‘xor’ 연산을 계산합니다.

Typedefs

타입 정의설명
bitsetRTTI 정보.

비고

#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
*/

또 보기