Public Types | Public Member Functions | Protected Attributes

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

Generic p of accumulators. More...

#include <p.hh>

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

List of all members.

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_

Detailed Description

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

Generic p of accumulators.

The parameter V is the type of values.

Definition at line 50 of file p.hh.


Member Typedef Documentation

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

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

Definition at line 80 of file accumulator.hh.

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

Definition at line 173 of file object.hh.

typedef const A::result & mln::accu::internal::base< const A::result & , p< 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 & , p< A > >::result [inherited]

Definition at line 59 of file base.hh.


Constructor & Destructor Documentation

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

Definition at line 99 of file p.hh.

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

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

Definition at line 106 of file p.hh.

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


Member Function Documentation

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

Manipulators.

Definition at line 115 of file p.hh.

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

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

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

Check whether this accu is able to return a result.

Always true here.

Definition at line 155 of file p.hh.

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

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

Definition at line 131 of file p.hh.

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

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

Definition at line 139 of file p.hh.

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".

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

Definition at line 123 of file p.hh.

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".

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

Get the value of the accumulator.

Definition at line 147 of file p.hh.

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


Member Data Documentation

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