Class VersionedString¶
Defined in File VersionedString.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class
rmf_task
::
VersionedString
¶ Public Functions
-
VersionedString
(std::string initial_value)¶ Construct a versioned string
- Parameters
[in] initial_value
: The initial value of this versioned string
-
void
update
(std::string new_value)¶ Update the value of this versioned string
- Parameters
[in] new_value
: 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
[in] view
: The view that the Reader should look at
-
std::shared_ptr<const std::string>
-
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
-