WPILibC++  2020.3.2-60-g3011ebe
wpi::ManagedStatic< C, Creator, Deleter > Class Template Reference

ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on demand (good for reducing startup times of dynamic libraries that link in LLVM components) and for making destruction be explicit through the wpi_shutdown() function call. More...

#include <ManagedStatic.h>

Inheritance diagram for wpi::ManagedStatic< C, Creator, Deleter >:
wpi::ManagedStaticBase

Public Member Functions

 ManagedStatic (C *created, void(*deleter)(void *))
 
C & operator* ()
 
C * operator-> ()
 
const C & operator* () const
 
const C * operator-> () const
 
- Public Member Functions inherited from wpi::ManagedStaticBase
bool isConstructed () const
 isConstructed - Return true if this object has not been created yet.
 
void destroy () const
 

Additional Inherited Members

- Protected Member Functions inherited from wpi::ManagedStaticBase
void RegisterManagedStatic (void *(*creator)(), void(*deleter)(void *)) const
 
void RegisterManagedStatic (void *created, void(*deleter)(void *)) const
 
- Protected Attributes inherited from wpi::ManagedStaticBase
std::atomic< void * > Ptr
 
void(* DeleterFn )(void *)
 
const ManagedStaticBaseNext
 

Detailed Description

template<class C, class Creator = object_creator<C>, class Deleter = object_deleter<C>>
class wpi::ManagedStatic< C, Creator, Deleter >

ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on demand (good for reducing startup times of dynamic libraries that link in LLVM components) and for making destruction be explicit through the wpi_shutdown() function call.


The documentation for this class was generated from the following file: