template <ConstraintKind... Ks>

struct Constraints

Defined at line 230 of file ../../tools/fidl/fidlc/src/constraints.h

|Constraints| holds multiple kinds of constraints (indicated by template parameters) and provides

functions that operate over them. |Type|s can inherit from |Constraints| directly or inherit from

a subclass that customizes error reporting.

Public Methods

void Constraints<Ks...> ()

Defined at line 231 of file ../../tools/fidl/fidlc/src/constraints.h

void Constraints<Ks...> (const Constraints<Ks...> & )

Defined at line 232 of file ../../tools/fidl/fidlc/src/constraints.h

void Constraints<Ks...> (Constraints<Ks...> && )

Defined at line 233 of file ../../tools/fidl/fidlc/src/constraints.h

void Constraints<Ks...> (typename Constraint<Ks>::ValueType... arg)

Construct a constraints instance with all constraint values supplied.

Defined at line 236 of file ../../tools/fidl/fidlc/src/constraints.h

template <ConstraintKind... OKs>
void Constraints<Ks...> (const Constraints<OKs...> & other)

Construct a constraint instance with values from another constraint instance that has a subset

of constraints.

Defined at line 241 of file ../../tools/fidl/fidlc/src/constraints.h

template <ConstraintKind K>
bool HasConstraint ()

Check if this a particular constraint |K| has a non-default value.

Defined at line 250 of file ../../tools/fidl/fidlc/src/constraints.h

template <typename M>
bool ResolveAndMergeConstraints (TypeResolver * resolver, Reporter * reporter, std::optional<SourceSpan> params_span, const Name & layout_name, Resource * resource, const std::vector<std::unique_ptr<Constant>> & params, M * out_merged, LayoutInvocation * layout_invocation)

Resolve the constraints in the params, then optionally populate the layout invocation and merge

the resolved constraints with the ones in this object.

Defined at line 257 of file ../../tools/fidl/fidlc/src/constraints.h