BranchCoverage.h header

#include <ew/core/branching/BranchCoverage.h>

Namespace ew::core::branching

BranchCoverage struct

struct ew::core::branching::BranchCoverage

Every path recorded for this project, in the order they were recorded.

Project data rather than a local scratch file: coverage is a QA artefact a team accumulates, and one kept per machine would tell each person only what they themselves had played.

Members

std::vector<CoveragePath> ew::core::branching::BranchCoverage::paths

The recorded runs.

bool operator==(const BranchCoverage &, const BranchCoverage &)=default

Coverage sets compare equal when every path matches, in order.

CoveragePath struct

struct ew::core::branching::CoveragePath

One path somebody actually walked through the story, node by node.

The half the analysis cannot answer. ew::app::branching::simulateScene says what a reader COULD reach; nothing said what anybody DID reach, so a branch that works and has never been read by a human looked exactly like one that has been played a hundred times.

The whole path rather than a set of visited nodes, because the questions asked of it are about the walk: which link was taken (a pair of consecutive nodes), which ending was reached (the last one), and how many separate runs there were. A set could answer none of those, and could not be un-recorded one run at a time.

Members

ew::core::foundation::ContentId ew::core::branching::CoveragePath::sceneId

The scene the run began in. A path may leave it – a jump or a call crosses scenes – so this is where it started, not everywhere it went.

std::vector<ew::core::foundation::BranchNodeId> ew::core::branching::CoveragePath::nodes

Every node arrived at, in order.

QString ew::core::branching::CoveragePath::source

Where the run came from – the editor's own player, or the name a studio's build reports.

Recorded because the two mean different things to a lead: a run in the editor proves the branch reads, and a run from the game proves a player can get there with the real systems underneath. Empty for a path whose source did not say.

bool operator==(const CoveragePath &, const CoveragePath &)=default

Paths compare equal when every field matches.