clang  6.0.0svn
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< TValue
 

Detailed Description

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

A refactoring option that stores a value of type T.

Definition at line 26 of file RefactoringOptions.h.

Member Typedef Documentation

◆ ValueType

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

Definition at line 34 of file RefactoringOptions.h.

Member Function Documentation

◆ getValue()

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

Definition at line 36 of file RefactoringOptions.h.

◆ isRequired()

template<typename T, typename = typename std::enable_if< traits::IsValidOptionType<T>::value>::type>
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 32 of file RefactoringOptions.h.

◆ passToVisitor()

template<typename T, typename = typename std::enable_if< traits::IsValidOptionType<T>::value>::type>
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 28 of file RefactoringOptions.h.

Member Data Documentation

◆ Value

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

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