1 // provides an object wrapper around elementary types
13 #define ELEMENT_BYTE 3
14 #define ELEMENT_TOKEN 4
15 #define ELEMENT_OBJECT 5
16 #define ELEMENT_FTUPLE 6
17 #define ELEMENT_SHORT 7
19 class ElementWrapper {
21 virtual unsigned int hashCode()=0;
22 virtual bool equals(ElementWrapper *other)=0;
28 class Element:public ElementWrapper {
35 Element(char * token);
37 unsigned int hashCode();
38 bool equals(ElementWrapper *other);
40 short getshortvalue();
46 structure * getstructure();
47 Element(void * objptr, structure * str);
63 unsigned int hashelement(ElementWrapper *e);
65 int elementequals(ElementWrapper *e1, ElementWrapper *e2);