clang  14.0.0git
Public Types | Public Member Functions | Protected Attributes | List of all members
clang::tooling::OptionalRefactoringOption< T, typename > Class Template Reference

A refactoring option that stores a value of type T. More...

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

Inheritance diagram for clang::tooling::OptionalRefactoringOption< T, typename >:
Inheritance graph
[legend]
Collaboration diagram for clang::tooling::OptionalRefactoringOption< T, typename >:
Collaboration graph
[legend]

Public Types

using ValueType = Optional< T >
 

Public Member Functions

void passToVisitor (RefactoringOptionVisitor &Visitor) final override
 Invokes the visit method in the option consumer that's appropriate for the option's value type. More...
 
bool isRequired () const override
 True when this option must be specified before invoking the refactoring action. More...
 
const ValueTypegetValue () const
 
- Public Member Functions inherited from clang::tooling::RefactoringOption
virtual ~RefactoringOption ()
 
virtual StringRef getName () const =0
 Returns the name of the refactoring option. More...
 
virtual StringRef getDescription () const =0
 

Protected Attributes

Optional< T > Value
 

Detailed Description

template<typename T, typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
class clang::tooling::OptionalRefactoringOption< T, typename >

A refactoring option that stores a value of type T.

Definition at line 25 of file RefactoringOptions.h.

Member Typedef Documentation

◆ ValueType

template<typename T , typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
using clang::tooling::OptionalRefactoringOption< T, typename >::ValueType = Optional<T>

Definition at line 33 of file RefactoringOptions.h.

Member Function Documentation

◆ getValue()

template<typename T , typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
const ValueType& clang::tooling::OptionalRefactoringOption< T, typename >::getValue ( ) const
inline

Definition at line 35 of file RefactoringOptions.h.

◆ isRequired()

template<typename T , typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
bool clang::tooling::OptionalRefactoringOption< T, typename >::isRequired ( ) const
inlineoverridevirtual

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

Implements clang::tooling::RefactoringOption.

Definition at line 31 of file RefactoringOptions.h.

◆ passToVisitor()

template<typename T , typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
void clang::tooling::OptionalRefactoringOption< T, typename >::passToVisitor ( RefactoringOptionVisitor Visitor)
inlinefinaloverridevirtual

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.

Implements clang::tooling::RefactoringOption.

Definition at line 27 of file RefactoringOptions.h.

Member Data Documentation

◆ Value

template<typename T , typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
Optional<T> clang::tooling::OptionalRefactoringOption< T, typename >::Value
protected

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