clang 20.0.0git
Public Member Functions | List of all members
clang::tooling::RefactoringOption Class Referenceabstract

A refactoring option is an interface that describes a value that has an impact on the outcome of a refactoring. More...

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

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

Public Member Functions

virtual ~RefactoringOption ()
 
virtual StringRef getName () const =0
 Returns the name of the refactoring option.
 
virtual StringRef getDescription () const =0
 
virtual bool isRequired () const =0
 True when this option must be specified before invoking the refactoring action.
 
virtual void passToVisitor (RefactoringOptionVisitor &Visitor)=0
 Invokes the visit method in the option consumer that's appropriate for the option's value type.
 

Detailed Description

A refactoring option is an interface that describes a value that has an impact on the outcome of a refactoring.

Refactoring options can be specified using command-line arguments when the clang-refactor tool is used.

Definition at line 26 of file RefactoringOption.h.

Constructor & Destructor Documentation

◆ ~RefactoringOption()

virtual clang::tooling::RefactoringOption::~RefactoringOption ( )
inlinevirtual

Definition at line 28 of file RefactoringOption.h.

Member Function Documentation

◆ getDescription()

virtual StringRef clang::tooling::RefactoringOption::getDescription ( ) const
pure virtual

◆ getName()

virtual StringRef clang::tooling::RefactoringOption::getName ( ) const
pure virtual

Returns the name of the refactoring option.

Each refactoring option must have a unique name.

◆ isRequired()

virtual bool clang::tooling::RefactoringOption::isRequired ( ) const
pure virtual

True when this option must be specified before invoking the refactoring action.

Implemented in clang::tooling::RequiredRefactoringOption< T, typename >, and clang::tooling::OptionalRefactoringOption< T, typename >.

◆ passToVisitor()

virtual void clang::tooling::RefactoringOption::passToVisitor ( RefactoringOptionVisitor Visitor)
pure virtual

Invokes the visit method in the option consumer that's appropriate for the option's value type.

For example, if the option stores a string value, this method will invoke the visit method with a reference to an std::string value.

Implemented in clang::tooling::OptionalRefactoringOption< T, typename >.


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