LLVM  14.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::cl::list< DataType, StorageClass, ParserClass > Class Template Reference

#include "llvm/Support/CommandLine.h"

Inheritance diagram for llvm::cl::list< DataType, StorageClass, ParserClass >:
Inheritance graph
[legend]
Collaboration diagram for llvm::cl::list< DataType, StorageClass, ParserClass >:
Collaboration graph
[legend]

Public Member Functions

 list (const list &)=delete
 
listoperator= (const list &)=delete
 
ParserClass & getParser ()
 
unsigned getPosition (unsigned optnum) const
 
void setNumAdditionalVals (unsigned n)
 
template<class... Mods>
 list (const Mods &... Ms)
 
void setCallback (std::function< void(const typename ParserClass::parser_data_type &)> CB)
 
- Public Member Functions inherited from llvm::cl::Option
enum NumOccurrencesFlag getNumOccurrencesFlag () const
 
enum ValueExpected getValueExpectedFlag () const
 
enum OptionHidden getOptionHiddenFlag () const
 
enum FormattingFlags getFormattingFlag () const
 
unsigned getMiscFlags () const
 
unsigned getPosition () const
 
unsigned getNumAdditionalVals () const
 
bool hasArgStr () const
 
bool isPositional () const
 
bool isSink () const
 
bool isDefaultOption () const
 
bool isConsumeAfter () const
 
bool isInAllSubCommands () const
 
void setArgStr (StringRef S)
 
void setDescription (StringRef S)
 
void setValueStr (StringRef S)
 
void setNumOccurrencesFlag (enum NumOccurrencesFlag Val)
 
void setValueExpectedFlag (enum ValueExpected Val)
 
void setHiddenFlag (enum OptionHidden Val)
 
void setFormattingFlag (enum FormattingFlags V)
 
void setMiscFlag (enum MiscFlags M)
 
void setPosition (unsigned pos)
 
void addCategory (OptionCategory &C)
 
void addSubCommand (SubCommand &S)
 
virtual ~Option ()=default
 
void addArgument ()
 
void removeArgument ()
 Unregisters this option from the CommandLine system. More...
 
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)
 
int getNumOccurrences () const
 
void reset ()
 
- Public Member Functions inherited from llvm::cl::list_storage< DataType, bool >
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
size_type size () const
 
bool empty () const
 
void push_back (const DataType &value)
 
void push_back (DataType &&value)
 
reference operator[] (size_type pos)
 
const_reference operator[] (size_type pos) const
 
void clear ()
 
iterator erase (const_iterator pos)
 
iterator erase (const_iterator first, const_iterator last)
 
iterator erase (iterator pos)
 
iterator erase (iterator first, iterator last)
 
iterator insert (const_iterator pos, const DataType &value)
 
iterator insert (const_iterator pos, DataType &&value)
 
iterator insert (iterator pos, const DataType &value)
 
iterator insert (iterator pos, DataType &&value)
 
reference front ()
 
const_reference front () const
 
 operator std::vector< DataType > & ()
 
 operator ArrayRef< DataType > () const
 
std::vector< DataType > * operator& ()
 
const std::vector< DataType > * operator& () const
 
template<class T >
void addValue (const T &V)
 

Public Attributes

std::function< void(const typename ParserClass::parser_data_type &)> Callback
 
- Public Attributes inherited from llvm::cl::Option
StringRef ArgStr
 
StringRef HelpStr
 
StringRef ValueStr
 
SmallVector< OptionCategory *, 1 > Categories
 
SmallPtrSet< SubCommand *, 1 > Subs
 

Additional Inherited Members

- Public Types inherited from llvm::cl::list_storage< DataType, bool >
using iterator = typename std::vector< DataType >::iterator
 
using const_iterator = typename std::vector< DataType >::const_iterator
 
using size_type = typename std::vector< DataType >::size_type
 
using reference = typename std::vector< DataType >::reference
 
using const_reference = typename std::vector< DataType >::const_reference
 
- 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)
 
void setNumAdditionalVals (unsigned n)
 

Detailed Description

template<class DataType, class StorageClass = bool, class ParserClass = parser<DataType>>
class llvm::cl::list< DataType, StorageClass, ParserClass >

Definition at line 1630 of file CommandLine.h.

Constructor & Destructor Documentation

◆ list() [1/2]

template<class DataType , class StorageClass = bool, class ParserClass = parser<DataType>>
llvm::cl::list< DataType, StorageClass, ParserClass >::list ( const list< DataType, StorageClass, ParserClass > &  )
delete

◆ list() [2/2]

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

Definition at line 1693 of file CommandLine.h.

References llvm::cl::apply().

Member Function Documentation

◆ getParser()

template<class DataType , class StorageClass = bool, class ParserClass = parser<DataType>>
ParserClass& llvm::cl::list< DataType, StorageClass, ParserClass >::getParser ( )
inline

Definition at line 1683 of file CommandLine.h.

◆ getPosition()

template<class DataType , class StorageClass = bool, class ParserClass = parser<DataType>>
unsigned llvm::cl::list< DataType, StorageClass, ParserClass >::getPosition ( unsigned  optnum) const
inline

Definition at line 1685 of file CommandLine.h.

References assert(), and llvm::cl::list_storage< DataType, bool >::size().

◆ operator=()

template<class DataType , class StorageClass = bool, class ParserClass = parser<DataType>>
list& llvm::cl::list< DataType, StorageClass, ParserClass >::operator= ( const list< DataType, StorageClass, ParserClass > &  )
delete

◆ setCallback()

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

◆ setNumAdditionalVals()

template<class DataType , class StorageClass = bool, class ParserClass = parser<DataType>>
void llvm::cl::list< DataType, StorageClass, ParserClass >::setNumAdditionalVals ( unsigned  n)
inline

Definition at line 1690 of file CommandLine.h.

References n, and llvm::cl::Option::setNumAdditionalVals().

Referenced by llvm::cl::multi_val::apply().

Member Data Documentation

◆ Callback

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

Definition at line 1704 of file CommandLine.h.

Referenced by llvm::cl::list< DataType, StorageClass, ParserClass >::setCallback().


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