ProjectFacet.h header

#include <ew/core/foundation/ProjectFacet.h>

Namespace ew::core::foundation

Enumerations

enum class ProjectFacet { Audiences, DefaultAudiences, BeatSheet, BranchCoverage, CanonWrites, Cast, Calendar, CodexArrangement, Reckonings, ContinuityRules, DialogueCommands, LineBudgets, EntityTemplates, LibraryMounts, PlotThreads, PropertyBlocks, PropertyMigrationAnswer, Quests, RunConfigurations, SavedSearches, Terminology, TimelineBookmarks, TimelineEras, TimelineMarkers, TimelineViewPresets, TimelineViewSettings, Translations, Variables, WorkflowStatuses, WritingGoal }

A piece of project-level state that has no identity of its own.

Most edits are about an object the project contains, named by a ContentId, or about a taxonomy category, named by a CategoryId. The ones below are about neither: they replace a collection or a setting that belongs to the project itself, and there is no id to point at because the project is the container the ids live in. This enum gives those edits a subject, so an operation journal can say what changed and a policy check can ask whether it was allowed.

(Deliberately not "N of them are about neither": that number was written once and was wrong by ten before anyone read it again. The list below is the count.)

Each value names the state, not the command that happens to write it today, so a second writer of the same state reuses the value rather than adding one.

Serialized as a stable kebab-case token, so a journal written by one build reads back in the next; a token may never be renamed once shipped, even if its enumerator is. Switches over this enum deliberately omit a default: label: C4062 is enabled (see EwCompilerWarnings.cmake), so adding a value here fails the build at every switch that has not handled it – which is how toToken guarantees no facet can be added without a token.

Functions

std::vector< ProjectFacet > ew::core::foundation::allProjectFacets()

Every project facet, in declaration order. Lets a test walk the whole enum rather than a hand-copied list that would silently miss a newly added value.

std::optional< ProjectFacet > ew::core::foundation::projectFacetFromToken(QStringView token)

Parses a project facet from its serialization token; std::nullopt if unrecognized or absent.

QString ew::core::foundation::toToken(ProjectFacet facet)

Returns the stable serialization token for facet (e.g. "calendar", "writing-goal").