Beispiel #1
0
	inline bool resize(GUINT newsize)
	{
		GUINT oldsize = m_container.Count;
		m_container.resize(newsize/GUINT_BIT_COUNT + 1,false);
		while(oldsize<m_container.Count)
		{
			m_container[oldsize] = 0;
		}
		return true;
	}
Beispiel #2
0
	inline void set(GUINT bit_index)
	{
		if(bit_index>=size())
		{
			resize(bit_index);
		}
		m_container[bit_index >> GUINT_EXPONENT] |= (1 << (bit_index & (GUINT_BIT_COUNT-1)));
	}
Beispiel #3
0
 gim_bitset(GUINT bits_count)
 {
     resize(bits_count);
 }
Beispiel #4
0
	inline void clear(GUINT bit_index)
	{
	    m_container[bit_index >> GUINT_EXPONENT] &= ~(1 << (bit_index & (GUINT_BIT_COUNT-1)));
	}
Beispiel #5
0
	inline char get(GUINT bit_index)
	{
		if(bit_index>=size())
		{
			return 0;
		}
		char value = m_container[bit_index >> GUINT_EXPONENT] &
					 (1 << (bit_index & (GUINT_BIT_COUNT-1)));
		return value;
	}
Beispiel #6
0
 GIM_RSORT_TOKEN(string IM_RSORT_TOKEN& rtoken)
 {
 	m_key = rtoken.m_key;
 	m_value = rtoken.m_value;
 }