Debian Codegraph @

intrinsic.h

raw symbols SCIP
1 /*
2 * PROPRIETARY INFORMATION. This software is proprietary to POWDER
3 * Development, and is not to be reproduced, transmitted, or disclosed
4 * in any way without written permission.
5 *
6 * Produced by: Jeff Lait
7 *
8 * POWDER Development
9 *
10 * NAME: intrinsic.h ( POWDER Library, C++ )
11 *
12 * COMMENTS:
13 * Definition of all bit field that can hold intrinsics...
14 */
15
16 #ifndef __intrinsic_h__
17 #define __intrinsic_h__
18
19 #include "glbdef.h"
20
21 class SRAMSTREAM;
22
23 class INTRINSIC
24 {
25 public:
26 INTRINSIC();
27 // This initializes our intrinsic bit array from the given string.
28 explicit INTRINSIC(const char *rawstr);
29
30 void loadFromString(const char *rawstr);
31 void mergeFromString(const char *rawstr);
32
33 static bool hasIntrinsic(const char *rawstr,
34 INTRINSIC_NAMES intrinsic);
35
36 bool hasIntrinsic(INTRINSIC_NAMES intrinsic) const;
37
38 // These will all return the OLD value of the intrinsic:
39 bool toggleIntrinsic(INTRINSIC_NAMES intrinsic);
40 bool setIntrinsic(INTRINSIC_NAMES intrinsic, bool newval=true);
41 bool clearIntrinsic(INTRINSIC_NAMES intrinsic);
42
43 void clearAll();
44
45 void save(SRAMSTREAM &os);
46 void load(SRAMSTREAM &os);
47
48 private:
49 u8 myData[(NUM_INTRINSICS + 7) / 8];
50 };
51
52 #endif