MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / FluxSourceIteratorHolder

Class FluxSourceIteratorHolder

lib/algorithms/readerwriter.cc:164–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 * held). This class handles that. */
163
164class FluxSourceIteratorHolder
165{
166public:
167 FluxSourceIteratorHolder(FluxSource& fluxSource): _fluxSource(fluxSource) {}
168
169 FluxSourceIterator& getIterator(unsigned physicalCylinder, unsigned head)
170 {
171 auto& it = _cache[std::make_pair(physicalCylinder, head)];
172 if (!it)
173 it = _fluxSource.readFlux(physicalCylinder, head);
174 return *it;
175 }
176
177private:
178 FluxSource& _fluxSource;
179 std::map<std::pair<unsigned, unsigned>, std::unique_ptr<FluxSourceIterator>>
180 _cache;
181};
182
183static nanoseconds_t getRotationalPeriodFromConfig()
184{

Callers

nothing calls this directly

Calls 1

readFluxMethod · 0.45

Tested by

no test coverage detected