|
Sierra Toolkit
Version of the Day
|
#include <WriterParser.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 |
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 255 of file WriterParser.hpp.
| stk::diag::OptionMaskParser::OptionMaskParser | ( | ) | [inline] |
Creates a new OptionMaskParser instance.
Definition at line 265 of file WriterParser.hpp.
| virtual stk::diag::OptionMaskParser::~OptionMaskParser | ( | ) | [inline, virtual] |
Destroys a OptionMaskParser instance.
Definition at line 275 of file WriterParser.hpp.
| OptionMaskParser::Mask stk::diag::OptionMaskParser::parse | ( | const char * | mask | ) | const [virtual] |
Member function parse parses the string
| mask | a char const pointer of the string to parse. |
Reimplemented in stk::diag::WriterParser.
Definition at line 98 of file WriterParser.cpp.
| void stk::diag::OptionMaskParser::parseArg | ( | const std::string & | name, |
| const std::string & | arg | ||
| ) | const [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 stk::diag::WriterParser.
Definition at line 176 of file WriterParser.cpp.
| Mask& stk::diag::OptionMaskParser::operator[] | ( | const std::string & | name | ) | [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 312 of file WriterParser.hpp.
| void stk::diag::OptionMaskParser::mask | ( | const std::string & | name, |
| const Mask | l_mask, | ||
| const std::string & | description | ||
| ) | [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 329 of file WriterParser.hpp.
| std::ostream & stk::diag::OptionMaskParser::describe | ( | std::ostream & | os | ) | const [virtual] |
Member function describe ...
| os | a std::ostream variable ... |
Implements stk::diag::OptionDescription.
Definition at line 195 of file WriterParser.cpp.