Fixed a lazySlot bug where lazy slots in different objects end up pointing to the...
[io/quag.git] / libs / iovm / source / IoMap.h
blob42fc492814678e43a8488a4972d8caf8ee40acc3
1 /*#io
2 docCopyright("Steve Dekorte", 2002)
3 docLicense("BSD revised")
4 */
6 #ifndef IoMap_DEFINED
7 #define IoMap_DEFINED 1
9 #include "Common.h"
10 #include "IoObject.h"
11 #include "IoList.h"
12 #include "PHash.h"
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
18 #define ISMAP(self) IoObject_hasCloneFunc_(self, (IoTagCloneFunc *)IoMap_rawClone)
20 typedef IoObject IoMap;
22 IoMap *IoMap_proto(void *state);
23 IoMap *IoMap_rawClone(IoMap *self);
24 IoMap *IoMap_new(void *state);
25 void IoMap_free(IoMap *self);
26 void IoMap_mark(IoMap *self);
27 PHash *IoMap_rawHash(IoMap *self);
29 void IoMap_writeToStream_(IoMap *self, BStream *stream);
30 void IoMap_readFromStream_(IoMap *self, BStream *stream);
32 // -----------------------------------------------------------
34 IoObject *IoMap_empty(IoMap *self, IoObject *locals, IoMessage *m);
36 IOVM_API IoObject *IoMap_rawAt(IoMap *self, IoSymbol *k);
37 IOVM_API IoObject *IoMap_at(IoMap *self, IoObject *locals, IoMessage *m);
39 void IoMap_rawAtPut(IoMap *self, IoSymbol *k, IoObject *v);
40 IoObject *IoMap_atPut(IoMap *self, IoObject *locals, IoMessage *m);
41 IoObject *IoMap_atIfAbsentPut(IoMap *self, IoObject *locals, IoMessage *m);
42 IoObject *IoMap_removeAt(IoMap *self, IoObject *locals, IoMessage *m);
43 IoObject *IoMap_size(IoMap *self, IoObject *locals, IoMessage *m);
45 IoObject *IoMap_hasKey(IoMap *self, IoObject *locals, IoMessage *m);
46 IoObject *IoMap_hasValue(IoMap *self, IoObject *locals, IoMessage *m);
48 IOVM_API IoList *IoMap_rawKeys(IoMap *self);
49 IoObject *IoMap_keys(IoMap *self, IoObject *locals, IoMessage *m);
51 IoObject *IoMap_values(IoMap *self, IoObject *locals, IoMessage *m);
52 IoObject *IoMap_foreach(IoMap *self, IoObject *locals, IoMessage *m);
54 #ifdef __cplusplus
56 #endif
57 #endif