24 #ifndef PXR_BASE_TF_REF_COUNT_H
25 #define PXR_BASE_TF_REF_COUNT_H
38 template <
typename T>
class TfRefPtr;
95 bool _DecrementAndTestIfZero()
const {
96 return (--_counter == 0);
100 int _FetchAndAdd(
int amount)
const {
101 return _counter.fetch_add(amount);
105 mutable std::atomic<int> _counter;
113 #endif // PXR_BASE_TF_REF_COUNT_H
TfRefCount()
Initialize counter to one.
const TfRefCount & operator=(const TfRefCount &) const
Assignment to a reference counter has no effect.
TfRefCount(const TfRefCount &)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
int Get() const
Returns counter's value.