0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd:Ⓜ️:event: Add comment \brief's to prev and refs interfaces.

This commit is contained in:
Jason Volk 2019-04-29 10:59:33 -07:00
parent 17a9763da6
commit 73ea2ff156
2 changed files with 14 additions and 0 deletions

View file

@ -25,6 +25,15 @@ namespace ircd::m
std::string pretty_oneline(const event::prev &);
}
/// Interface to the previous-references of an event. This interface overlays
/// on the m::event tuple and adds functionality focused specifically on the
/// various reference properties in the event data.
///
/// Instances of this class "overlay" on the event tuple, meaning one just
/// passes an m::event (or a json::object which would be passed to an m::event)
/// to the constructor of this class. This class only has the properties of
/// the event which contain references, and a suite of functions to work with
/// those references.
struct ircd::m::event::prev
:json::tuple
<

View file

@ -16,6 +16,11 @@ namespace ircd::m::dbs
enum class ref :uint8_t;
}
/// Interface to the forward-references for an event. Forward-references are
/// virtually constructed from prev-references made by other events. This
/// interface queries the database which has pre-indexed the prev-references
/// made by other events at their insertion (it does not conduct any expensive
/// scan when using this interface, etc).
struct ircd::m::event::refs
{
event::idx idx;