LLVM  mainline
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
Collaboration diagram for llvm::cl::Option:
Collaboration graph

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 ()
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 * > &)
virtual 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
bool FullyInitialized

Protected Member Functions

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


class alias

Detailed Description

Definition at line 175 of file CommandLine.h.

Constructor & Destructor Documentation

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

Definition at line 246 of file CommandLine.h.

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

Definition at line 288 of file CommandLine.h.

Member Function Documentation

Definition at line 223 of file CommandLine.cpp.

References FullyInitialized, and GlobalParser.

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

Definition at line 276 of file CommandLine.h.

Referenced by LookupNearestOption().

Definition at line 221 of file CommandLine.h.

Referenced by HandlePrefixedOrGroupedOption(), isGrouping(), and isPrefixedOrGrouping().

Definition at line 224 of file CommandLine.h.

Referenced by CommaSeparateAndAddOccurrence().

Definition at line 226 of file CommandLine.h.

Referenced by ProvideOption().

Definition at line 287 of file CommandLine.h.

Definition at line 212 of file CommandLine.h.

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

Definition at line 218 of file CommandLine.h.

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

Definition at line 225 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 228 of file CommandLine.cpp.

References GlobalParser.

void Option::setArgStr ( const char *  S)

Definition at line 230 of file CommandLine.cpp.

References ArgStr, FullyInitialized, and GlobalParser.

Definition at line 243 of file CommandLine.h.

References llvm::C, and Category.

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

Definition at line 235 of file CommandLine.h.

References HelpStr.

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

Definition at line 240 of file CommandLine.h.

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

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

Definition at line 239 of file CommandLine.h.

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

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

Definition at line 241 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 253 of file CommandLine.h.

Definition at line 237 of file CommandLine.h.

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

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

Definition at line 242 of file CommandLine.h.

Definition at line 238 of file CommandLine.h.

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

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

Definition at line 236 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 176 of file CommandLine.h.

Member Data Documentation

Definition at line 209 of file CommandLine.h.

Referenced by setCategory().

Definition at line 210 of file CommandLine.h.

Referenced by addArgument(), and setArgStr().

Definition at line 208 of file CommandLine.h.

Referenced by getValueStr(), and setValueStr().

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