AliPhysics  b81c3d2 (b81c3d2)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Option Struct Reference

Public Member Functions

 Option (const TString &name, const TString &arg, const TString &description, const TString &value)
 
 Option (const Option &other)
 
Optionoperator= (const Option &other)
 
void Set (const TString &val)
 
void Set ()
 
void Reset ()
 
const TStringGet () const
 
Bool_t IsSet () const
 
Bool_t HasArg () const
 
Bool_t AsBool () const
 
Int_t AsInt () const
 
Long64_t AsLong () const
 
Double_t AsDouble () const
 
const char * AsString () const
 
Int_t NameWidth () const
 
Int_t ArgWidth () const
 
void Help (std::ostream &o, Int_t w=-1) const
 
void Show (std::ostream &o, Int_t w=-1) const
 
void Store (std::ostream &o, bool quote=true) const
 

Public Attributes

TString fName
 
TString fDescription
 
TString fValue
 
TString fArg
 
Bool_t fIsSet
 

Detailed Description

An option. The value is stored as a string

Definition at line 68 of file Option.C.

Constructor & Destructor Documentation

Option::Option ( const TString name,
const TString arg,
const TString description,
const TString value 
)
inline

Constructor

Parameters
nameName of option
argDummy argument (possibly null)
descriptionDescription
valueDefault value

Definition at line 78 of file Option.C.

Option::Option ( const Option other)
inline

Copy constructor

Parameters
otherObject to copy from

Definition at line 90 of file Option.C.

Member Function Documentation

Int_t Option::ArgWidth ( ) const
inline
Returns
the width of the dummy argument

Definition at line 201 of file Option.C.

Referenced by Help(), and OptionList::Widest().

Bool_t Option::AsBool ( ) const
inline
Returns
value as a boolean value

Definition at line 177 of file Option.C.

Referenced by OptionList::AsBool().

Double_t Option::AsDouble ( ) const
inline
Returns
value as a double precision value

Definition at line 189 of file Option.C.

Referenced by OptionList::AsDouble().

Int_t Option::AsInt ( ) const
inline
Returns
value as an integer value

Definition at line 181 of file Option.C.

Referenced by OptionList::AsInt().

Long64_t Option::AsLong ( ) const
inline
Returns
value as a long integer value

Definition at line 185 of file Option.C.

Referenced by OptionList::AsLong().

const char* Option::AsString ( ) const
inline
Returns
value as a C string

Definition at line 193 of file Option.C.

Referenced by OptionList::AsString().

const TString& Option::Get ( ) const
inline
Returns
constant reference to value

Definition at line 165 of file Option.C.

Referenced by OptionList::AsTString(), and OptionList::Get().

Bool_t Option::HasArg ( ) const
inline
Returns
true if this option needs an argument

Definition at line 173 of file Option.C.

Referenced by Help(), OptionList::Parse(), Reset(), Set(), Show(), Store(), and OptionList::Store().

void Option::Help ( std::ostream &  o,
Int_t  w = -1 
) const
inline

Show help

Parameters
oOutput stream
wWith of option plus argument

Definition at line 208 of file Option.C.

Referenced by OptionList::Help().

Bool_t Option::IsSet ( ) const
inline
Returns
true if this option was set externally

Definition at line 169 of file Option.C.

Referenced by OptionList::Has(), Help(), Show(), and OptionList::Store().

Int_t Option::NameWidth ( ) const
inline
Returns
Width of the name

Definition at line 197 of file Option.C.

Referenced by Help(), Show(), and OptionList::Widest().

Option& Option::operator= ( const Option other)
inline

Assignment operator

Parameters
otherObject to assign from
Returns
Reference to this object

Definition at line 104 of file Option.C.

void Option::Reset ( )
inline

Reset the set flag

Definition at line 157 of file Option.C.

void Option::Set ( const TString val)
inline

Set the value

Parameters
valNew value

Definition at line 121 of file Option.C.

Referenced by OptionList::Add(), OptionList::Parse(), OptionList::Set(), OptionList::SetF(), and OptionList::Test().

void Option::Set ( )
inline

Set the value

Definition at line 145 of file Option.C.

void Option::Show ( std::ostream &  o,
Int_t  w = -1 
) const
inline

Show the option

Parameters
oOutput stream
wWith of name

Definition at line 229 of file Option.C.

Referenced by OptionList::Show(), and OptionList::Test().

void Option::Store ( std::ostream &  o,
bool  quote = true 
) const
inline

Store option and possible value

Parameters
oOutput stream
quoteIf true, quote output

Definition at line 245 of file Option.C.

Referenced by OptionList::Store().

Member Data Documentation

TString Option::fArg

Definition at line 254 of file Option.C.

Referenced by ArgWidth(), HasArg(), Help(), and operator=().

TString Option::fDescription

Definition at line 252 of file Option.C.

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

Bool_t Option::fIsSet

Definition at line 255 of file Option.C.

Referenced by AsBool(), IsSet(), operator=(), Reset(), and Set().


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