+class ElementEncoding {
+ public:
+ ElementEncoding(Element *element);
+ ElementEncodingType getElementEncodingType() {return type;}
+ ~ElementEncoding();
+ void setElementEncodingType(ElementEncodingType type);
+ void deleteElementEncoding();
+ void allocEncodingArrayElement(uint size);
+ void allocInUseArrayElement(uint size);
+ uint numEncodingVars() {return numVars;}
+ bool isinUseElement(uint offset) { return (inUseArray[(offset >> 6)] >> (offset & 63)) & 0x1;}
+ void setInUseElement(uint offset) {inUseArray[(offset >> 6)] |= 1 << (offset & 63);}
+ void encodingArrayInitialization();
+ uint getSizeEncodingArray(uint setSize) {
+ switch (type) {
+ case BINARYINDEX:
+ return NEXTPOW2(setSize);
+ case ONEHOT:
+ case UNARY:
+ return setSize;
+ default:
+ ASSERT(0);
+ }
+ return -1;
+ }
+
+