22#include " nix/util/archive.hh"
33#include " nix/util/callback.hh"
44#include " nix/util/memory-source-accessor.hh"
5- #include " nix/store/dummy-store.hh"
5+ #include " nix/store/dummy-store-impl .hh"
66
77#include < boost/unordered/concurrent_flat_map.hpp>
88
@@ -108,23 +108,14 @@ class WholeStoreViewAccessor : public SourceAccessor
108108
109109} // namespace
110110
111- struct DummyStore : virtual Store
111+ ref<Store> DummyStoreConfig::openStore () const
112112{
113- using Config = DummyStoreConfig;
114-
115- ref<const Config> config;
116-
117- struct PathInfoAndContents
118- {
119- UnkeyedValidPathInfo info;
120- ref<MemorySourceAccessor> contents;
121- };
113+ return openDummyStore ();
114+ }
122115
123- /* *
124- * This is map conceptually owns the file system objects for each
125- * store object.
126- */
127- boost::concurrent_flat_map<StorePath, PathInfoAndContents> contents;
116+ struct DummyStoreImpl : DummyStore
117+ {
118+ using Config = DummyStoreConfig;
128119
129120 /* *
130121 * This view conceptually just borrows the file systems objects of
@@ -135,9 +126,9 @@ struct DummyStore : virtual Store
135126 */
136127 ref<WholeStoreViewAccessor> wholeStoreView = make_ref<WholeStoreViewAccessor>();
137128
138- DummyStore (ref<const Config> config)
129+ DummyStoreImpl (ref<const Config> config)
139130 : Store{*config}
140- , config(config)
131+ , DummyStore{ config}
141132 {
142133 wholeStoreView->setPathDisplay (config->storeDir );
143134 }
@@ -294,9 +285,9 @@ struct DummyStore : virtual Store
294285 }
295286};
296287
297- ref<Store > DummyStore::Config::openStore () const
288+ ref<DummyStore > DummyStore::Config::openDummyStore () const
298289{
299- return make_ref<DummyStore >(ref{shared_from_this ()});
290+ return make_ref<DummyStoreImpl >(ref{shared_from_this ()});
300291}
301292
302293static RegisterStoreImplementation<DummyStore::Config> regDummyStore;
0 commit comments