#include <explicit_storage.hh>
Public Member Functions | |
void | invalidate () |
bool | is_valid () |
std::string | to_string () |
Public Attributes | |
size_t | hres |
size_t | id |
This class is a constant-sized short representation of state stored in an instance of explicit_storage_t.
explicit_storage_t guaranties that this reference is a unique identifier of a state for each instance of explicit_storage_t.
Operators ==, !=, <, <= and > and >= are defined for this class.
References are also useful in distributed environment in a connection with the identifier of computer that keeps the referenced state. It suffices to send a reference and computer ID instead of relatively long explicit representation of a state.
void invalidate | ( | ) |
Invalidates the reference, i.e. make it hold an invalid value.
bool is_valid | ( | ) |
Tests whether the reference holds a valid value or not.