15#include "shared/src/blockmemset.h"
31 const T *
claim(
const T &t);
36 BlockMemSet<T> properties_;
40 auto i = properties_.insert(in);
41 const T &t = *i.first;
42 t.incrementReference();
48 auto i = properties_.find(*t);
49 assert(i!=properties_.end());
52 if (!found.decrementReference())
This class allows zones to share model properties minimizing memery usage. Models currently using thi...
Definition sharedpropertyblock.h:23
const T * claim(const T &t)
Add property t to the property set and increase the property reference count (See SharedProperty).
Definition sharedpropertyblock.h:39
SharedPropertyBlock()
Constructor.
Definition sharedpropertyblock.h:26
void release(const T *t)
Decreases property t reference count. If the properrty reference reaches zero, removes property from ...
Definition sharedpropertyblock.h:46
virtual ~SharedPropertyBlock()
Destructor.
Definition sharedpropertyblock.h:28
The Constitutive Model interface library.
Definition conmodel.cpp:7
This class provides reference count for model properties.