class RefactoringActionRule

Declaration

class RefactoringActionRule : public RefactoringActionRuleBase { /* full declaration omitted */ };

Description

A refactoring action rule is a wrapper class around a specific refactoring action rule (SourceChangeRefactoringRule, etc) that, in addition to invoking the action, describes the requirements that determine when the action can be initiated.

Declared at: clang/include/clang/Tooling/Refactoring/RefactoringActionRule.h:54

Inherits from: RefactoringActionRuleBase

Method Overview

Inherited from RefactoringActionRuleBase:

Methods

virtual bool hasSelectionRequirement()

Description

Returns true when the rule has a source selection requirement that has to be fulfilled before refactoring can be performed.

Declared at: clang/include/clang/Tooling/Refactoring/RefactoringActionRule.h:58

virtual void visitRefactoringOptions(
    clang::tooling::RefactoringOptionVisitor&
        Visitor)

Description

Traverses each refactoring option used by the rule and invokes the\c visit callback in the consumer for each option. Options are visited in the order of use, e.g. if a rule has two requirements that use options, the options from the first requirement are visited before the options in the second requirement.

Declared at: clang/include/clang/Tooling/Refactoring/RefactoringActionRule.h:66

Parameters

clang::tooling::RefactoringOptionVisitor& Visitor