12 #ifndef G3D_WeakCache_h
13 #define G3D_WeakCache_h
50 template<
class Key,
class ValueRef>
64 ValueWeakRef w = table[k];
65 ValueRef s = w.lock();
81 for (
int i = 0; i < keys.
size(); ++i) {
82 ValueRef
value = (*this)[keys[i]];
93 void set(
const Key& k, ValueRef v) {
98 void remove(
const Key& k) {
bool notNull(const Pointer< T > &p)
Definition: Pointer.h:350
void clear()
Definition: Table.h:578
Dynamic 1D array tuned for performance.
Definition: Array.h:95
void set(const Key &key, const Value &value)
Definition: Table.h:599
void clear()
Definition: WeakCache.h:89
Definition: WeakCache.h:51
bool remove(const Key &key, Key &removedKey, Value &removedValue, bool updateRemoved)
Definition: Table.h:606
int size() const
Definition: Array.h:430
Table< Key, ValueWeakRef > table
Definition: WeakCache.h:56
void set(const Key &k, ValueRef v)
Definition: WeakCache.h:93
ValueRef operator[](const Key &k)
Definition: WeakCache.h:62
weak_ptr< typename ValueRef::element_type > ValueWeakRef
Definition: WeakCache.h:52
Array< Key > getKeys() const
Definition: Table.h:907
const FieldDescriptor value
Definition: descriptor.h:1522
void append(const T &value)
Definition: Array.h:583
void getValues(Array< ValueRef > &values)
Definition: WeakCache.h:78
bool containsKey(const Key &key) const
Definition: Table.h:874