acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
bit_array.h
1#pragma once
2
3
4
9class CLASS_DECL_ACME bit_array
10{
11public:
14 bit_array();
15 ~bit_array();
16
18 void set_bit(int pos);
20 void clear_bit(int pos);
22 void add_range(int s, int e);
24 void clear_range(int s, int e);
35 void add_bit_array(char*, int);
37 void clear_bit_array(char*, int);
39 bool get_bit(int pos) const;
40
41
42
43
44 void ensure_size(int iSize, bool bSet = false);
45 void set_size(int iBitCount, bool set = false);
46 int get_size();
47
48private:
49 int * m_pdata;
50 int m_iDataCount;
51 int m_iBitCount;
52
53};
54
55/* ***** BEGIN LICENSE BLOCK *****
56 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
57 *
58 * The contents of this file are topic to the Mozilla Public License Version
59 * 1.1 (the "License"); you may not use this file except in compliance with
60 * the License. You may obtain a copy of the License at
61 * http://www.mozilla.org/MPL/
62 *
63 * Software distributed under the License is distributed on an "AS IS" basis,
64 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
65 * for the specific language governing rights and limitations under the
66 * License.
67 *
68 * The Original Code is the Colorer Library.
69 *
70 * The Initial Developer of the Original Code is
71 * Cail Lomecb <cail@nm.ru>.
72 * Portions created by the Initial Developer are Copyright (C) 1999-2005
73 * the Initial Developer.
74 *
75 * Contributor(s):
76 *
77 * Alternatively, the contents of this file may be used under the terms of
78 * either the GNU General Public License Version 2 or later (the "GPL"), or
79 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
80 * in which case the provisions of the GPL or the LGPL are applicable instead
81 * of those above. If you wish to allow use of your version of this file only
82 * under the terms of either the GPL or the LGPL, and not to allow others to
83 * use your version of this file under the terms of the MPL, indicate your
84 * decision by deleting the provisions above and replace them with the notice
85 * and other provisions required by the GPL or the LGPL. If you do not delete
86 * the provisions above, a recipient may use your version of this file under
87 * the terms of any one of the MPL, the GPL or the LGPL.
88 *
89 * ***** END LICENSE BLOCK ***** */
90
91
92
bit_array()
Definition bit_array.cpp:7
void add_range(int s, int e)
Definition bit_array.cpp:91
void clear_bit(int pos)
Definition bit_array.cpp:83
void clear_range(int s, int e)
Definition bit_array.cpp:120
void clear_bit_array(bit_array &)
Definition bit_array.cpp:165
void add_bit_array(bit_array &)
Definition bit_array.cpp:149
void intersect_bit_array(bit_array &)
Definition bit_array.cpp:194
bool get_bit(int pos) const
Definition bit_array.cpp:228
void set_bit(int pos)
Definition bit_array.cpp:75