6 Order* allocOrder(OrderType type, Set * set){
7 Order* This = (Order*)ourmalloc(sizeof(Order));
9 initDefVectorBoolean(& This->constraints);
11 initOrderEncoding(& This->order, This);
12 This->boolsToConstraints = NULL;
16 void initializeOrderHashTable(Order* This){
17 This->boolsToConstraints= allocHashTableBoolConst(HT_INITIAL_CAPACITY, HT_DEFAULT_FACTOR);
20 void addOrderConstraint(Order* This, BooleanOrder* constraint){
21 pushVectorBoolean( &This->constraints, (Boolean*) constraint);
24 void setOrderEncodingType(Order* This, OrderEncodingType type){
25 This->order.type = type;
28 void deleteOrder(Order* This){
29 deleteVectorArrayBoolean(& This->constraints);
30 deleteOrderEncoding(& This->order);
31 if(This->boolsToConstraints!= NULL) {
32 resetAndDeleteHashTableBoolConst(This->boolsToConstraints);
33 deleteHashTableBoolConst(This->boolsToConstraints);