Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
propertyblock.h
Go to the documentation of this file.
1 #pragma once
2 
11 #include "base/src/base.h"
12 
13 namespace models {
15 
18  class PropertyBlock {
19  public:
21  PropertyBlock() : referenceCount_(0) { }
22 
24  void incrementReference() const { ++referenceCount_; }
26  ULong decrementReference() const { assert(referenceCount_); --referenceCount_; return referenceCount_; }
27 
28  private:
29  mutable ULong referenceCount_;
30  };
31 } // namespace models
32 
34 // EoF
unsigned __int64 ULong
unsigned 64 bit
Definition: basedef.h:37
The Constitutive Model interface library.
Definition: conmodel.cpp:7
void incrementReference() const
Increment reference count.
Definition: propertyblock.h:24
ULong decrementReference() const
Decrement reference count.
Definition: propertyblock.h:26
The class provides reference count for model properties.
Definition: propertyblock.h:18
One stop include for all objects defined as part of base interface.
PropertyBlock()
Constructor, initialize reference count to zero.
Definition: propertyblock.h:21