Gnash
0.8.10
|
An accumulating option value to handle multiple incrementing options. More...
#include <accumulator.h>
Public Member Functions | |
accumulator_type () | |
accumulator_type * | notifier (boost::function1< void, const T & > f) |
Set the notifier function. | |
accumulator_type * | default_value (const T &t) |
Set the default value for this option. | |
accumulator_type * | implicit_value (const T &t) |
Set the implicit value for this option. | |
virtual std::string | name () const |
virtual unsigned | min_tokens () const |
There are no tokens for an accumulator_type. | |
virtual unsigned | max_tokens () const |
virtual bool | is_composing () const |
Accumulating from different sources is silly. | |
virtual bool | is_required () const |
Requiring one or more appearances is unlikely. | |
virtual void | parse (boost::any &value_store, const std::vector< std::string > &new_tokens, bool) const |
Every appearance of the option simply increments the value. | |
virtual bool | apply_default (boost::any &value_store) const |
If the option doesn't appear, this is the default value. | |
virtual void | notify (const boost::any &value_store) const |
Notify the user function with the value of the value store. | |
virtual | ~accumulator_type () |
An accumulating option value to handle multiple incrementing options.
accumulator_type::accumulator_type | ( | ) | [inline] |
virtual accumulator_type::~accumulator_type | ( | ) | [inline, virtual] |
virtual bool accumulator_type::apply_default | ( | boost::any & | value_store | ) | const [inline, virtual] |
If the option doesn't appear, this is the default value.
accumulator_type* accumulator_type::default_value | ( | const T & | t | ) | [inline] |
Set the default value for this option.
References gnash::key::t.
accumulator_type* accumulator_type::implicit_value | ( | const T & | t | ) | [inline] |
Set the implicit value for this option.
Unlike for program_options::value, this specifies a value to be applied on each occurence of the option.
References gnash::key::t.
virtual bool accumulator_type::is_composing | ( | ) | const [inline, virtual] |
Accumulating from different sources is silly.
virtual bool accumulator_type::is_required | ( | ) | const [inline, virtual] |
Requiring one or more appearances is unlikely.
virtual unsigned accumulator_type::max_tokens | ( | ) | const [inline, virtual] |
virtual unsigned accumulator_type::min_tokens | ( | ) | const [inline, virtual] |
There are no tokens for an accumulator_type.
virtual std::string accumulator_type::name | ( | ) | const [inline, virtual] |
accumulator_type* accumulator_type::notifier | ( | boost::function1< void, const T & > | f | ) | [inline] |
Set the notifier function.
References gnash::key::f.
virtual void accumulator_type::notify | ( | const boost::any & | value_store | ) | const [inline, virtual] |
Notify the user function with the value of the value store.
virtual void accumulator_type::parse | ( | boost::any & | value_store, |
const std::vector< std::string > & | new_tokens, | ||
bool | |||
) | const [inline, virtual] |
Every appearance of the option simply increments the value.
There should never be any tokens.
References assert, and gnash::key::T.