LLVM 22.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::cl::opt< DataType, ExternalStorage, ParserClass > Class Template Reference

#include "llvm/Support/CommandLine.h"

Inheritance diagram for llvm::cl::opt< DataType, ExternalStorage, ParserClass >:
[フレーム]
[legend]

Public Member Functions

  opt (const opt &)=delete
optoperator= (const opt &)=delete
void  setInitialValue (const DataType &V)
ParserClass &  getParser ()
template<class T>
DataType &  operator= (const T &Val)
template<class T>
DataType &  operator= (T &&Val)
template<class... Mods>
  opt (const Mods &... Ms)
void  setCallback (std::function< void(const typename ParserClass::parser_data_type &)> CB)
Public Member Functions inherited from llvm::cl::Option
void  setArgStr (StringRef S)
void  setHiddenFlag (enum OptionHidden Val)
void  setMiscFlag (enum MiscFlags M)
void  setPosition (unsigned pos)
virtual  ~Option ()=default
void  addArgument ()
void  removeArgument ()
  Unregisters this option from the CommandLine system.
virtual bool  addOccurrence (unsigned pos, StringRef ArgName, StringRef Value, bool MultiArg=false)
bool  error (const Twine &Message, StringRef ArgName=StringRef(), raw_ostream &Errs=llvm::errs())
bool  error (const Twine &Message, raw_ostream &Errs)
void  reset ()
  opt_storage ()=default
bool  setLocation (Option &O, DataType &L)
void  setValue (const T &V, bool initial=false)
DataType &  getValue ()
const OptionValue< DataType > &  getDefault () const

Public Attributes

std::function< void(const typename ParserClass::parser_data_type &)>  Callback
Public Attributes inherited from llvm::cl::Option

Additional Inherited Members

Static Public Member Functions inherited from llvm::cl::Option
static void  printHelpStr (StringRef HelpStr, size_t Indent, size_t FirstLineIndentedBy)
static void  printEnumValHelpStr (StringRef HelpStr, size_t Indent, size_t FirstLineIndentedBy)
Protected Member Functions inherited from llvm::cl::Option
  Option (enum NumOccurrencesFlag OccurrencesFlag, enum OptionHidden Hidden)

Detailed Description

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
class llvm::cl::opt< DataType, ExternalStorage, ParserClass >

Definition at line 1453 of file CommandLine.h.

Constructor & Destructor Documentation

◆  opt() [1/2]

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
llvm::cl::opt< DataType, ExternalStorage, ParserClass >::opt ( const opt< DataType, ExternalStorage, ParserClass > & )
delete

References opt().

Referenced by operator=(), and opt().

◆  opt() [2/2]

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
template<class... Mods>
llvm::cl::opt< DataType, ExternalStorage, ParserClass >::opt ( const Mods &... Ms )
inlineexplicit

Definition at line 1532 of file CommandLine.h.

References llvm::cl::apply(), llvm::cl::NotHidden, llvm::cl::Option::Option(), and llvm::cl::Optional.

Member Function Documentation

◆  getParser()

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
ParserClass & llvm::cl::opt< DataType, ExternalStorage, ParserClass >::getParser ( )
inline

Definition at line 1517 of file CommandLine.h.

◆  operator=() [1/3]

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
opt & llvm::cl::opt< DataType, ExternalStorage, ParserClass >::operator= ( const opt< DataType, ExternalStorage, ParserClass > & )
delete

References opt().

◆  operator=() [2/3]

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
template<class T>
DataType & llvm::cl::opt< DataType, ExternalStorage, ParserClass >::operator= ( const T & Val )
inline

Definition at line 1519 of file CommandLine.h.

References Callback, llvm::cl::opt_storage< DataType, false, std::is_class_v< DataType > >::getValue(), llvm::cl::opt_storage< DataType, false, std::is_class_v< DataType > >::setValue(), and T.

◆  operator=() [3/3]

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
template<class T>
DataType & llvm::cl::opt< DataType, ExternalStorage, ParserClass >::operator= ( T && Val )
inline

Definition at line 1525 of file CommandLine.h.

References Callback, llvm::cl::opt_storage< DataType, false, std::is_class_v< DataType > >::getValue(), and T.

◆  setCallback()

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
void llvm::cl::opt< DataType, ExternalStorage, ParserClass >::setCallback ( std::function< void(const typename ParserClass::parser_data_type &)> CB )
inline

Definition at line 1538 of file CommandLine.h.

References Callback.

◆  setInitialValue()

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
void llvm::cl::opt< DataType, ExternalStorage, ParserClass >::setInitialValue ( const DataType & V )
inline

Definition at line 1515 of file CommandLine.h.

References llvm::cl::opt_storage< DataType, false, std::is_class_v< DataType > >::setValue().

Member Data Documentation

◆  Callback

template<class DataType, bool ExternalStorage = false, class ParserClass = parser<DataType>>
std::function<void(const typename ParserClass::parser_data_type &)> llvm::cl::opt< DataType, ExternalStorage, ParserClass >::Callback
Initial value:
=
[](const typename ParserClass::parser_data_type &) {}

Definition at line 1543 of file CommandLine.h.

Referenced by operator=(), operator=(), and setCallback().


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

Generated on for LLVM by doxygen 1.14.0

AltStyle によって変換されたページ (->オリジナル) /