Lines Matching refs:Impl
42 typedef std::map<K, PersistentContainerValue> Impl;
43 typedef typename Impl::iterator Iterator;
45 static bool Empty(Impl* impl) { return impl->empty(); }
46 static size_t Size(Impl* impl) { return impl->size(); }
47 static void Swap(Impl& a, Impl& b) { std::swap(a, b); } // NOLINT
48 static Iterator Begin(Impl* impl) { return impl->begin(); }
49 static Iterator End(Impl* impl) { return impl->end(); }
52 static PersistentContainerValue Set(Impl* impl, K key,
54 std::pair<Iterator, bool> res = impl->insert(std::make_pair(key, value));
62 static PersistentContainerValue Get(Impl* impl, K key) {
63 Iterator it = impl->find(key);
64 if (it == impl->end()) return kPersistentContainerNotFound;
67 static PersistentContainerValue Remove(Impl* impl, K key) {
68 Iterator it = impl->find(key);
69 if (it == impl->end()) return kPersistentContainerNotFound;
71 impl->erase(it);
224 typename Traits::Impl impl;
225 Traits::Swap(impl_, impl);
226 for (It i = Traits::Begin(&impl); i != Traits::End(&impl); ++i) {
295 typename Traits::Impl* impl() { return &impl_; }
347 typename Traits::Impl impl_;
389 Traits::Set(this->impl(), key, this->ClearAndLeak(persistent));
461 Traits::Set(this->impl(), key, this->ClearAndLeak(persistent));
528 typedef std::vector<PersistentContainerValue> Impl;
530 static void Append(Impl* impl, PersistentContainerValue value) {
531 impl->push_back(value);
533 static bool IsEmpty(const Impl* impl) {
534 return impl->empty();
536 static size_t Size(const Impl* impl) {
537 return impl->size();
539 static PersistentContainerValue Get(const Impl* impl, size_t i) {
540 return (i < impl->size()) ? impl->at(i) : kPersistentContainerNotFound;
542 static void ReserveCapacity(Impl* impl, size_t capacity) {
543 impl->reserve(capacity);
545 static void Clear(Impl* impl) {
546 impl->clear();
638 typename Traits::Impl impl_;