CompositeFieldRules.h header

#include <ew/app/CompositeFieldRules.h>

Namespace ew::app

Enumerations

enum class CompositeCheck { TooFewElements, TooManyElements, DuplicateElement, ElementTypeMismatch, DuplicateKey, DanglingElementReference, BlockMissing, UnknownBlockMember, BlockCycle }

Which composite-field rule a finding is about.

Named rather than described, for the same reason the timeline's checks are: a finding nothing can rank, filter or silence is a sentence, not a diagnostic.

Functions

QString ew::app::entity::ruleIdFor(CompositeCheck check)

The rule id findings of check carry – "composite/duplicate-key".

QString ew::app::entity::toToken(CompositeCheck check)

Returns the stable serialization token for check.

std::vector< ew::app::diagnostics::Diagnostic > ew::app::entity::validateCompositeFields(const ew::core::project::Project &project, const ew::core::entity::Entity &entity)

Everything wrong with the composite field values entity holds, checked against the field definitions project gives it.

Scalar fields are not this function's business and are skipped. An entity with no List or Map field costs one pass over its schema and produces nothing.