autoc 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,13 +35,20 @@
35
35
  #include "test.h"
36
36
 
37
37
  /***
38
- **** IntStrMap<int,const char*> (AutoC::HashMap)
38
+ **** <int*> (AutoC::Reference)
39
+ ***/
40
+ AUTOC_EXTERN int* IntNew();
41
+ AUTOC_EXTERN int* IntRef(int*);
42
+ AUTOC_EXTERN void IntFree(int*);
43
+
44
+ /***
45
+ **** IntStrMap<int,const char *> (AutoC::HashMap)
39
46
  ***/
40
47
 
41
48
  typedef struct IntStrMapEntry IntStrMapEntry;
42
49
  struct IntStrMapEntry {
43
50
  int key;
44
- const char* value;
51
+ const char * value;
45
52
  unsigned flags;
46
53
  };
47
54
 
@@ -85,23 +92,30 @@ struct IntStrMapIt {
85
92
  IntStrMapSetIt it;
86
93
  };
87
94
 
95
+ #define _IntStrMapCtor(self) IntStrMapCtor(&self)
96
+ #define _IntStrMapDtor(self) IntStrMapDtor(&self)
97
+ #define _IntStrMapIdentify(self) IntStrMapIdentify(&self)
98
+ #define _IntStrMapCopy(dst,src) IntStrMapCopy(&dst,&src)
99
+ #define _IntStrMapEqual(lt,rt) IntStrMapEqual(&lt,&rt)
100
+ #define _IntStrMapLess(lt,rt) IntStrMapLess(&lt,&rt)
101
+
88
102
  AUTOC_EXTERN void IntStrMapCtor(IntStrMap*);
89
103
  AUTOC_EXTERN void IntStrMapDtor(IntStrMap*);
90
- AUTOC_EXTERN void IntStrMapCopy(IntStrMap*, IntStrMap*);
91
- AUTOC_EXTERN int IntStrMapEqual(IntStrMap*, IntStrMap*);
104
+ AUTOC_EXTERN void IntStrMapCopy(IntStrMap*,IntStrMap*);
105
+ AUTOC_EXTERN int IntStrMapEqual(IntStrMap*,IntStrMap*);
92
106
  AUTOC_EXTERN size_t IntStrMapIdentify(IntStrMap*);
93
107
  AUTOC_EXTERN void IntStrMapPurge(IntStrMap*);
94
108
  AUTOC_EXTERN size_t IntStrMapSize(IntStrMap*);
95
109
  #define IntStrMapEmpty(self) (IntStrMapSize(self) == 0)
96
110
  AUTOC_EXTERN int IntStrMapContainsKey(IntStrMap*, int);
97
- AUTOC_EXTERN const char* IntStrMapGet(IntStrMap*, int);
98
- AUTOC_EXTERN int IntStrMapPut(IntStrMap*, int, const char*);
99
- AUTOC_EXTERN int IntStrMapReplace(IntStrMap*, int, const char*);
111
+ AUTOC_EXTERN const char * IntStrMapGet(IntStrMap*, int);
112
+ AUTOC_EXTERN int IntStrMapPut(IntStrMap*, int, const char *);
113
+ AUTOC_EXTERN int IntStrMapReplace(IntStrMap*, int, const char *);
100
114
  AUTOC_EXTERN int IntStrMapRemove(IntStrMap*, int);
101
115
  AUTOC_EXTERN void IntStrMapItCtor(IntStrMapIt*, IntStrMap*);
102
116
  AUTOC_EXTERN int IntStrMapItMove(IntStrMapIt*);
103
117
  AUTOC_EXTERN int IntStrMapItGetKey(IntStrMapIt*);
104
- AUTOC_EXTERN const char* IntStrMapItGetElement(IntStrMapIt*);
118
+ AUTOC_EXTERN const char * IntStrMapItGetElement(IntStrMapIt*);
105
119
  #define IntStrMapItGet(it) IntStrMapItGetElement(it)
106
120
 
107
121
  /***
@@ -139,10 +153,17 @@ struct IntSetIt {
139
153
  IntSetListIt it;
140
154
  };
141
155
 
156
+ #define _IntSetCtor(self) IntSetCtor(&self)
157
+ #define _IntSetDtor(self) IntSetDtor(&self)
158
+ #define _IntSetIdentify(self) IntSetIdentify(&self)
159
+ #define _IntSetCopy(dst,src) IntSetCopy(&dst,&src)
160
+ #define _IntSetEqual(lt,rt) IntSetEqual(&lt,&rt)
161
+ #define _IntSetLess(lt,rt) IntSetLess(&lt,&rt)
162
+
142
163
  AUTOC_EXTERN void IntSetCtor(IntSet*);
143
164
  AUTOC_EXTERN void IntSetDtor(IntSet*);
144
- AUTOC_EXTERN void IntSetCopy(IntSet*, IntSet*);
145
- AUTOC_EXTERN int IntSetEqual(IntSet*, IntSet*);
165
+ AUTOC_EXTERN void IntSetCopy(IntSet*,IntSet*);
166
+ AUTOC_EXTERN int IntSetEqual(IntSet*,IntSet*);
146
167
  AUTOC_EXTERN size_t IntSetIdentify(IntSet*);
147
168
  AUTOC_EXTERN void IntSetPurge(IntSet*);
148
169
  AUTOC_EXTERN int IntSetContains(IntSet*, int);
@@ -161,158 +182,197 @@ AUTOC_EXTERN int IntSetItMove(IntSetIt*);
161
182
  AUTOC_EXTERN int IntSetItGet(IntSetIt*);
162
183
 
163
184
  /***
164
- **** ValueTypeQueue<ValueType> (AutoC::Queue)
185
+ **** ValueTypeVector<ValueType> (AutoC::Vector)
165
186
  ***/
166
187
 
