~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSStorage.h

  • Committer: Brian Aker
  • Date: 2010-10-27 20:29:24 UTC
  • mfrom: (1883 staging)
  • mto: This revision was merged to the branch mainline in revision 1885.
  • Revision ID: brian@tangent.org-20101027202924-7o9s4nhvqgj9oskq
Merge with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        /* Value is returned NOT referenced. */
52
52
        CSObject *find(CSObject *key);
53
53
        
54
 
        void remove(CSObject *key);
 
54
        bool remove(CSObject *key);
55
55
 
56
56
private:
57
57
        uint32_t iSize;
100
100
 
101
101
class CSLinkedItem : public CSRefObject {
102
102
public:
103
 
        CSLinkedItem(): CSRefObject() { }
 
103
        CSLinkedItem(): CSRefObject(), iNextLink(NULL), iPrevLink(NULL) { }
104
104
        virtual ~CSLinkedItem() { }
105
105
 
106
106
        virtual CSObject *getNextLink() { return iNextLink; }
129
129
 
130
130
        /* Value must be given referenced. */
131
131
        void addFront(CSObject *item);
 
132
        void addBack(CSObject *item);
132
133
 
133
134
        bool remove(CSObject *item);
134
135
 
149
150
        CSObject *iListBack;
150
151
};
151
152
 
 
153
class CSSyncLinkedList : public CSLinkedList, public CSSync {
 
154
public:
 
155
        CSSyncLinkedList(): CSLinkedList(), CSSync() { }
 
156
};
 
157
 
152
158
class CSVector : public CSObject {
153
159
public:
154
160
        CSVector(uint32_t growSize): iGrowSize(growSize), iMaxSize(0), iUsage(0), iArray(NULL) { }
216
222
 
217
223
        void clear();
218
224
 
219
 
        CSObject *take(uint32_t idx);
 
225
        CSObject *take(uint32_t sparse_idx);
220
226
 
221
 
        void remove(uint32_t idx);
 
227
        void remove(uint32_t sparse_idx);
222
228
 
223
229
        void removeFirst();
224
230
 
225
231
        CSObject *itemAt(uint32_t idx);
226
232
 
227
 
        CSObject *get(uint32_t idx);
228
 
        
229
 
        uint32_t getIndex(uint32_t idx);
230
 
        
231
 
        void set(uint32_t idx, CSObject *);
 
233
        CSObject *get(uint32_t sparse_idx);
 
234
        
 
235
        uint32_t getIndex(uint32_t sparse_idx);
 
236
        
 
237
        void set(uint32_t sparse_idx, CSObject *);
232
238
 
233
239
        uint32_t size() { return iUsage; }
234
240