Generic p of accumulators. More...
#include <p.hh>
Public Types | |
typedef Accumulator< void > | category |
typedef p< A > | exact_t |
typedef const A::result & | q_result |
typedef mln::metal::unqualif < const A::result & >::ret | result |
Public Member Functions | |
bool | is_valid () const |
Check whether this accu is able to return a result. | |
typedef | mln_argument (A) argument |
p () | |
p (const A &a) | |
const A::result & | subj_ () |
void | take_as_init (const T &t) |
Take as initialization the value t . | |
void | take_as_init_ (const T &t) |
Default implementation of "take as initialization". | |
void | take_n_times (unsigned n, const T &t) |
Take n times the value t . | |
void | take_n_times_ (unsigned n, const T &t) |
Default implementation of "take n times". | |
const A::result & | to_result () const |
Get the value of the accumulator. | |
void | init () |
Manipulators. | |
void | take_as_init_ (const argument &t) |
void | take (const argument &t) |
void | take (const p< A > &other) |
Protected Attributes | |
A | a_ |
Generic p of accumulators.
The parameter V
is the type of values.
typedef Accumulator<void> mln::Accumulator< p< A > >::category [inherited] |
Reimplemented from mln::Proxy< p< A > >.
typedef p< A > mln::Object< p< A > >::exact_t [inherited] |
typedef const A::result & mln::accu::internal::base< const A::result & , p< A > >::q_result [inherited] |
typedef mln::metal::unqualif< const A::result & >::ret mln::accu::internal::base< const A::result & , p< A > >::result [inherited] |
mln::accu::p< A >::p | ( | ) | [inline] |
References mln::accu::p< A >::init().
mln::accu::p< A >::p | ( | const A & | a | ) | [inline] |
References mln::accu::p< A >::init().
void mln::accu::p< A >::init | ( | ) | [inline] |
bool mln::accu::p< A >::is_valid | ( | ) | const [inline] |
Check whether this accu is able to return a result.
Always true here.
References mln::accu::p< A >::a_.
typedef mln::accu::p< A >::mln_argument | ( | A | ) |
const A::result & mln::accu::internal::base< const A::result & , p< A > >::subj_ | ( | ) | [inherited] |
void mln::accu::p< A >::take | ( | const argument & | t | ) | [inline] |
References mln::accu::p< A >::a_.
void mln::accu::p< A >::take | ( | const p< A > & | other | ) | [inline] |
References mln::accu::p< A >::a_.
void mln::Accumulator< p< A > >::take_as_init | ( | const T & | t | ) | [inherited] |
Take as initialization the value t
.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
void mln::Accumulator< p< A > >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
void mln::accu::p< A >::take_as_init_ | ( | const argument & | t | ) | [inline] |
References mln::accu::p< A >::a_.
void mln::Accumulator< p< A > >::take_n_times | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Take n
times the value t
.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
void mln::Accumulator< p< A > >::take_n_times_ | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Default implementation of "take n times".
const A::result & mln::accu::p< A >::to_result | ( | ) | const [inline] |
Get the value of the accumulator.
References mln::accu::p< A >::a_.
A mln::accu::p< A >::a_ [protected] |