![]() |
libQuotient
A Qt library for building matrix clients
|
A manager of thread information in a room. More...
#include <thread.h>


Public Types | |
| using | base_type = QHash< QString, ThreadInfo > |
| using | const_iterator = base_type::const_iterator |
| using | key_type = base_type::key_type |
| using | mapped_type = base_type::mapped_type |
| using | UpdateResult = std::pair< ThreadInfo, bool > |
Public Member Functions | |
| UpdateResult | updateFrom (const TimelineItem &eventItem) |
| Update thread state for an event that just arrived to the timeline. | |
| base_type::const_iterator | begin () const |
| base_type::const_iterator | end () const |
| base_type::const_iterator | find (const key_type &k) const |
| mapped_type | operator[] (const key_type &k) const |
Friends | |
| class | Room |
A manager of thread information in a room.
ThreadInfos encapsulates thread management logic, storing threads keyed by their root event id. Every time an event arrives to the timeline the room should send it to updateFrom() to update the relevant thread info if there's any thread involved. Otherwise this class behaves as a read-only QHash<QString, ThreadInfo>
| using Quotient::ThreadInfos::base_type = QHash<QString, ThreadInfo> |
| using Quotient::ThreadInfos::const_iterator = base_type::const_iterator |
| using Quotient::ThreadInfos::key_type = base_type::key_type |
| using Quotient::ThreadInfos::mapped_type = base_type::mapped_type |
| using Quotient::ThreadInfos::UpdateResult = std::pair<ThreadInfo, bool> |
|
inline |
|
inline |
|
inline |
|
inline |
| UpdateResult Quotient::ThreadInfos::updateFrom | ( | const TimelineItem & | eventItem | ) |
Update thread state for an event that just arrived to the timeline.
This method handles the full logic of updating thread state when a new event arrives: it figures out if any thread should be created or updated, and then creates or updates the respective ThreadInfo object according to the data in the event.
true if that object was created, false if it was updated