clang  6.0.0svn
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. More...
 
virtual StringRef getDescription () const =0
 
virtual bool isRequired () const =0
 True when this option must be specified before invoking the refactoring action. More...
 
virtual void passToVisitor (RefactoringOptionVisitor &Visitor)=0
 Invokes the visit method in the option consumer that's appropriate for the option's value type. More...
 

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 27 of file RefactoringOption.h.

Constructor & Destructor Documentation

◆ ~RefactoringOption()

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

Definition at line 29 of file RefactoringOption.h.

References getDescription(), getName(), isRequired(), and passToVisitor().

Member Function Documentation

◆ getDescription()

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

Referenced by ~RefactoringOption().

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

Referenced by ~RefactoringOption().

◆ 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 >, clang::tooling::OptionalRefactoringOption< T, typename >, and clang::tooling::OptionalRefactoringOption< T >.

Referenced by ~RefactoringOption().

◆ 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 >, and clang::tooling::OptionalRefactoringOption< T >.

Referenced by ~RefactoringOption().


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