added the initial BitSet class without actual code
This commit is contained in:
parent
5f29d1670f
commit
1c996b5d95
50
qse/include/qse/cmn/Bitset.hpp
Normal file
50
qse/include/qse/cmn/Bitset.hpp
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2006-2014 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _QSE_CMN_BITSET_HPP_
|
||||
#define _QSE_CMN_BITSET_HPP_
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
template <qse_size_t NB>
|
||||
class Bitset
|
||||
{
|
||||
public:
|
||||
static const int NW = (NB - 1) / (QSE_SIZEOF(qse_size_t) * 8) + 1;
|
||||
|
||||
|
||||
protected:
|
||||
qse_size_t _w[NW];
|
||||
};
|
||||
|
||||
/////////////////////////////////
|
||||
QSE_END_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
#endif
|
@ -44,6 +44,7 @@ pkginclude_HEADERS += \
|
||||
Array.hpp \
|
||||
Association.hpp \
|
||||
BinaryHeap.hpp \
|
||||
Bitset.hpp \
|
||||
HashList.hpp \
|
||||
HashTable.hpp \
|
||||
HeapMmgr.hpp \
|
||||
|
@ -91,6 +91,7 @@ host_triplet = @host@
|
||||
@ENABLE_CXX_TRUE@ Array.hpp \
|
||||
@ENABLE_CXX_TRUE@ Association.hpp \
|
||||
@ENABLE_CXX_TRUE@ BinaryHeap.hpp \
|
||||
@ENABLE_CXX_TRUE@ Bitset.hpp \
|
||||
@ENABLE_CXX_TRUE@ HashList.hpp \
|
||||
@ENABLE_CXX_TRUE@ HashTable.hpp \
|
||||
@ENABLE_CXX_TRUE@ HeapMmgr.hpp \
|
||||
@ -149,10 +150,10 @@ am__pkginclude_HEADERS_DIST = alg.h arr.h chr.h cp949.h cp950.h dll.h \
|
||||
main.h map.h mb8.h mbwc.h mem.h oht.h opt.h path.h pma.h rbt.h \
|
||||
rex.h sll.h slmb.h str.h time.h tmr.h tre.h test.h uni.h uri.h \
|
||||
utf8.h xma.h Array.hpp Association.hpp BinaryHeap.hpp \
|
||||
HashList.hpp HashTable.hpp HeapMmgr.hpp LinkedList.hpp \
|
||||
Mmged.hpp Mmgr.hpp Mpool.hpp Named.hpp RedBlackTree.hpp \
|
||||
RedBlackTable.hpp ScopedPtr.hpp SharedPtr.hpp StrBase.hpp \
|
||||
String.hpp StdMmgr.hpp Transmittable.hpp
|
||||
Bitset.hpp HashList.hpp HashTable.hpp HeapMmgr.hpp \
|
||||
LinkedList.hpp Mmged.hpp Mmgr.hpp Mpool.hpp Named.hpp \
|
||||
RedBlackTree.hpp RedBlackTable.hpp ScopedPtr.hpp SharedPtr.hpp \
|
||||
StrBase.hpp String.hpp StdMmgr.hpp Transmittable.hpp
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
|
Loading…
Reference in New Issue
Block a user