Class VersionedString
Defined in File VersionedString.hpp
Nested Relationships
Nested Types
Class Documentation
-
class VersionedString
Public Functions
-
VersionedString(std::string initial_value)
Construct a versioned string
- Parameters:
initial_value – [in] The initial value of this versioned string
-
void update(std::string new_value)
Update the value of this versioned string
- Parameters:
new_value – [in] The new value for this versioned string
-
class Reader
Public Functions
-
std::shared_ptr<const std::string> read(const View &view)
Read from the View.
If this Reader has never seen this View before, then this function will return a reference to the string that the View contains. Otherwise, if this Reader has seen this View before, then this function will return a nullptr.
- Parameters:
view – [in] The view that the Reader should look at
-
std::shared_ptr<const std::string> read(const View &view)
-
class View
A snapshot view of a VersionedString. This is thread-safe to read even while the VersionedString is being modified. Each VersionedString::Reader instance will only view this object once; after the first viewing it will return a nullptr.
The contents of this View can only be retrieved by a VersionedString::Reader
-
VersionedString(std::string initial_value)