commit after merge
[satune.git] / src / Interpreter / signatureenc.h
1 #ifndef SIGNATUREENC_H
2 #define SIGNATUREENC_H
3
4 #include "classlist.h"
5 #include "structs.h"
6 #include "cppvector.h"
7
8 class SignatureEnc {
9 public:
10         SignatureEnc(Interpreter *_interpreter);
11         ~SignatureEnc();
12         void setValue(uint id, uint value);
13         ValuedSignature *getElementSignature(Element *element);
14         ValuedSignature *getBooleanSignature(Boolean *bvar);
15         int getValue(void *astnode);
16         uint64_t getMaxValue() { return maxValue;}
17 private:
18         ValuedSignature *getValuedSignature(uint uniqueID) {return (ValuedSignature *)signatures.get(uniqueID - 1);}
19         uint getUniqueSigID() {return signatures.getSize() + 1;}
20         void updateMaxValue(Set *set);
21         CloneMap encoded;
22         Vector<Signature *> signatures;
23         Interpreter *interpreter;
24         uint64_t maxValue;
25 };
26 #endif