template<typename T>
class openfluid::utils::MeyerSingleton< T >
Singleton template class implementing the Meyer's singleton design. This implementation is thread safe in C++11.
- Warning
- This template class does not work in a cross-dll context on Windows. Due to this restriction, it must not be used in the OpenFLUID framework.
Example of use to design an Example class as a singleton
{
private:
MeyerExample();
~MeyerExample();
public:
};
#include <utils/MeyerSingleton.hpp>
◆ MeyerSingleton()
◆ instance()
Returns a pointer to the singleton object. Instantiates the class if it not has not been instantiated before.
- Returns
- A pointer to the singleton object
The documentation for this class was generated from the following file: