aboutsummaryrefslogtreecommitdiff
path: root/build2/test/rule.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/test/rule.hxx')
-rw-r--r--build2/test/rule.hxx38
1 files changed, 25 insertions, 13 deletions
diff --git a/build2/test/rule.hxx b/build2/test/rule.hxx
index 819121c..b331263 100644
--- a/build2/test/rule.hxx
+++ b/build2/test/rule.hxx
@@ -17,34 +17,46 @@ namespace build2
{
namespace test
{
- class rule_common: public build2::rule, protected virtual common
+ class rule: public build2::rule, protected virtual common
{
public:
- virtual match_result
+ explicit
+ rule (common_data&& d): common (move (d)) {}
+
+ virtual bool
match (action, target&, const string&) const override;
+ virtual recipe
+ apply (action, target&) const override;
+
+ static target_state
+ perform_update (action, const target&);
+
+ target_state
+ perform_test (action, const target&, size_t) const;
+
target_state
- perform_script (action, const target&) const;
+ perform_script (action, const target&, size_t) const;
};
- class rule: public rule_common
+ class default_rule: public rule // For disambiguation in module.
{
public:
- virtual recipe
- apply (action, target&) const override;
-
- static target_state
- perform_test (action, const target&);
+ explicit
+ default_rule (common_data&& d): common (move (d)), rule (move (d)) {}
};
- class alias_rule: public rule_common
+ // In addition to the above rule's semantics, this rule sees through to
+ // the group's members.
+ //
+ class group_rule: public rule
{
public:
+ explicit
+ group_rule (common_data&& d): common (move (d)), rule (move (d)) {}
+
virtual recipe
apply (action, target&) const override;
-
- target_state
- perform_test (action, const target&) const;
};
}
}