diff options
-rw-r--r-- | libadhocutil/globalStatic.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libadhocutil/globalStatic.h b/libadhocutil/globalStatic.h index 544cc1e..d379146 100644 --- a/libadhocutil/globalStatic.h +++ b/libadhocutil/globalStatic.h @@ -2,9 +2,17 @@ #define ADHOCUTIL_GLOBALSTATIC_H namespace AdHoc { + /** + * Wrapper class for initialising/destroying a global static object via + * __attribute__ constructor/destructor. + */ template<typename Object> class GlobalStatic { public: + /** + * Get the contained object. + * @return The object. + */ static Object * get(); private: |