Generic pair of accumulators. More...
#include <pair.hh>
Public Types | |
typedef T | argument |
typedef Accumulator< void > | category |
typedef pair< A1, A2, T > | exact_t |
typedef std::pair< A1::result, A2::result > | q_result |
typedef mln::metal::unqualif < std::pair< A1::result, A2::result > >::ret | result |
typedef A1::result | result_1 |
typedef A2::result | result_2 |
Public Member Functions | |
A1::result | first () const |
Return the result of the first accumulator. | |
A1 | first_accu () const |
Return the first accumulator. | |
bool | is_valid () const |
Check whether this accu is able to return a result. | |
pair () | |
A2::result | second () const |
Return the result of the second accumulator. | |
A2 | second_accu () const |
Return the second accumulator. | |
std::pair< A1::result, A2::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". | |
void | init () |
Manipulators. | |
void | take_as_init_ (const argument &t) |
void | take (const argument &t) |
void | take (const pair< A1, A2, T > &other) |
std::pair< typename A1::result, typename A2::result > | to_result () const |
Get the value of the accumulator. | |
void | get_result (result_1 &r1, result_2 &r2) const |
Protected Attributes | |
A1 | a1_ |
A2 | a2_ |
Generic pair of accumulators.
The parameter T
is the type of values.
Definition at line 58 of file pair.hh.
typedef T mln::accu::pair< A1, A2, T >::argument |
typedef Accumulator<void> mln::Accumulator< pair< A1, A2, T > >::category [inherited] |
Reimplemented from mln::Proxy< pair< A1, A2, T > >.
Definition at line 80 of file accumulator.hh.
typedef pair< A1, A2, T > mln::Object< pair< A1, A2, T > >::exact_t [inherited] |
typedef std::pair< A1::result, A2::result > mln::accu::internal::base< std::pair< A1::result, A2::result > , pair< A1, A2, T > >::q_result [inherited] |
typedef mln::metal::unqualif< std::pair< A1::result, A2::result > >::ret mln::accu::internal::base< std::pair< A1::result, A2::result > , pair< A1, A2, T > >::result [inherited] |
typedef A1 ::result mln::accu::pair< A1, A2, T >::result_1 |
typedef A2 ::result mln::accu::pair< A1, A2, T >::result_2 |
mln::accu::pair< A1, A2, T >::pair | ( | ) | [inline] |
Definition at line 128 of file pair.hh.
References mln::accu::pair< A1, A2, T >::init().
A1::result mln::accu::pair< A1, A2, T >::first | ( | ) | const [inline] |
A1 mln::accu::pair< A1, A2, T >::first_accu | ( | ) | const [inline] |
void mln::accu::pair< A1, A2, T >::get_result | ( | result_1 & | r1, | |
result_2 & | r2 | |||
) | const [inline] |
void mln::accu::pair< A1, A2, T >::init | ( | ) | [inline] |
Manipulators.
Definition at line 136 of file pair.hh.
Referenced by mln::accu::pair< A1, A2, T >::pair().
bool mln::accu::pair< A1, A2, T >::is_valid | ( | ) | const [inline] |
A2::result mln::accu::pair< A1, A2, T >::second | ( | ) | const [inline] |
A2 mln::accu::pair< A1, A2, T >::second_accu | ( | ) | const [inline] |
std::pair< A1::result, A2::result > mln::accu::internal::base< std::pair< A1::result, A2::result > , pair< A1, A2, T > >::subj_ | ( | ) | [inherited] |
void mln::accu::pair< A1, A2, T >::take | ( | const pair< A1, A2, T > & | other | ) | [inline] |
Definition at line 163 of file pair.hh.
References mln::accu::pair< A1, A2, T >::a1_, and mln::accu::pair< A1, A2, T >::a2_.
void mln::accu::pair< A1, A2, T >::take | ( | const argument & | t | ) | [inline] |
void mln::Accumulator< pair< A1, A2, T > >::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::accu::pair< A1, A2, T >::take_as_init_ | ( | const argument & | t | ) | [inline] |
void mln::Accumulator< pair< A1, A2, T > >::take_as_init_ | ( | const T & | t | ) | [inherited] |
Default implementation of "take as initialization".
void mln::Accumulator< pair< A1, A2, T > >::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< pair< A1, A2, T > >::take_n_times_ | ( | unsigned | n, | |
const T & | t | |||
) | [inherited] |
Default implementation of "take n times".
std::pair< typename A1::result, typename A2::result > mln::accu::pair< A1, A2, T >::to_result | ( | ) | const [inline] |
A1 mln::accu::pair< A1, A2, T >::a1_ [protected] |
Definition at line 100 of file pair.hh.
Referenced by mln::accu::pair< A1, A2, T >::take().
A2 mln::accu::pair< A1, A2, T >::a2_ [protected] |
Definition at line 101 of file pair.hh.
Referenced by mln::accu::pair< A1, A2, T >::take().