167
- typedef struct ValueTypeQueueNode ValueTypeQueueNode;
168
- typedef struct ValueTypeQueue ValueTypeQueue;
169
- typedef struct ValueTypeQueueIt ValueTypeQueueIt;
170
- struct ValueTypeQueue {
171
- ValueTypeQueueNode* head_node;
172
- ValueTypeQueueNode* tail_node;
173
- size_t node_count;
174
- };
175
- struct ValueTypeQueueIt {
176
- int start, forward;
177
- ValueTypeQueue* queue;
178
- ValueTypeQueueNode* this_node;
188
+ typedef struct ValueTypeVector ValueTypeVector;
189
+ typedef struct ValueTypeVectorIt ValueTypeVectorIt;
190
+ struct ValueTypeVector {
191
+ ValueType* values;
192
+ size_t element_count;
179
193
  };
180
- struct ValueTypeQueueNode {
181
- ValueType element;
182
- ValueTypeQueueNode* prev_node;
183
- ValueTypeQueueNode* next_node;
194
+ struct ValueTypeVectorIt {
195
+ ValueTypeVector* vector;
196
+ int index;
197
+ int forward;
184
198
  };
185
199
 
186
- AUTOC_EXTERN void ValueTypeQueueCtor(ValueTypeQueue*);
187
- AUTOC_EXTERN void ValueTypeQueueDtor(ValueTypeQueue*);
188
- AUTOC_EXTERN void ValueTypeQueueCopy(ValueTypeQueue*, ValueTypeQueue*);
189
- AUTOC_EXTERN int ValueTypeQueueEqual(ValueTypeQueue*, ValueTypeQueue*);
190
- AUTOC_EXTERN size_t ValueTypeQueueIdentify(ValueTypeQueue*);
191
- AUTOC_EXTERN void ValueTypeQueuePurge(ValueTypeQueue*);
192
- #define ValueTypeQueuePeek(self) ValueTypeQueuePeekHead(self)
193
- AUTOC_EXTERN ValueType ValueTypeQueuePeekHead(ValueTypeQueue*);
194
- AUTOC_EXTERN ValueType ValueTypeQueuePeekTail(ValueTypeQueue*);
195
- #define ValueTypeQueuePush(self, element) ValueTypeQueuePushTail(self, element)
196
- AUTOC_EXTERN void ValueTypeQueuePushTail(ValueTypeQueue*, ValueType);
197
- AUTOC_EXTERN void ValueTypeQueuePushHead(ValueTypeQueue*, ValueType);
198
- #define ValueTypeQueuePop(self) ValueTypeQueuePopHead(self)
199
- AUTOC_EXTERN ValueType ValueTypeQueuePopHead(ValueTypeQueue*);
200
- AUTOC_EXTERN ValueType ValueTypeQueuePopTail(ValueTypeQueue*);
201
- AUTOC_EXTERN int ValueTypeQueueContains(ValueTypeQueue*, ValueType);
202
- AUTOC_EXTERN ValueType ValueTypeQueueFind(ValueTypeQueue*, ValueType);
203
- #define ValueTypeQueueReplace(self, with) ValueTypeQueueReplaceEx(self, with, 1)
204
- #define ValueTypeQueueReplaceAll(self, with) ValueTypeQueueReplaceEx(self, with, -1)
205
- AUTOC_EXTERN int ValueTypeQueueReplaceEx(ValueTypeQueue*, ValueType, int);
206
- #define ValueTypeQueueRemove(self, what) ValueTypeQueueRemoveEx(self, what, 1)
207
- #define ValueTypeQueueRemoveAll(self, what) ValueTypeQueueRemoveEx(self, what, -1)
208
- AUTOC_EXTERN int ValueTypeQueueRemoveEx(ValueTypeQueue*, ValueType, int);
209
- AUTOC_EXTERN size_t ValueTypeQueueSize(ValueTypeQueue*);
210
- #define ValueTypeQueueEmpty(self) (ValueTypeQueueSize(self) == 0)
211
- AUTOC_EXTERN void ValueTypeQueueItCtor(ValueTypeQueueIt*, ValueTypeQueue*);
212
- #define ValueTypeQueueItCtor(self, type) ValueTypeQueueItCtorEx(self, type, 1)
213
- AUTOC_EXTERN void ValueTypeQueueItCtorEx(ValueTypeQueueIt*, ValueTypeQueue*, int);
214
- AUTOC_EXTERN int ValueTypeQueueItMove(ValueTypeQueueIt*);
215
- AUTOC_EXTERN ValueType ValueTypeQueueItGet(ValueTypeQueueIt*);
200
+ #define _ValueTypeVectorCtor(self,element_count) ValueTypeVectorCtor(&self,element_count)
201
+ #define _ValueTypeVectorDtor(self) ValueTypeVectorDtor(&self)
202
+ #define _ValueTypeVectorIdentify(self) ValueTypeVectorIdentify(&self)
203
+ #define _ValueTypeVectorCopy(dst,src) ValueTypeVectorCopy(&dst,&src)
204
+ #define _ValueTypeVectorEqual(lt,rt) ValueTypeVectorEqual(&lt,&rt)
205
+ #define _ValueTypeVectorLess(lt,rt) ValueTypeVectorLess(&lt,&rt)
206
+
207
+ AUTOC_EXTERN void ValueTypeVectorCtor(ValueTypeVector*,size_t);
208
+ AUTOC_EXTERN void ValueTypeVectorDtor(ValueTypeVector*);
209
+ AUTOC_EXTERN void ValueTypeVectorCopy(ValueTypeVector*,ValueTypeVector*);
210
+ AUTOC_EXTERN int ValueTypeVectorEqual(ValueTypeVector*,ValueTypeVector*);
211
+ AUTOC_EXTERN size_t ValueTypeVectorIdentify(ValueTypeVector*);
212
+ AUTOC_EXTERN void ValueTypeVectorResize(ValueTypeVector*, size_t);
213
+ AUTOC_INLINE size_t ValueTypeVectorSize(ValueTypeVector* self) {
214
+ assert(self);
215
+ return self->element_count;
216
+ }
217
+ AUTOC_INLINE int ValueTypeVectorWithin(ValueTypeVector* self, size_t index) {
218
+ assert(self);
219
+ return index < ValueTypeVectorSize(self);
220
+ }
221
+ AUTOC_INLINE ValueType ValueTypeVectorGet(ValueTypeVector* self, size_t index) {
222
+ ValueType result;
223
+ assert(self);
224
+ assert(ValueTypeVectorWithin(self, index));
225
+ ValueTypeCopy(result,self->values[index]);
226
+ return result;
227
+ }
228
+ AUTOC_INLINE void ValueTypeVectorSet(ValueTypeVector* self, size_t index, ValueType value) {
229
+ assert(self);
230
+ assert(ValueTypeVectorWithin(self, index));
231
+ ValueTypeDtor(self->values[index]);
232
+ ValueTypeCopy(self->values[index],value);
233
+ }
234
+ #define ValueTypeVectorItCtor(self, type) ValueTypeVectorItCtorEx(self, type, 1)
235
+ AUTOC_INLINE void ValueTypeVectorItCtorEx(ValueTypeVectorIt* self, ValueTypeVector* vector, int forward) {
236
+ assert(self);
237
+ assert(vector);
238
+ self->vector = vector;
239
+ self->forward = forward;
240
+ self->index = forward ? -1 : ValueTypeVectorSize(vector);
241
+ }
242
+ AUTOC_INLINE int ValueTypeVectorItMove(ValueTypeVectorIt* self) {
243
+ assert(self);
244
+ if(self->forward) ++self->index;
245
+ else --self->index;
246
+ return ValueTypeVectorWithin(self->vector, self->index);
247
+ }
248
+ AUTOC_INLINE ValueType ValueTypeVectorItGet(ValueTypeVectorIt* self) {
249
+ assert(self);
250
+ return ValueTypeVectorGet(self->vector, self->index);
251
+ }
252
+
253
+ AUTOC_EXTERN void ValueTypeVectorSort(ValueTypeVector*);
216
254
 
217
255
  /***
218
- **** ValueTypeList<ValueType> (AutoC::List)
256
+ **** ListIntSet<IntSet> (AutoC::List)
219
257
  ***/
220
258
 
221
- typedef struct ValueTypeListNode ValueTypeListNode;
222
- typedef struct ValueTypeList ValueTypeList;
223
- typedef struct ValueTypeListIt ValueTypeListIt;
224
- struct ValueTypeList {
225
- ValueTypeListNode* head_node;
259
+ typedef struct ListIntSetNode ListIntSetNode;
260
+ typedef struct ListIntSet ListIntSet;
261
+ typedef struct ListIntSetIt ListIntSetIt;
262
+ struct ListIntSet {
263
+ ListIntSetNode* head_node;
226
264
  size_t node_count;
227
265
  };
228
- struct ValueTypeListIt {
266
+ struct ListIntSetIt {
229
267
  int start;
230
- ValueTypeList* list;
231
- ValueTypeListNode* this_node;
232
- };
233
- struct ValueTypeListNode {
234
- ValueType element;
235
- ValueTypeListNode* next_node;
236
- };
237
-
238
- AUTOC_EXTERN void ValueTypeListCtor(ValueTypeList*);
239
- AUTOC_EXTERN void ValueTypeListDtor(ValueTypeList*);
240
- AUTOC_EXTERN void ValueTypeListCopy(ValueTypeList*, ValueTypeList*);
241
- AUTOC_EXTERN int ValueTypeListEqual(ValueTypeList*, ValueTypeList*);
242
- AUTOC_EXTERN size_t ValueTypeListIdentify(ValueTypeList*);
243
- AUTOC_EXTERN void ValueTypeListPurge(ValueTypeList*);
244
- AUTOC_EXTERN ValueType ValueTypeListPeek(ValueTypeList*);
245
- AUTOC_EXTERN ValueType ValueTypeListPop(ValueTypeList*);
246
- AUTOC_EXTERN void ValueTypeListPush(ValueTypeList*, ValueType);
247
- AUTOC_EXTERN int ValueTypeListContains(ValueTypeList*, ValueType);
248
- AUTOC_EXTERN ValueType ValueTypeListFind(ValueTypeList*, ValueType);
249
- #define ValueTypeListReplace(self, with) ValueTypeListReplaceEx(self, with, 1)
250
- #define ValueTypeListReplaceAll(self, with) ValueTypeListReplaceEx(self, with, -1)
251
- AUTOC_EXTERN int ValueTypeListReplaceEx(ValueTypeList*, ValueType, int);
252
- #define ValueTypeListRemove(self, what) ValueTypeListRemoveEx(self, what, 1)
253
- #define ValueTypeListRemoveAll(self, what) ValueTypeListRemoveEx(self, what, -1)
254
- AUTOC_EXTERN int ValueTypeListRemoveEx(ValueTypeList*, ValueType, int);
255
- AUTOC_EXTERN size_t ValueTypeListSize(ValueTypeList*);
256
- #define ValueTypeListEmpty(self) (ValueTypeListSize(self) == 0)
257
- AUTOC_EXTERN void ValueTypeListItCtor(ValueTypeListIt*, ValueTypeList*);
258
- AUTOC_EXTERN int ValueTypeListItMove(ValueTypeListIt*);
259
- AUTOC_EXTERN ValueType ValueTypeListItGet(ValueTypeListIt*);
268
+ ListIntSet* list;
269
+ ListIntSetNode* this_node;
270
+ };
271
+ struct ListIntSetNode {
272
+ IntSet element;
273
+ ListIntSetNode* next_node;
274
+ };
275
+
276
+ #define _ListIntSetCtor(self) ListIntSetCtor(&self)
277
+ #define _ListIntSetDtor(self) ListIntSetDtor(&self)
278
+ #define _ListIntSetIdentify(self) ListIntSetIdentify(&self)
279
+ #define _ListIntSetCopy(dst,src) ListIntSetCopy(&dst,&src)
280
+ #define _ListIntSetEqual(lt,rt) ListIntSetEqual(&lt,&rt)
281
+ #define _ListIntSetLess(lt,rt) ListIntSetLess(&lt,&rt)
282
+
283
+ AUTOC_EXTERN void ListIntSetCtor(ListIntSet*);
284
+ AUTOC_EXTERN void ListIntSetDtor(ListIntSet*);
285
+ AUTOC_EXTERN void ListIntSetCopy(ListIntSet*,ListIntSet*);
286
+ AUTOC_EXTERN int ListIntSetEqual(ListIntSet*,ListIntSet*);
287
+ AUTOC_EXTERN size_t ListIntSetIdentify(ListIntSet*);
288
+ AUTOC_EXTERN void ListIntSetPurge(ListIntSet*);
289
+ AUTOC_EXTERN IntSet ListIntSetPeek(ListIntSet*);
290
+ AUTOC_EXTERN IntSet ListIntSetPop(ListIntSet*);
291
+ AUTOC_EXTERN void ListIntSetPush(ListIntSet*, IntSet);
292
+ AUTOC_EXTERN int ListIntSetContains(ListIntSet*, IntSet);
293
+ AUTOC_EXTERN IntSet ListIntSetFind(ListIntSet*, IntSet);
294
+ #define ListIntSetReplace(self, with) ListIntSetReplaceEx(self, with, 1)
295
+ #define ListIntSetReplaceAll(self, with) ListIntSetReplaceEx(self, with, -1)
296
+ AUTOC_EXTERN int ListIntSetReplaceEx(ListIntSet*, IntSet, int);
297
+ #define ListIntSetRemove(self, what) ListIntSetRemoveEx(self, what, 1)
298
+ #define ListIntSetRemoveAll(self, what) ListIntSetRemoveEx(self, what, -1)
299
+ AUTOC_EXTERN int ListIntSetRemoveEx(ListIntSet*, IntSet, int);
300
+ AUTOC_EXTERN size_t ListIntSetSize(ListIntSet*);
301
+ #define ListIntSetEmpty(self) (ListIntSetSize(self) == 0)
302
+ AUTOC_EXTERN void ListIntSetItCtor(ListIntSetIt*, ListIntSet*);
303
+ AUTOC_EXTERN int ListIntSetItMove(ListIntSetIt*);
304
+ AUTOC_EXTERN IntSet ListIntSetItGet(ListIntSetIt*);
260
305
 
261
306
  /***
262
- **** ValueTypeSet<ValueType> (AutoC::HashSet)
307
+ **** PIntVector<int*> (AutoC::Vector)
263
308
  ***/
264
309
 
265
- typedef struct ValueTypeSetListNode ValueTypeSetListNode;
266
- typedef struct ValueTypeSetList ValueTypeSetList;
267
- typedef struct ValueTypeSetListIt ValueTypeSetListIt;
268
- struct ValueTypeSetList {
269
- ValueTypeSetListNode* head_node;
270
- size_t node_count;
271
- };
272
- struct ValueTypeSetListIt {
273
- int start;
274
- ValueTypeSetList* list;
275
- ValueTypeSetListNode* this_node;
310
+ typedef struct PIntVector PIntVector;
311
+ typedef struct PIntVectorIt PIntVectorIt;
312
+ struct PIntVector {
313
+ int** values;
314
+ size_t element_count;
276
315
  };
277
- struct ValueTypeSetListNode {
278
- ValueType element;
279
- ValueTypeSetListNode* next_node;
316
+ struct PIntVectorIt {
317
+ PIntVector* vector;
318
+ int index;
319
+ int forward;
280
320
  };
281
321
 
282
- typedef struct ValueTypeSet ValueTypeSet;
283
- typedef struct ValueTypeSetIt ValueTypeSetIt;
284
- struct ValueTypeSet {
285
- ValueTypeSetList* buckets;
286
- size_t bucket_count, min_bucket_count;
287
- size_t size, min_size, max_size;
288
- unsigned min_fill, max_fill, capacity_multiplier; /* ?*1e-2 */
289
- };
290
- struct ValueTypeSetIt {
291
- ValueTypeSet* set;
292
- int bucket_index;
293
- ValueTypeSetListIt it;
294
- };
322
+ #define _PIntVectorCtor(self,element_count) PIntVectorCtor(&self,element_count)
323
+ #define _PIntVectorDtor(self) PIntVectorDtor(&self)
324
+ #define _PIntVectorIdentify(self) PIntVectorIdentify(&self)
325
+ #define _PIntVectorCopy(dst,src) PIntVectorCopy(&dst,&src)
326
+ #define _PIntVectorEqual(lt,rt) PIntVectorEqual(&lt,&rt)
327
+ #define _PIntVectorLess(lt,rt) PIntVectorLess(&lt,&rt)
328
+
329
+ AUTOC_EXTERN void PIntVectorCtor(PIntVector*,size_t);
330
+ AUTOC_EXTERN void PIntVectorDtor(PIntVector*);
331
+ AUTOC_EXTERN void PIntVectorCopy(PIntVector*,PIntVector*);
332
+ AUTOC_EXTERN int PIntVectorEqual(PIntVector*,PIntVector*);
333
+ AUTOC_EXTERN size_t PIntVectorIdentify(PIntVector*);
334
+ AUTOC_EXTERN void PIntVectorResize(PIntVector*, size_t);
335
+ AUTOC_INLINE size_t PIntVectorSize(PIntVector* self) {
336
+ assert(self);
337
+ return self->element_count;
338
+ }
339
+ AUTOC_INLINE int PIntVectorWithin(PIntVector* self, size_t index) {
340
+ assert(self);
341
+ return index < PIntVectorSize(self);
342
+ }
343
+ AUTOC_INLINE int* PIntVectorGet(PIntVector* self, size_t index) {
344
+ int* result;
345
+ assert(self);
346
+ assert(PIntVectorWithin(self, index));
347
+ ((result) = IntRef(self->values[index]));
348
+ return result;
349
+ }
350
+ AUTOC_INLINE void PIntVectorSet(PIntVector* self, size_t index, int* value) {
351
+ assert(self);
352
+ assert(PIntVectorWithin(self, index));
353
+ IntFree(self->values[index]);
354
+ ((self->values[index]) = IntRef(value));
355
+ }
356
+ #define PIntVectorItCtor(self, type) PIntVectorItCtorEx(self, type, 1)
357
+ AUTOC_INLINE void PIntVectorItCtorEx(PIntVectorIt* self, PIntVector* vector, int forward) {
358
+ assert(self);
359
+ assert(vector);
360
+ self->vector = vector;
361
+ self->forward = forward;
362
+ self->index = forward ? -1 : PIntVectorSize(vector);
363
+ }
364
+ AUTOC_INLINE int PIntVectorItMove(PIntVectorIt* self) {
365
+ assert(self);
366
+ if(self->forward) ++self->index;
367
+ else --self->index;
368
+ return PIntVectorWithin(self->vector, self->index);
369
+ }
370
+ AUTOC_INLINE int* PIntVectorItGet(PIntVectorIt* self) {
371
+ assert(self);
372
+ return PIntVectorGet(self->vector, self->index);
373
+ }
295
374
 
296
- AUTOC_EXTERN void ValueTypeSetCtor(ValueTypeSet*);
297
- AUTOC_EXTERN void ValueTypeSetDtor(ValueTypeSet*);
298
- AUTOC_EXTERN void ValueTypeSetCopy(ValueTypeSet*, ValueTypeSet*);
299
- AUTOC_EXTERN int ValueTypeSetEqual(ValueTypeSet*, ValueTypeSet*);
300
- AUTOC_EXTERN size_t ValueTypeSetIdentify(ValueTypeSet*);
301
- AUTOC_EXTERN void ValueTypeSetPurge(ValueTypeSet*);
302
- AUTOC_EXTERN int ValueTypeSetContains(ValueTypeSet*, ValueType);
303
- AUTOC_EXTERN ValueType ValueTypeSetGet(ValueTypeSet*, ValueType);
304
- AUTOC_EXTERN size_t ValueTypeSetSize(ValueTypeSet*);
305
- #define ValueTypeSetEmpty(self) (ValueTypeSetSize(self) == 0)
306
- AUTOC_EXTERN int ValueTypeSetPut(ValueTypeSet*, ValueType);
307
- AUTOC_EXTERN int ValueTypeSetReplace(ValueTypeSet*, ValueType);
308
- AUTOC_EXTERN int ValueTypeSetRemove(ValueTypeSet*, ValueType);
309
- AUTOC_EXTERN void ValueTypeSetExclude(ValueTypeSet*, ValueTypeSet*);
310
- AUTOC_EXTERN void ValueTypeSetRetain(ValueTypeSet*, ValueTypeSet*);
311
- AUTOC_EXTERN void ValueTypeSetInclude(ValueTypeSet*, ValueTypeSet*);
312
- AUTOC_EXTERN void ValueTypeSetInvert(ValueTypeSet*, ValueTypeSet*);
313
- AUTOC_EXTERN void ValueTypeSetItCtor(ValueTypeSetIt*, ValueTypeSet*);
314
- AUTOC_EXTERN int ValueTypeSetItMove(ValueTypeSetIt*);
315
- AUTOC_EXTERN ValueType ValueTypeSetItGet(ValueTypeSetIt*);
375
+ AUTOC_EXTERN void PIntVectorSort(PIntVector*);
316
376
 
317
377
  /***
318
378
  **** ValueTypeMap<ValueType,ValueType> (AutoC::HashMap)
@@ -365,10 +425,17 @@ struct ValueTypeMapIt {
365
425
  ValueTypeMapSetIt it;
366
426
  };
367
427
 
428
+ #define _ValueTypeMapCtor(self) ValueTypeMapCtor(&self)
429
+ #define _ValueTypeMapDtor(self) ValueTypeMapDtor(&self)
430
+ #define _ValueTypeMapIdentify(self) ValueTypeMapIdentify(&self)
431
+ #define _ValueTypeMapCopy(dst,src) ValueTypeMapCopy(&dst,&src)
432
+ #define _ValueTypeMapEqual(lt,rt) ValueTypeMapEqual(&lt,&rt)
433
+ #define _ValueTypeMapLess(lt,rt) ValueTypeMapLess(&lt,&rt)
434
+
368
435
  AUTOC_EXTERN void ValueTypeMapCtor(ValueTypeMap*);
369
436
  AUTOC_EXTERN void ValueTypeMapDtor(ValueTypeMap*);
370
- AUTOC_EXTERN void ValueTypeMapCopy(ValueTypeMap*, ValueTypeMap*);
371
- AUTOC_EXTERN int ValueTypeMapEqual(ValueTypeMap*, ValueTypeMap*);
437
+ AUTOC_EXTERN void ValueTypeMapCopy(ValueTypeMap*,ValueTypeMap*);
438
+ AUTOC_EXTERN int ValueTypeMapEqual(ValueTypeMap*,ValueTypeMap*);
372
439
  AUTOC_EXTERN size_t ValueTypeMapIdentify(ValueTypeMap*);
373
440
  AUTOC_EXTERN void ValueTypeMapPurge(ValueTypeMap*);
374
441
  AUTOC_EXTERN size_t ValueTypeMapSize(ValueTypeMap*);
@@ -385,66 +452,314 @@ AUTOC_EXTERN ValueType ValueTypeMapItGetElement(ValueTypeMapIt*);
385
452
  #define ValueTypeMapItGet(it) ValueTypeMapItGetElement(it)
386
453
 
387
454
  /***
388
- **** ValueTypeVector<ValueType> (AutoC::Vector)
455
+ **** ValueTypeSet<ValueType> (AutoC::HashSet)
389
456
  ***/
390
457
 
391
- typedef struct ValueTypeVector ValueTypeVector;
392
- typedef struct ValueTypeVectorIt ValueTypeVectorIt;
393
- struct ValueTypeVector {
394
- ValueType* values;
458
+ typedef struct ValueTypeSetListNode ValueTypeSetListNode;
459
+ typedef struct ValueTypeSetList ValueTypeSetList;
460
+ typedef struct ValueTypeSetListIt ValueTypeSetListIt;
461
+ struct ValueTypeSetList {
462
+ ValueTypeSetListNode* head_node;
463
+ size_t node_count;
464
+ };
465
+ struct ValueTypeSetListIt {
466
+ int start;
467
+ ValueTypeSetList* list;
468
+ ValueTypeSetListNode* this_node;
469
+ };
470
+ struct ValueTypeSetListNode {
471
+ ValueType element;
472
+ ValueTypeSetListNode* next_node;
473
+ };
474
+
475
+ typedef struct ValueTypeSet ValueTypeSet;
476
+ typedef struct ValueTypeSetIt ValueTypeSetIt;
477
+ struct ValueTypeSet {
478
+ ValueTypeSetList* buckets;
479
+ size_t bucket_count, min_bucket_count;
480
+ size_t size, min_size, max_size;
481
+ unsigned min_fill, max_fill, capacity_multiplier; /* ?*1e-2 */
482
+ };
483
+ struct ValueTypeSetIt {
484
+ ValueTypeSet* set;
485
+ int bucket_index;
486
+ ValueTypeSetListIt it;
487
+ };
488
+
489
+ #define _ValueTypeSetCtor(self) ValueTypeSetCtor(&self)
490
+ #define _ValueTypeSetDtor(self) ValueTypeSetDtor(&self)
491
+ #define _ValueTypeSetIdentify(self) ValueTypeSetIdentify(&self)
492
+ #define _ValueTypeSetCopy(dst,src) ValueTypeSetCopy(&dst,&src)
493
+ #define _ValueTypeSetEqual(lt,rt) ValueTypeSetEqual(&lt,&rt)
494
+ #define _ValueTypeSetLess(lt,rt) ValueTypeSetLess(&lt,&rt)
495
+
496
+ AUTOC_EXTERN void ValueTypeSetCtor(ValueTypeSet*);
497
+ AUTOC_EXTERN void ValueTypeSetDtor(ValueTypeSet*);
498
+ AUTOC_EXTERN void ValueTypeSetCopy(ValueTypeSet*,ValueTypeSet*);
499
+ AUTOC_EXTERN int ValueTypeSetEqual(ValueTypeSet*,ValueTypeSet*);
500
+ AUTOC_EXTERN size_t ValueTypeSetIdentify(ValueTypeSet*);
501
+ AUTOC_EXTERN void ValueTypeSetPurge(ValueTypeSet*);
502
+ AUTOC_EXTERN int ValueTypeSetContains(ValueTypeSet*, ValueType);
503
+ AUTOC_EXTERN ValueType ValueTypeSetGet(ValueTypeSet*, ValueType);
504
+ AUTOC_EXTERN size_t ValueTypeSetSize(ValueTypeSet*);
505
+ #define ValueTypeSetEmpty(self) (ValueTypeSetSize(self) == 0)
506
+ AUTOC_EXTERN int ValueTypeSetPut(ValueTypeSet*, ValueType);
507
+ AUTOC_EXTERN int ValueTypeSetReplace(ValueTypeSet*, ValueType);
508
+ AUTOC_EXTERN int ValueTypeSetRemove(ValueTypeSet*, ValueType);
509
+ AUTOC_EXTERN void ValueTypeSetExclude(ValueTypeSet*, ValueTypeSet*);
510
+ AUTOC_EXTERN void ValueTypeSetRetain(ValueTypeSet*, ValueTypeSet*);
511
+ AUTOC_EXTERN void ValueTypeSetInclude(ValueTypeSet*, ValueTypeSet*);
512
+ AUTOC_EXTERN void ValueTypeSetInvert(ValueTypeSet*, ValueTypeSet*);
513
+ AUTOC_EXTERN void ValueTypeSetItCtor(ValueTypeSetIt*, ValueTypeSet*);
514
+ AUTOC_EXTERN int ValueTypeSetItMove(ValueTypeSetIt*);
515
+ AUTOC_EXTERN ValueType ValueTypeSetItGet(ValueTypeSetIt*);
516
+
517
+ /***
518
+ **** <ValueType*> (AutoC::Reference)
519
+ ***/
520
+ AUTOC_EXTERN ValueType* ValueTypeNew();
521
+ AUTOC_EXTERN ValueType* ValueTypeRef(ValueType*);
522
+ AUTOC_EXTERN void ValueTypeFree(ValueType*);
523
+
524
+ /***
525
+ **** ValueTypeList<ValueType> (AutoC::List)
526
+ ***/
527
+
528
+ typedef struct ValueTypeListNode ValueTypeListNode;
529
+ typedef struct ValueTypeList ValueTypeList;
530
+ typedef struct ValueTypeListIt ValueTypeListIt;
531
+ struct ValueTypeList {
532
+ ValueTypeListNode* head_node;
533
+ size_t node_count;
534
+ };
535
+ struct ValueTypeListIt {
536
+ int start;
537
+ ValueTypeList* list;
538
+ ValueTypeListNode* this_node;
539
+ };
540
+ struct ValueTypeListNode {
541
+ ValueType element;
542
+ ValueTypeListNode* next_node;
543
+ };
544
+
545
+ #define _ValueTypeListCtor(self) ValueTypeListCtor(&self)
546
+ #define _ValueTypeListDtor(self) ValueTypeListDtor(&self)
547
+ #define _ValueTypeListIdentify(self) ValueTypeListIdentify(&self)
548
+ #define _ValueTypeListCopy(dst,src) ValueTypeListCopy(&dst,&src)
549
+ #define _ValueTypeListEqual(lt,rt) ValueTypeListEqual(&lt,&rt)
550
+ #define _ValueTypeListLess(lt,rt) ValueTypeListLess(&lt,&rt)
551
+
552
+ AUTOC_EXTERN void ValueTypeListCtor(ValueTypeList*);
553
+ AUTOC_EXTERN void ValueTypeListDtor(ValueTypeList*);
554
+ AUTOC_EXTERN void ValueTypeListCopy(ValueTypeList*,ValueTypeList*);
555
+ AUTOC_EXTERN int ValueTypeListEqual(ValueTypeList*,ValueTypeList*);
556
+ AUTOC_EXTERN size_t ValueTypeListIdentify(ValueTypeList*);
557
+ AUTOC_EXTERN void ValueTypeListPurge(ValueTypeList*);
558
+ AUTOC_EXTERN ValueType ValueTypeListPeek(ValueTypeList*);
559
+ AUTOC_EXTERN ValueType ValueTypeListPop(ValueTypeList*);
560
+ AUTOC_EXTERN void ValueTypeListPush(ValueTypeList*, ValueType);
561
+ AUTOC_EXTERN int ValueTypeListContains(ValueTypeList*, ValueType);
562
+ AUTOC_EXTERN ValueType ValueTypeListFind(ValueTypeList*, ValueType);
563
+ #define ValueTypeListReplace(self, with) ValueTypeListReplaceEx(self, with, 1)
564
+ #define ValueTypeListReplaceAll(self, with) ValueTypeListReplaceEx(self, with, -1)
565
+ AUTOC_EXTERN int ValueTypeListReplaceEx(ValueTypeList*, ValueType, int);
566
+ #define ValueTypeListRemove(self, what) ValueTypeListRemoveEx(self, what, 1)
567
+ #define ValueTypeListRemoveAll(self, what) ValueTypeListRemoveEx(self, what, -1)
568
+ AUTOC_EXTERN int ValueTypeListRemoveEx(ValueTypeList*, ValueType, int);
569
+ AUTOC_EXTERN size_t ValueTypeListSize(ValueTypeList*);
570
+ #define ValueTypeListEmpty(self) (ValueTypeListSize(self) == 0)
571
+ AUTOC_EXTERN void ValueTypeListItCtor(ValueTypeListIt*, ValueTypeList*);
572
+ AUTOC_EXTERN int ValueTypeListItMove(ValueTypeListIt*);
573
+ AUTOC_EXTERN ValueType ValueTypeListItGet(ValueTypeListIt*);
574
+
575
+ /***
576
+ **** ValueTypeQueue<ValueType> (AutoC::Queue)
577
+ ***/
578
+
579
+ typedef struct ValueTypeQueueNode ValueTypeQueueNode;
580
+ typedef struct ValueTypeQueue ValueTypeQueue;
581
+ typedef struct ValueTypeQueueIt ValueTypeQueueIt;
582
+ struct ValueTypeQueue {
583
+ ValueTypeQueueNode* head_node;
584
+ ValueTypeQueueNode* tail_node;
585
+ size_t node_count;
586
+ };
587
+ struct ValueTypeQueueIt {
588
+ int start, forward;
589
+ ValueTypeQueue* queue;
590
+ ValueTypeQueueNode* this_node;
591
+ };
592
+ struct ValueTypeQueueNode {
593
+ ValueType element;
594
+ ValueTypeQueueNode* prev_node;
595
+ ValueTypeQueueNode* next_node;
596
+ };
597
+
598
+ #define _ValueTypeQueueCtor(self) ValueTypeQueueCtor(&self)
599
+ #define _ValueTypeQueueDtor(self) ValueTypeQueueDtor(&self)
600
+ #define _ValueTypeQueueIdentify(self) ValueTypeQueueIdentify(&self)
601
+ #define _ValueTypeQueueCopy(dst,src) ValueTypeQueueCopy(&dst,&src)
602
+ #define _ValueTypeQueueEqual(lt,rt) ValueTypeQueueEqual(&lt,&rt)
603
+ #define _ValueTypeQueueLess(lt,rt) ValueTypeQueueLess(&lt,&rt)
604
+
605
+ AUTOC_EXTERN void ValueTypeQueueCtor(ValueTypeQueue*);
606
+ AUTOC_EXTERN void ValueTypeQueueDtor(ValueTypeQueue*);
607
+ AUTOC_EXTERN void ValueTypeQueueCopy(ValueTypeQueue*,ValueTypeQueue*);
608
+ AUTOC_EXTERN int ValueTypeQueueEqual(ValueTypeQueue*,ValueTypeQueue*);
609
+ AUTOC_EXTERN size_t ValueTypeQueueIdentify(ValueTypeQueue*);
610
+ AUTOC_EXTERN void ValueTypeQueuePurge(ValueTypeQueue*);
611
+ #define ValueTypeQueuePeek(self) ValueTypeQueuePeekHead(self)
612
+ AUTOC_EXTERN ValueType ValueTypeQueuePeekHead(ValueTypeQueue*);
613
+ AUTOC_EXTERN ValueType ValueTypeQueuePeekTail(ValueTypeQueue*);
614
+ #define ValueTypeQueuePush(self, element) ValueTypeQueuePushTail(self, element)
615
+ AUTOC_EXTERN void ValueTypeQueuePushTail(ValueTypeQueue*, ValueType);
616
+ AUTOC_EXTERN void ValueTypeQueuePushHead(ValueTypeQueue*, ValueType);
617
+ #define ValueTypeQueuePop(self) ValueTypeQueuePopHead(self)
618
+ AUTOC_EXTERN ValueType ValueTypeQueuePopHead(ValueTypeQueue*);
619
+ AUTOC_EXTERN ValueType ValueTypeQueuePopTail(ValueTypeQueue*);
620
+ AUTOC_EXTERN int ValueTypeQueueContains(ValueTypeQueue*, ValueType);
621
+ AUTOC_EXTERN ValueType ValueTypeQueueFind(ValueTypeQueue*, ValueType);
622
+ #define ValueTypeQueueReplace(self, with) ValueTypeQueueReplaceEx(self, with, 1)
623
+ #define ValueTypeQueueReplaceAll(self, with) ValueTypeQueueReplaceEx(self, with, -1)
624
+ AUTOC_EXTERN int ValueTypeQueueReplaceEx(ValueTypeQueue*, ValueType, int);
625
+ #define ValueTypeQueueRemove(self, what) ValueTypeQueueRemoveEx(self, what, 1)
626
+ #define ValueTypeQueueRemoveAll(self, what) ValueTypeQueueRemoveEx(self, what, -1)
627
+ AUTOC_EXTERN int ValueTypeQueueRemoveEx(ValueTypeQueue*, ValueType, int);
628
+ AUTOC_EXTERN size_t ValueTypeQueueSize(ValueTypeQueue*);
629
+ #define ValueTypeQueueEmpty(self) (ValueTypeQueueSize(self) == 0)
630
+ AUTOC_EXTERN void ValueTypeQueueItCtor(ValueTypeQueueIt*, ValueTypeQueue*);
631
+ #define ValueTypeQueueItCtor(self, type) ValueTypeQueueItCtorEx(self, type, 1)
632
+ AUTOC_EXTERN void ValueTypeQueueItCtorEx(ValueTypeQueueIt*, ValueTypeQueue*, int);
633
+ AUTOC_EXTERN int ValueTypeQueueItMove(ValueTypeQueueIt*);
634
+ AUTOC_EXTERN ValueType ValueTypeQueueItGet(ValueTypeQueueIt*);
635
+
636
+ /***
637
+ **** PVectorValue<ValueType*> (AutoC::Vector)
638
+ ***/
639
+
640
+ typedef struct PVectorValue PVectorValue;
641
+ typedef struct PVectorValueIt PVectorValueIt;
642
+ struct PVectorValue {
643
+ ValueType** values;
395
644
  size_t element_count;
396
645
  };
397
- struct ValueTypeVectorIt {
398
- ValueTypeVector* vector;
646
+ struct PVectorValueIt {
647
+ PVectorValue* vector;
399
648
  int index;
400
649
  int forward;
401
650
  };
402
651
 
403
- AUTOC_EXTERN void ValueTypeVectorCtor(ValueTypeVector*, size_t);
404
- AUTOC_EXTERN void ValueTypeVectorDtor(ValueTypeVector*);
405
- AUTOC_EXTERN void ValueTypeVectorCopy(ValueTypeVector*, ValueTypeVector*);
406
- AUTOC_EXTERN int ValueTypeVectorEqual(ValueTypeVector*, ValueTypeVector*);
407
- AUTOC_EXTERN void ValueTypeVectorResize(ValueTypeVector*, size_t);
408
- AUTOC_EXTERN size_t ValueTypeVectorIdentify(ValueTypeVector*);
409
- AUTOC_INLINE size_t ValueTypeVectorSize(ValueTypeVector* self) {
652
+ #define _PVectorValueCtor(self,element_count) PVectorValueCtor(&self,element_count)
653
+ #define _PVectorValueDtor(self) PVectorValueDtor(&self)
654
+ #define _PVectorValueIdentify(self) PVectorValueIdentify(&self)
655
+ #define _PVectorValueCopy(dst,src) PVectorValueCopy(&dst,&src)
656
+ #define _PVectorValueEqual(lt,rt) PVectorValueEqual(&lt,&rt)
657
+ #define _PVectorValueLess(lt,rt) PVectorValueLess(&lt,&rt)
658
+
659
+ AUTOC_EXTERN void PVectorValueCtor(PVectorValue*,size_t);
660
+ AUTOC_EXTERN void PVectorValueDtor(PVectorValue*);
661
+ AUTOC_EXTERN void PVectorValueCopy(PVectorValue*,PVectorValue*);
662
+ AUTOC_EXTERN int PVectorValueEqual(PVectorValue*,PVectorValue*);
663
+ AUTOC_EXTERN size_t PVectorValueIdentify(PVectorValue*);
664
+ AUTOC_EXTERN void PVectorValueResize(PVectorValue*, size_t);
665
+ AUTOC_INLINE size_t PVectorValueSize(PVectorValue* self) {
410
666
  assert(self);
411
667
  return self->element_count;
412
668
  }
413
- AUTOC_INLINE int ValueTypeVectorWithin(ValueTypeVector* self, size_t index) {
669
+ AUTOC_INLINE int PVectorValueWithin(PVectorValue* self, size_t index) {
414
670
  assert(self);
415
- return index < ValueTypeVectorSize(self);
671
+ return index < PVectorValueSize(self);
416
672
  }
417
- AUTOC_INLINE ValueType ValueTypeVectorGet(ValueTypeVector* self, size_t index) {
418
- ValueType result;
673
+ AUTOC_INLINE ValueType* PVectorValueGet(PVectorValue* self, size_t index) {
674
+ ValueType* result;
419
675
  assert(self);
420
- assert(ValueTypeVectorWithin(self, index));
421
- ValueTypeCopy(result, self->values[index]);
676
+ assert(PVectorValueWithin(self, index));
677
+ ((result) = ValueTypeRef(self->values[index]));
422
678
  return result;
423
679
  }
424
- AUTOC_INLINE void ValueTypeVectorSet(ValueTypeVector* self, size_t index, ValueType value) {
680
+ AUTOC_INLINE void PVectorValueSet(PVectorValue* self, size_t index, ValueType* value) {
425
681
  assert(self);
426
- assert(ValueTypeVectorWithin(self, index));
427
- ValueTypeDtor(self->values[index]);
428
- ValueTypeCopy(self->values[index], value);
682
+ assert(PVectorValueWithin(self, index));
683
+ ValueTypeFree(self->values[index]);
684
+ ((self->values[index]) = ValueTypeRef(value));
429
685
  }
430
- AUTOC_EXTERN void ValueTypeVectorSort(ValueTypeVector*);
431
- #define ValueTypeVectorItCtor(self, type) ValueTypeVectorItCtorEx(self, type, 1)
432
- AUTOC_INLINE void ValueTypeVectorItCtorEx(ValueTypeVectorIt* self, ValueTypeVector* vector, int forward) {
686
+ #define PVectorValueItCtor(self, type) PVectorValueItCtorEx(self, type, 1)
687
+ AUTOC_INLINE void PVectorValueItCtorEx(PVectorValueIt* self, PVectorValue* vector, int forward) {
433
688
  assert(self);
434
689
  assert(vector);
435
690
  self->vector = vector;
436
691
  self->forward = forward;
437
- self->index = forward ? -1 : ValueTypeVectorSize(vector);
692
+ self->index = forward ? -1 : PVectorValueSize(vector);
438
693
  }
439
- AUTOC_INLINE int ValueTypeVectorItMove(ValueTypeVectorIt* self) {
694
+ AUTOC_INLINE int PVectorValueItMove(PVectorValueIt* self) {
440
695
  assert(self);
441
696
  if(self->forward) ++self->index;
442
697
  else --self->index;
443
- return ValueTypeVectorWithin(self->vector, self->index);
698
+ return PVectorValueWithin(self->vector, self->index);
444
699
  }
445
- AUTOC_INLINE ValueType ValueTypeVectorItGet(ValueTypeVectorIt* self) {
700
+ AUTOC_INLINE ValueType* PVectorValueItGet(PVectorValueIt* self) {
446
701
  assert(self);
447
- return ValueTypeVectorGet(self->vector, self->index);
702
+ return PVectorValueGet(self->vector, self->index);
448
703
  }
449
704
 
705
+ AUTOC_EXTERN void PVectorValueSort(PVectorValue*);
706
+
707
+ /***
708
+ **** <PVectorValue*> (AutoC::Reference)
709
+ ***/
710
+ AUTOC_EXTERN PVectorValue* PVectorValueNew(size_t);
711
+ AUTOC_EXTERN PVectorValue* PVectorValueRef(PVectorValue*);
712
+ AUTOC_EXTERN void PVectorValueFree(PVectorValue*);
713
+
714
+ /***
715
+ **** ListPVectorValue<PVectorValue*> (AutoC::List)
716
+ ***/
717
+
718
+ typedef struct ListPVectorValueNode ListPVectorValueNode;
719
+ typedef struct ListPVectorValue ListPVectorValue;
720
+ typedef struct ListPVectorValueIt ListPVectorValueIt;
721
+ struct ListPVectorValue {
722
+ ListPVectorValueNode* head_node;
723
+ size_t node_count;
724
+ };
725
+ struct ListPVectorValueIt {
726
+ int start;
727
+ ListPVectorValue* list;
728
+ ListPVectorValueNode* this_node;
729
+ };
730
+ struct ListPVectorValueNode {
731
+ PVectorValue* element;
732
+ ListPVectorValueNode* next_node;
733
+ };
734
+
735
+ #define _ListPVectorValueCtor(self) ListPVectorValueCtor(&self)
736
+ #define _ListPVectorValueDtor(self) ListPVectorValueDtor(&self)
737
+ #define _ListPVectorValueIdentify(self) ListPVectorValueIdentify(&self)
738
+ #define _ListPVectorValueCopy(dst,src) ListPVectorValueCopy(&dst,&src)
739
+ #define _ListPVectorValueEqual(lt,rt) ListPVectorValueEqual(&lt,&rt)
740
+ #define _ListPVectorValueLess(lt,rt) ListPVectorValueLess(&lt,&rt)
741
+
742
+ AUTOC_EXTERN void ListPVectorValueCtor(ListPVectorValue*);
743
+ AUTOC_EXTERN void ListPVectorValueDtor(ListPVectorValue*);
744
+ AUTOC_EXTERN void ListPVectorValueCopy(ListPVectorValue*,ListPVectorValue*);
745
+ AUTOC_EXTERN int ListPVectorValueEqual(ListPVectorValue*,ListPVectorValue*);
746
+ AUTOC_EXTERN size_t ListPVectorValueIdentify(ListPVectorValue*);
747
+ AUTOC_EXTERN void ListPVectorValuePurge(ListPVectorValue*);
748
+ AUTOC_EXTERN PVectorValue* ListPVectorValuePeek(ListPVectorValue*);
749
+ AUTOC_EXTERN PVectorValue* ListPVectorValuePop(ListPVectorValue*);
750
+ AUTOC_EXTERN void ListPVectorValuePush(ListPVectorValue*, PVectorValue*);
751
+ AUTOC_EXTERN int ListPVectorValueContains(ListPVectorValue*, PVectorValue*);
752
+ AUTOC_EXTERN PVectorValue* ListPVectorValueFind(ListPVectorValue*, PVectorValue*);
753
+ #define ListPVectorValueReplace(self, with) ListPVectorValueReplaceEx(self, with, 1)
754
+ #define ListPVectorValueReplaceAll(self, with) ListPVectorValueReplaceEx(self, with, -1)
755
+ AUTOC_EXTERN int ListPVectorValueReplaceEx(ListPVectorValue*, PVectorValue*, int);
756
+ #define ListPVectorValueRemove(self, what) ListPVectorValueRemoveEx(self, what, 1)
757
+ #define ListPVectorValueRemoveAll(self, what) ListPVectorValueRemoveEx(self, what, -1)
758
+ AUTOC_EXTERN int ListPVectorValueRemoveEx(ListPVectorValue*, PVectorValue*, int);
759
+ AUTOC_EXTERN size_t ListPVectorValueSize(ListPVectorValue*);
760
+ #define ListPVectorValueEmpty(self) (ListPVectorValueSize(self) == 0)
761
+ AUTOC_EXTERN void ListPVectorValueItCtor(ListPVectorValueIt*, ListPVectorValue*);
762
+ AUTOC_EXTERN int ListPVectorValueItMove(ListPVectorValueIt*);
763
+ AUTOC_EXTERN PVectorValue* ListPVectorValueItGet(ListPVectorValueIt*);
764
+
450
765
  #endif