Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions | Data Fields
SingletonPtr< T > Struct Template Reference

#include <SingletonPtr.h>

Public Member Functions

T * get ()
 
T * operator-> ()
 

Data Fields

T * _ptr
 
uint32_t _data [(sizeof(T)+sizeof(uint32_t)-1)/sizeof(uint32_t)]
 

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.

Member Function Documentation

template<class T>
T* SingletonPtr< T >::get ( )
inline

Get a pointer to the underlying singleton

Returns
A pointer to the singleton
template<class T>
T* SingletonPtr< T >::operator-> ( )
inline

Get a pointer to the underlying singleton

Returns
A pointer to the singleton

The documentation for this struct was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.