cereal
A C++11 library for serialization
|
A static, pre-execution object. More...
#include </build/libcereal-SAfJB3/libcereal-1.3.2+dfsg/include/cereal/details/static_object.hpp>
Classes | |
class | LockGuard |
A class that acts like std::lock_guard. More... | |
Static Public Member Functions | |
static T & | getInstance () |
static LockGuard | lock () |
Attempts to lock this static object for the current scope. More... | |
A static, pre-execution object.
This class will create a single copy (singleton) of some type and ensures that merely referencing this type will cause it to be instantiated and initialized pre-execution. For example, this is used heavily in the polymorphic pointer serialization mechanisms to bind various archive types with different polymorphic classes
|
inlinestatic |
Attempts to lock this static object for the current scope.
This function returns an object that holds a lock for this StaticObject that will release its lock upon destruction. This call will block until the lock is available.