mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
SingletonPtr< T > Struct Template Reference
[SingletonPtr class]
Utility class for creating an using a singleton. More...
#include <SingletonPtr.h>
Public Member Functions | |
T * | get () const |
Get a pointer to the underlying singleton. | |
T * | operator-> () const |
Get a pointer to the underlying singleton. | |
T & | operator* () const |
Get a reference to the underlying singleton. | |
T * | get () const |
Get a pointer to the underlying singleton. | |
T * | operator-> () const |
Get a pointer to the underlying singleton. | |
T & | operator* () const |
Get a reference to the underlying singleton. |
Detailed Description
template<class T>
struct SingletonPtr< T >
Utility class for creating an using a singleton.
- Note:
- Synchronization level: Thread safe
- : This class must only be used in a static context - this class must never be allocated or created on the stack.
- : This class is lazily initialized on first use. This class is a POD type so if it is not used it will be garbage collected.
Definition at line 86 of file cmsis/BUILD/mbed/platform/SingletonPtr.h.
Member Function Documentation
T* get | ( | ) | const |
Get a pointer to the underlying singleton.
- Returns:
- A pointer to the singleton
Definition at line 93 of file cmsis/BUILD/mbed/platform/SingletonPtr.h.
T* get | ( | ) | const |
Get a pointer to the underlying singleton.
- Returns:
- A pointer to the singleton
Definition at line 93 of file platform/SingletonPtr.h.
T& operator* | ( | ) | const |
Get a reference to the underlying singleton.
- Returns:
- A reference to the singleton
Definition at line 123 of file platform/SingletonPtr.h.
T& operator* | ( | ) | const |
Get a reference to the underlying singleton.
- Returns:
- A reference to the singleton
Definition at line 123 of file cmsis/BUILD/mbed/platform/SingletonPtr.h.
T* operator-> | ( | ) | const |
Get a pointer to the underlying singleton.
- Returns:
- A pointer to the singleton
Definition at line 113 of file cmsis/BUILD/mbed/platform/SingletonPtr.h.
T* operator-> | ( | ) | const |
Get a pointer to the underlying singleton.
- Returns:
- A pointer to the singleton
Definition at line 113 of file platform/SingletonPtr.h.
Generated on Tue Jul 12 2022 20:41:17 by 1.7.2