clang 19.0.0git
Public Member Functions | List of all members
clang::tooling::RefactoringActionRule Class Referenceabstract

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. More...

#include "clang/Tooling/Refactoring/RefactoringActionRule.h"

Inheritance diagram for clang::tooling::RefactoringActionRule:
Inheritance graph
[legend]

Public Member Functions

virtual bool hasSelectionRequirement ()=0
 Returns true when the rule has a source selection requirement that has to be fulfilled before refactoring can be performed.
 
virtual void visitRefactoringOptions (RefactoringOptionVisitor &Visitor)=0
 Traverses each refactoring option used by the rule and invokes the visit callback in the consumer for each option.
 
- Public Member Functions inherited from clang::tooling::RefactoringActionRuleBase
virtual ~RefactoringActionRuleBase ()
 
virtual void invoke (RefactoringResultConsumer &Consumer, RefactoringRuleContext &Context)=0
 Initiates and performs a specific refactoring action.
 

Detailed 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.

Definition at line 53 of file RefactoringActionRule.h.

Member Function Documentation

◆ hasSelectionRequirement()

virtual bool clang::tooling::RefactoringActionRule::hasSelectionRequirement ( )
pure virtual

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

◆ visitRefactoringOptions()

virtual void clang::tooling::RefactoringActionRule::visitRefactoringOptions ( RefactoringOptionVisitor Visitor)
pure virtual

Traverses each refactoring option used by the rule and invokes the 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.


The documentation for this class was generated from the following file: