Branch data Line data Source code
1 : : // $Id: CCL.h 6219 2008-10-01 05:39:07Z vern $
2 : : //
3 : : // See the file "COPYING" in the main distribution directory for copyright.
4 : :
5 : : #ifndef ccl_h
6 : : #define ccl_h
7 : :
8 : : #include "List.h"
9 : :
10 : 404883 : declare(List,ptr_compat_int);
11 : : typedef List(ptr_compat_int) int_list;
12 : :
13 : : class CCL {
14 : : public:
15 : : CCL();
16 : : ~CCL();
17 : :
18 : : void Add(int sym);
19 : : void Negate();
20 : 14453 : int IsNegated() { return negated; }
21 : : int Index() { return index; }
22 : :
23 : : void Sort();
24 : :
25 : 20172 : int_list* Syms() { return syms; }
26 : :
27 : 1069 : void ReplaceSyms(int_list* new_syms)
28 [ + - ]: 1069 : { delete syms; syms = new_syms; }
29 : :
30 : 0 : unsigned int MemoryAllocation() const
31 : 0 : { return padded_sizeof(*this) + syms->MemoryAllocation(); }
32 : :
33 : : protected:
34 : : int_list* syms;
35 : : int negated;
36 : : int index;
37 : : };
38 : :
39 : : #endif
|