#include <bookkeeping.hh>
◆ MapType
◆ at()
296 {
297 boost::mutex::scoped_lock
const lock(
mut);
298 auto i =
map.find(k);
299
301 {
303 if(pv)
304 {
305 return Detail::LValue<V>(pv);
306 }
307 }
308
309 throw std::invalid_argument("Invalid key");
310 }
std::shared_ptr< ValueType< V > > Ptr
Definition bookkeepingimpl.hh:120
MapType map
Definition bookkeeping.hh:78
boost::mutex mut
Definition bookkeeping.hh:79
◆ get()
333 {
334 boost::mutex::scoped_lock
const lock(
mut);
335 auto i =
map.find(k);
336
338 {
340 if(pv)
341 {
342 return pv->value;
343 }
344 }
345
346 throw std::invalid_argument("Invalid key");
347 }
◆ keys()
351 {
352 boost::mutex::scoped_lock
const lock(
mut);
354 for(
const typename MapType::value_type&
el:
map)
355 {
357 }
359 }
SampleIterator< const uint8_t > result
Definition sampleiterator-tests.cc:94
◆ remove() [1/2]
284 {
285 boost::mutex::scoped_lock lock(
mut);
286 typename MapType::iterator i =
map.find(k);
287
289 {
291 }
292 }
◆ remove() [2/2]
259 {
260 boost::mutex::scoped_lock
const lock(
mut);
261 auto i =
map.find(k);
262
264 {
266 if(pv)
267 {
268 Token
const t(
wt.lock());
269 Token
const t_orig(pv->token.lock());
271 {
273 }
274 }
275 else
276 {
278 }
279 }
280 }
◆ reReserve()
229 {
230 boost::mutex::scoped_lock
const lock(
mut);
231 auto i =
map.find(k);
232
234 {
237 }
238
240 if(!pv)
241 {
243 i->second = pv;
244 }
245
246 Token
t(pv->token.lock());
248 {
252 }
253
255 }
static Scroom::Bookkeeping::Token create()
Definition bookkeepingimpl.hh:65
std::weak_ptr< ValueType< V > > WeakPtr
Definition bookkeepingimpl.hh:121
static Ptr create(V value)
Definition bookkeepingimpl.hh:134
std::shared_ptr< R > shared_from_this()
Definition utilities.hh:48
ThreadPtr add()
Definition threadpoolimpl.cc:241
◆ reserve()
211 {
212 boost::mutex::scoped_lock
const lock(
mut);
213 if(
map.end() !=
map.find(k))
214 {
215 throw std::invalid_argument("Key already exists");
216 }
217
220
225 }
◆ set()
314 {
315 boost::mutex::scoped_lock
const lock(
mut);
316 auto i =
map.find(k);
317
319 {
321 if(pv)
322 {
324 return;
325 }
326 }
327
328 throw std::invalid_argument("Invalid key");
329 }
◆ values()
363 {
364 boost::mutex::scoped_lock
const lock(
mut);
366 for(
const typename MapType::value_type&
el:
map)
367 {
369 if(pv)
370 {
371 result.push_back(pv->value);
372 }
373 }
375 }
◆ map
template<typename K , typename
V >
◆ mut
The documentation for this class was generated from the following files: