LLVM API Documentation

Public Member Functions | Public Attributes | Protected Member Functions | Friends
llvm::cl::Option Class Reference

#include <CommandLine.h>

Inheritance diagram for llvm::cl::Option:
Inheritance graph
[legend]
Collaboration diagram for llvm::cl::Option:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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
void setArgStr (const char *S)
void setDescription (const char *S)
void setValueStr (const char *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 setCategory (OptionCategory &C)
void addArgument ()
void removeArgument ()
OptiongetNextRegisteredOption () const
virtual size_t getOptionWidth () const =0
virtual void printOptionInfo (size_t GlobalWidth) const =0
virtual void printOptionValue (size_t GlobalWidth, bool Force) const =0
virtual void getExtraOptionNames (SmallVectorImpl< const char * > &)
bool addOccurrence (unsigned pos, StringRef ArgName, StringRef Value, bool MultiArg=false)
bool error (const Twine &Message, StringRef ArgName=StringRef())
int getNumOccurrences () const
virtual ~Option ()

Public Attributes

const char * ArgStr
const char * HelpStr
const char * ValueStr
OptionCategoryCategory

Protected Member Functions

 Option (enum NumOccurrencesFlag OccurrencesFlag, enum OptionHidden Hidden)
void setNumAdditionalVals (unsigned n)

Friends

class alias

Detailed Description

Definition at line 162 of file CommandLine.h.


Constructor & Destructor Documentation

llvm::cl::Option::Option ( enum NumOccurrencesFlag  OccurrencesFlag,
enum OptionHidden  Hidden 
) [inline, explicit, protected]

Definition at line 237 of file CommandLine.h.

virtual llvm::cl::Option::~Option ( ) [inline, virtual]

Definition at line 281 of file CommandLine.h.


Member Function Documentation

Definition at line 107 of file CommandLine.cpp.

References llvm::cl::MarkOptionsChanged(), and RegisteredOptionList.

bool Option::addOccurrence ( unsigned  pos,
StringRef  ArgName,
StringRef  Value,
bool  MultiArg = false 
)
bool Option::error ( const Twine Message,
StringRef  ArgName = StringRef() 
)
virtual void llvm::cl::Option::getExtraOptionNames ( SmallVectorImpl< const char * > &  ) [inline, virtual]

Definition at line 269 of file CommandLine.h.

Referenced by GetOptionInfo(), and LookupNearestOption().

Definition at line 257 of file CommandLine.h.

Referenced by GetOptionInfo().

Definition at line 216 of file CommandLine.h.

Referenced by ProvideOption().

Definition at line 280 of file CommandLine.h.

Definition at line 199 of file CommandLine.h.

Referenced by addOccurrence(), EatsUnboundedNumberOfValues(), and RequiresValue().

Definition at line 206 of file CommandLine.h.

virtual size_t llvm::cl::Option::getOptionWidth ( ) const [pure virtual]

Definition at line 215 of file CommandLine.h.

bool llvm::cl::Option::hasArgStr ( ) const [inline]
virtual void llvm::cl::Option::printOptionInfo ( size_t  GlobalWidth) const [pure virtual]
virtual void llvm::cl::Option::printOptionValue ( size_t  GlobalWidth,
bool  Force 
) const [pure virtual]

Unregisters this option from the CommandLine system.

This option must have been the last option registered. For testing purposes only.

Definition at line 115 of file CommandLine.cpp.

References llvm::cl::MarkOptionsChanged(), and RegisteredOptionList.

void llvm::cl::Option::setArgStr ( const char *  S) [inline]

Definition at line 224 of file CommandLine.h.

References ArgStr.

Definition at line 235 of file CommandLine.h.

References llvm::CallingConv::C, and Category.

void llvm::cl::Option::setDescription ( const char *  S) [inline]

Definition at line 225 of file CommandLine.h.

References HelpStr.

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

Definition at line 232 of file CommandLine.h.

Referenced by llvm::cl::applicator< FormattingFlags >::opt().

void llvm::cl::Option::setHiddenFlag ( enum OptionHidden  Val) [inline]

Definition at line 231 of file CommandLine.h.

Referenced by llvm::cl::applicator< OptionHidden >::opt().

void llvm::cl::Option::setMiscFlag ( enum MiscFlags  M) [inline]

Definition at line 233 of file CommandLine.h.

Referenced by llvm::cl::applicator< MiscFlags >::opt().

void llvm::cl::Option::setNumAdditionalVals ( unsigned  n) [inline, protected]

Reimplemented in llvm::cl::list< DataType, Storage, ParserClass >.

Definition at line 245 of file CommandLine.h.

Definition at line 227 of file CommandLine.h.

Referenced by llvm::cl::applicator< NumOccurrencesFlag >::opt().

void llvm::cl::Option::setPosition ( unsigned  pos) [inline]

Definition at line 234 of file CommandLine.h.

Definition at line 230 of file CommandLine.h.

Referenced by llvm::cl::applicator< ValueExpected >::opt().

void llvm::cl::Option::setValueStr ( const char *  S) [inline]

Definition at line 226 of file CommandLine.h.

References ValueStr.

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


Friends And Related Function Documentation

friend class alias [friend]

Definition at line 163 of file CommandLine.h.


Member Data Documentation

Definition at line 197 of file CommandLine.h.

Referenced by setCategory().

Definition at line 196 of file CommandLine.h.

Referenced by getValueStr(), and setValueStr().


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