Sierra Toolkit
Version of the Day
|
#include <Option.hpp>
Public Types | |
typedef OptionMask | Mask |
Mask for this option. | |
Public Member Functions | |
OptionMaskParser () | |
virtual | ~OptionMaskParser () |
const OptionMaskNameMap & | getOptionMaskNameMap () const |
virtual Mask | parse (const char *mask) const |
virtual void | parseArg (const std::string &name, const std::string &arg) const |
Mask & | operator[] (const std::string &name) |
void | mask (const std::string &name, const Mask l_mask, const std::string &description) |
std::ostream & | describe (std::ostream &os) const |
![]() | |
virtual | ~OptionDescription () |
Protected Attributes | |
OptionMaskNameMap | m_optionMaskNameMap |
Mask name vector. | |
OptionMask | m_optionMask |
Most recently parsed mask. | |
bool | m_status |
Result of most recent parse. | |
Class OptionMaskParser defines a mapping between strings and bit masks and output streams.
After populating a Parser object, parse() will parse the input string. The getMask() and virtual getOutputStream() functions will return the print parsed print mask and the selected output stream.
Definition at line 258 of file Option.hpp.
|
inline |
Creates a new OptionMaskParser instance.
Definition at line 268 of file Option.hpp.
|
inlinevirtual |
Destroys a OptionMaskParser instance.
Definition at line 278 of file Option.hpp.
|
virtual |
Member function parse parses the string
mask | a char const pointer of the string to parse. |
Reimplemented in sierra::Diag::TimerParser, and stk_classic::diag::WriterParser.
Definition at line 15 of file Option.cpp.
|
virtual |
Member function parseArg parses the argument and its argument values.
name | a std::string const reference to the argument name. |
arg | a std::string const reference to the argument values. |
Reimplemented in sierra::Diag::TimerParser, and stk_classic::diag::WriterParser.
Definition at line 93 of file Option.cpp.
|
inline |
Member function operator[] returns the print mask with the specified name. If the name is not found, a new entry is added.
name | a std::string const reference of the name of the mask. |
Definition at line 315 of file Option.hpp.
|
inline |
Member function mask adds a named mask to the parser. The mask can also be given a description which is displayed using the describe() function.
name | a std::string const reference of the name of the mask. |
mask | a Mask value to associate with the name |
description | a std::string const reference which describes the mask. |
Definition at line 332 of file Option.hpp.
|
virtual |
Member function describe ...
os | a std::ostream variable ... |
Implements stk_classic::diag::OptionDescription.
Definition at line 112 of file Option.cpp.