15.2.6.1. History¶
-
class
eprosima::fastrtps::rtps
::
History
¶ Class History, container of the different CacheChanges and the methods to access them.
Subclassed by eprosima::fastrtps::rtps::ReaderHistory, eprosima::fastrtps::rtps::WriterHistory
Public Functions
-
bool
reserve_Cache
(CacheChange_t **change, const std::function<uint32_t()> &calculateSizeFunc)¶ Reserve a CacheChange_t from the CacheChange pool.
- Return
True if reserved
- Warning
This method has been deprecated and will be removed on v3.0.0
- Parameters
[out] change
: Pointer to pointer to the CacheChange_t to reserve[in] calculateSizeFunc
: Function to calculate the size of the payload.
-
bool
reserve_Cache
(CacheChange_t **change, uint32_t dataSize)¶ Reserve a CacheChange_t from the CacheChange pool.
- Return
True if reserved
- Warning
This method has been deprecated and will be removed on v3.0.0
- Parameters
[out] change
: Pointer to pointer to the CacheChange_t to reserve[in] dataSize
: Required size for the payload.
-
void
release_Cache
(CacheChange_t *ch)¶ release a previously reserved CacheChange_t.
- Warning
This method has been deprecated and will be removed on v3.0.0
- Parameters
ch
: Pointer to the CacheChange_t.
-
const_iterator
find_change_nts
(CacheChange_t *ch)¶ Find a specific change in the history using the matches_change method criteria. No Thread Safe
- Return
an iterator if a suitable change is found
- Parameters
ch
: Pointer to the CacheChange_t to search for.
-
iterator
remove_change_nts
(const_iterator removal, bool release = true)¶ Remove a specific change from the history. No Thread Safe
- Return
iterator to the next CacheChange_t or end iterator.
- Parameters
removal
: iterator to the CacheChange_t to remove.release
: defaults to true and hints if the CacheChange_t should return to the pool
-
bool
remove_all_changes
()¶ Remove all changes from the History
- Return
True if everything was correctly removed.
-
bool
remove_change
(CacheChange_t *ch)¶ Remove a specific change from the history.
- Return
True if removed.
- Parameters
ch
: Pointer to the CacheChange_t.
-
const_iterator
find_change
(CacheChange_t *ch)¶ Find a specific change in the history using the matches_change method criteria.
- Return
an iterator if a suitable change is found
- Parameters
ch
: Pointer to the CacheChange_t to search for.
-
bool
matches_change
(const CacheChange_t *ch_inner, CacheChange_t *ch_outer)¶ Verifies if an element of the changes collection matches a given change Derived classes have more info on how to identify univocally a change and should override.
- Return
true if the iterator identifies this change.
- Parameters
ch_inner
: element of the collection to compare with the given changech_outer
: Pointer to the CacheChange_t to identify.
-
iterator
remove_change
(const_iterator removal, bool release = true)¶ Remove a specific change from the history.
- Return
iterator to the next CacheChange_t or end iterator.
- Parameters
removal
: iterator to the CacheChange_t to remove.release
: defaults to true and hints if the CacheChange_t should return to the pool
-
iterator
changesBegin
()¶ Get the beginning of the changes history iterator.
- Return
Iterator to the beginning of the vector.
-
iterator
changesEnd
()¶ Get the end of the changes history iterator.
- Return
Iterator to the end of the vector.
-
bool
get_min_change
(CacheChange_t **min_change)¶ Get the minimum CacheChange_t.
- Return
True if correct.
- Parameters
min_change
: Pointer to pointer to the minimum change.
-
bool
get_max_change
(CacheChange_t **max_change)¶ Get the maximum CacheChange_t.
- Return
True if correct.
- Parameters
max_change
: Pointer to pointer to the maximum change.
-
uint32_t
getTypeMaxSerialized
()¶ Get the maximum serialized payload size
- Return
Maximum serialized payload size
-
RecursiveTimedMutex *
getMutex
()¶ Get the mutex.
- Return
Mutex
-
bool
get_earliest_change
(CacheChange_t **change)¶ A method to get the change with the earliest timestamp.
- Return
True on success
- Parameters
change
: Pointer to pointer to earliest change
Public Members
-
HistoryAttributes
m_att
¶ Attributes of the History.
-
bool