Public Types | Public Member Functions | Protected Attributes

mln::accu::val< A > Struct Template Reference

Generic val of accumulators. More...

#include <v.hh>

Inheritance diagram for mln::accu::val< A >:
Inheritance graph

List of all members.

Public Types

typedef Accumulator< void > category
typedef val< 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
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.
 val ()
 val (const A &a)

void init ()
 Manipulators.
void take_as_init_ (const argument &t)
void take (const argument &t)
void take (const val< A > &other)
template<typename I >
void take_as_init_ (const util::pix< I > &pix)
template<typename I >
void take (const util::pix< I > &pix)

Protected Attributes

a_

Detailed Description

template<typename A>
struct mln::accu::val< A >

Generic val of accumulators.

Definition at line 50 of file v.hh.


Member Typedef Documentation

typedef Accumulator<void> mln::Accumulator< val< A > >::category [inherited]

Reimplemented from mln::Proxy< val< A > >.

Definition at line 80 of file accumulator.hh.

typedef val< A > mln::Object< val< A > >::exact_t [inherited]

Definition at line 173 of file object.hh.

typedef const A::result & mln::accu::internal::base< const A::result & , val< A > >::q_result [inherited]

Definition at line 58 of file base.hh.

typedef mln::metal::unqualif< const A::result & >::ret mln::accu::internal::base< const A::result & , val< A > >::result [inherited]

Definition at line 59 of file base.hh.


Constructor & Destructor Documentation

template<typename A >
mln::accu::val< A >::val (  )  [inline]

Definition at line 103 of file v.hh.

References mln::accu::val< A >::init().

template<typename A >
mln::accu::val< A >::val ( const A &  a  )  [inline]

Definition at line 110 of file v.hh.

References mln::accu::val< A >::init().


Member Function Documentation

template<typename A >
void mln::accu::val< A >::init (  )  [inline]

Manipulators.

Definition at line 119 of file v.hh.

References mln::accu::val< A >::a_.

Referenced by mln::accu::val< A >::val().

template<typename A >
bool mln::accu::val< A >::is_valid (  )  const [inline]

Check whether this accu is able to return a result.

Always true here.

Definition at line 177 of file v.hh.

References mln::accu::val< A >::a_.

template<typename A>
typedef mln::accu::val< A >::mln_argument (  ) 
const A::result & mln::accu::internal::base< const A::result & , val< A > >::subj_ (  )  [inherited]
template<typename A >
void mln::accu::val< A >::take ( const argument &  t  )  [inline]

Definition at line 135 of file v.hh.

References mln::accu::val< A >::a_.

template<typename A >
void mln::accu::val< A >::take ( const val< A > &  other  )  [inline]

Definition at line 143 of file v.hh.

References mln::accu::val< A >::a_.

template<typename A >
template<typename I >
void mln::accu::val< A >::take ( const util::pix< I > &  pix  )  [inline]

Definition at line 161 of file v.hh.

References mln::accu::val< A >::a_, and mln::util::pix< I >::v().

void mln::Accumulator< val< 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 '_').

template<typename A >
void mln::accu::val< A >::take_as_init_ ( const argument &  t  )  [inline]

Definition at line 127 of file v.hh.

References mln::accu::val< A >::a_.

void mln::Accumulator< val< A > >::take_as_init_ ( const T &  t  )  [inherited]

Default implementation of "take as initialization".

template<typename A >
template<typename I >
void mln::accu::val< A >::take_as_init_ ( const util::pix< I > &  pix  )  [inline]

Definition at line 152 of file v.hh.

References mln::accu::val< A >::a_, and mln::util::pix< I >::v().

void mln::Accumulator< val< 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< val< A > >::take_n_times_ ( unsigned  n,
const T &  t 
) [inherited]

Default implementation of "take n times".

template<typename A >
const A::result & mln::accu::val< A >::to_result (  )  const [inline]

Get the value of the accumulator.

Definition at line 169 of file v.hh.

References mln::accu::val< A >::a_.


Member Data Documentation

template<typename A>
A mln::accu::val< A >::a_ [protected]