#endif
#endif
+//! @def Standard_ATOMIC
+//! Definition of Standard_ATOMIC for C++11 or visual studio that supports it.
+//! Before usage there must be "atomic" included in the following way:
+//! #ifdef Standard_HASATOMIC
+//! #include <atomic>
+//! #endif
+#if (defined(__cplusplus) && __cplusplus >= 201100L) || (defined(_MSC_VER) && _MSC_VER >= 1800) || \
+ (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)))
+ #define Standard_HASATOMIC
+ #define Standard_ATOMIC(theType) std::atomic<theType>
+#else
+ #define Standard_ATOMIC(theType) theType
+#endif
+
+
#endif
#include <TDF_HAllocator.hxx>
#include <NCollection_DefineAlloc.hxx>
+#ifdef Standard_HASATOMIC
+ #include <atomic>
+#endif
+
class TDF_Attribute;
class TDF_AttributeIterator;
class TDF_ChildIterator;
// Private Fields
// --------------------------------------------------------------------------
- TDF_LabelNodePtr myFather;
- TDF_LabelNodePtr myBrother;
- TDF_LabelNodePtr myFirstChild;
- TDF_LabelNodePtr myLastFoundChild; //jfa 10.01.2003
- Standard_Integer myTag;
- Standard_Integer myFlags; // Flags & Depth
- Handle(TDF_Attribute) myFirstAttribute;
+ TDF_LabelNodePtr myFather;
+ TDF_LabelNodePtr myBrother;
+ TDF_LabelNodePtr myFirstChild;
+ Standard_ATOMIC(TDF_LabelNodePtr) myLastFoundChild; //jfa 10.01.2003
+ Standard_Integer myTag;
+ Standard_Integer myFlags; // Flags & Depth
+ Handle(TDF_Attribute) myFirstAttribute;
#ifdef KEEP_LOCAL_ROOT
- TDF_Data * myData;
+ TDF_Data * myData;
#endif
#ifdef OCCT_DEBUG
TCollection_AsciiString myDebugEntry;