ReviewState.h header
#include <ew/app/branching/ReviewState.h>
Namespace ew::app::branching
StatusTally struct
struct ew::app::branching::StatusTally
How many of a scene's lines are in one review state.
Members
QString ew::app::branching::StatusTally::status
The state, as the project's vocabulary spells it – or empty for the lines nobody has given one.
std::size_t ew::app::branching::StatusTally::count = 0
How many line-bearing nodes carry it.
bool ew::app::branching::StatusTally::approved = false
Whether this state means signed off. False for the unset bucket and for a state the vocabulary has stopped declaring.
bool ew::app::branching::StatusTally::declared = false
Whether the project's vocabulary still declares this state.
A state it does not is the interesting row: those lines were reviewed against a word the team has since dropped, and silently folding them into "unset" would report them as never looked at.
bool operator==(const StatusTally &, const StatusTally &)=default
Tallies compare equal when every field matches.
Functions
bool ew::app::branching::carriesReviewableLine(const ew::core::branching::BranchNode &node)
Whether node is a line somebody writes, reviews and signs off.
Line, Hub and Choice: all three carry words a reader is shown. A Condition, Jump, Call, Random or Return carries the author's own label for a piece of structure, which is not work a reviewer approves.
bool ew::app::branching::sameOwner(const QString &left, const QString &right)
Whether left and right name the same owner – trimmed and case-insensitive.
The one place that decides, for the same reason ew::core::workflow::sameWorkflowStatus is: a filter that disagreed with a tally about whether "Ana" and "ana" are one person would show a count that did not match the graph beside it.
std::set< QString > ew::app::branching::sceneOwners(const ew::core::branching::BranchScene &scene)
Every owner named on scene's nodes, in case-insensitive order, without duplicates.
Derived from the lines rather than from a registry of people, because there is no registry: the names in play are the names somebody typed, and that is exactly the list a filter should offer.
std::vector< StatusTally > ew::app::branching::statusTally(const ew::core::branching::BranchScene &scene, const ew::core::workflow::WorkflowStatuses &vocabulary)
The review states scene's line-bearing nodes are in, in the vocabulary's pipeline order.
The count is what a lead actually asks for: "how much of this scene is approved" is a question about a scene, and answering it by eye means counting boxes on a canvas. Every declared state gets a row even at zero, because a pipeline with a missing stage reads as a pipeline that does not have one; states the vocabulary no longer declares follow, then the unset lines.
Only line-bearing nodes are counted (see carriesReviewableLine): a Condition or a Jump is structure, not a line anybody writes or approves, and counting them would put a scene's approval percentage permanently out of reach.