Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
GCE2d_MakeArcOfEllipse.hxx File Reference

Deprecated compatibility alias. More...

Macros

#define Standard_DEPRECATED_STD(theMsg)
 Marks a declaration as deprecated using the standard C++ [[deprecated]] attribute. Use this instead of Standard_DEPRECATED in contexts where only standard C++ attributes are grammatically valid, such as using-alias declarations: using OldName Standard_DEPRECATED_STD("msg") = NewName; MSVC rejects declspec(deprecated) and GCC/Clang reject __attribute((deprecated)) when placed between the alias name and the = token, so Standard_DEPRECATED cannot be used there. If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED_STD is defined empty.

Variables

class Standard_Mutex is deprecated
 Mutex: a class to synchronize access to shared data.

Detailed Description

Deprecated compatibility alias.

Deprecated
This header is deprecated since OCCT 8.0.0. Use GC_MakeArcOfEllipse2d.hxx instead.

Macro Definition Documentation

◆ Standard_DEPRECATED_STD

#define Standard_DEPRECATED_STD ( theMsg)

Marks a declaration as deprecated using the standard C++ [[deprecated]] attribute. Use this instead of Standard_DEPRECATED in contexts where only standard C++ attributes are grammatically valid, such as using-alias declarations: using OldName Standard_DEPRECATED_STD("msg") = NewName; MSVC rejects declspec(deprecated) and GCC/Clang reject __attribute((deprecated)) when placed between the alias name and the = token, so Standard_DEPRECATED cannot be used there. If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED_STD is defined empty.

Variable Documentation

◆ deprecated

class Standard_Mutex is deprecated

Mutex: a class to synchronize access to shared data.

Deprecated
This class is deprecated and will be removed in OCCT 8.0.0. Use std::mutex or std::shared_mutex directly instead.

This is simple encapsulation of tools provided by the operating system to synchronize access to shared data from threads within one process.

Current implementation is very simple and straightforward; it is just a wrapper around POSIX pthread library on UNIX/Linux, and CRITICAL_SECTIONs on Windows NT. It does not provide any advanced functionality such as recursive calls to the same mutex from within one thread (such call will freeze the execution).

Note that all the methods of that class are made inline, in order to keep maximal performance. This means that a library using the mutex might need to be linked to threads library directly.

The typical use of this class should be as follows:

  • create instance of the class Standard_Mutex in the global scope (whenever possible, or as a field of your class)
  • create instance of class Standard_Mutex::Sentry using that Mutex when entering critical section

Note that this class provides one feature specific to Open CASCADE: safe unlocking the mutex when signal is raised and converted to OCC exceptions (Note that with current implementation of this functionality on UNIX and Linux, C longjumps are used for that, thus destructors of classes are not called automatically).

To use this feature, call RegisterCallback() after Lock() or successful TryLock(), and UnregisterCallback() before Unlock() (or use Sentry classes).