Home | History | Annotate | Download | only in usetperf
      1 /*
      2 **********************************************************************
      3 * Copyright (c) 2002-2005, International Business Machines
      4 * Corporation and others.  All Rights Reserved.
      5 **********************************************************************
      6 * 2002-09-20 aliu Created.
      7 */
      8 #ifndef __BITSET_H__
      9 #define __BITSET_H__
     10 
     11 #include "unicode/utypes.h"
     12 
     13 /**
     14  * A simple, limited clone of the java.util.BitSet.
     15  */
     16 class BitSet {
     17 
     18     uint32_t len;
     19     int32_t* data;
     20 
     21     void ensureCapacity(uint32_t minLen);
     22 
     23 public:
     24 
     25     BitSet();
     26     ~BitSet();
     27 
     28     UBool get(int32_t bitIndex) const;
     29 
     30     void set(int32_t bitIndex);
     31 
     32     // Non-java
     33     void clearAll();
     34 
     35     // TODO add other methods as needed.
     36 };
     37 
     38 #endif
     39