struct Gambit::DRes::Rule

Base rule for resolution of dependencies and backend requirements.

#include <rule.hpp>

Inherited by Gambit::DRes::BackendRule, Gambit::DRes::ModuleRule

Public Functions

Name
boolbase_antecedent_matches(functor * f, const Utils::type_equivalency & te) const
True if and only if the passed functor matches the ‘if’ part of a rule.
boolbase_consequent_matches(functor * f, const Utils::type_equivalency & te) const
True if and only if the passed functor matches the ’then’ part of a rule.
Rule()
Default constructor. Sets all fields empty.

Public Attributes

Name
boolhas_if
Rule has an antecedent (‘if’ clause)
boolhas_then
Rule has a consequent (’then’ clause)
YAML::Nodeyaml
The original YAML (if any) from which this rule was derived.
std::stringcapability
Capability field targeted by the rule.
boolif_capability
Capability field appears in ‘if’ clause.
boolthen_capability
Capability field appears in ’then’ clause.
std::stringtype
Type field targeted by the rule.
boolif_type
Type field appears in ‘if’ clause.
boolthen_type
Type field appears in ’then’ clause.
std::stringfunction
Function field targeted by the rule.
boolif_function
Function field appears in ‘if’ clause.
boolthen_function
Function field appears in ’then’ clause.
boolweakrule
Indicates that rule can be broken.
boollog_matches
Whether or not to log matches to the rule with functors.

Public Functions Documentation

function base_antecedent_matches

bool base_antecedent_matches(
    functor * f,
    const Utils::type_equivalency & te
) const

True if and only if the passed functor matches the ‘if’ part of a rule.

True if and only if the passed functor matches the base part of an ‘if’ part of a rule.

function base_consequent_matches

bool base_consequent_matches(
    functor * f,
    const Utils::type_equivalency & te
) const

True if and only if the passed functor matches the ’then’ part of a rule.

True if and only if the passed functor matches the base part of a ’then’ part of a rule.

function Rule

inline Rule()

Default constructor. Sets all fields empty.

Public Attributes Documentation

variable has_if

bool has_if;

Rule has an antecedent (‘if’ clause)

variable has_then

bool has_then;

Rule has a consequent (’then’ clause)

variable yaml

YAML::Node yaml;

The original YAML (if any) from which this rule was derived.

variable capability

std::string capability;

Capability field targeted by the rule.

variable if_capability

bool if_capability;

Capability field appears in ‘if’ clause.

variable then_capability

bool then_capability;

Capability field appears in ’then’ clause.

variable type

std::string type;

Type field targeted by the rule.

variable if_type

bool if_type;

Type field appears in ‘if’ clause.

variable then_type

bool then_type;

Type field appears in ’then’ clause.

variable function

std::string function;

Function field targeted by the rule.

variable if_function

bool if_function;

Function field appears in ‘if’ clause.

variable then_function

bool then_function;

Function field appears in ’then’ clause.

variable weakrule

bool weakrule;

Indicates that rule can be broken.

variable log_matches

bool log_matches;

Whether or not to log matches to the rule with functors.


Updated on 2024-07-18 at 13:53:31 +0000