Lines Matching defs:store
1 //===-- A data structure for a fixed capacity data store --------*- C++ -*-===//
20 // A fixed size data store backed by an underlying cpp::array data structure. It
23 cpp::array<T, CAPACITY> store;
31 : store{}, item_count{} {
39 : store{}, item_count{} {
46 : store{}, item_count{} {
55 store[item_count] = obj;
62 return store[item_count - 1];
67 return store[item_count - 1];
73 inline_memset(&store[item_count - 1], 0, sizeof(T));
80 return store[idx];
85 return store[idx];
92 // Empties the store for all practical purposes.
94 inline_memset(store.data(), 0, sizeof(T) * item_count);
98 // This static method does not free up the resources held by |store|,
106 LIBC_INLINE static void destroy(FixedVector<T, CAPACITY> *store) {
107 store->reset();
112 return reverse_iterator{&store[item_count]};
114 LIBC_INLINE constexpr reverse_iterator rend() { return store.rend(); }
116 LIBC_INLINE constexpr iterator begin() { return store.begin(); }
117 LIBC_INLINE constexpr iterator end() { return iterator{&store[item_count]}; }
119 LIBC_INLINE constexpr const_iterator begin() const { return store.begin(); }
121 return const_iterator{&store[item_count]};