paradiseo/trunk/paradiseo-eo/doc/man/man3/eoBinaryFunctorCounter.3
legrand c3aec878e5 Paradiseo-eo sources added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
2006-12-12 14:49:08 +00:00

64 lines
2.5 KiB
Groff

.TH "eoBinaryFunctorCounter" 3 "19 Oct 2006" "Version 0.9.4-cvs" "EO" \" -*- nroff -*-
.ad l
.nh
.SH NAME
eoBinaryFunctorCounter \- Generic counter class that counts the number of times a binary function is used.
.PP
.SH SYNOPSIS
.br
.PP
\fC#include <eoCounter.h>\fP
.PP
Inherits \fBeoValueParam< unsigned long >\fP.
.PP
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBeoBinaryFunctorCounter\fP (BinaryFunctor &_func, std::string _name='proc_counter')"
.br
.ti -1c
.RI "BinaryFunctor::result_type \fBoperator()\fP (typename BinaryFunctor::first_argument_type _arg1, typename BinaryFunctor::second_argument_type _arg2)"
.br
.RI "\fICalls the embedded function and increments the counter. \fP"
.in -1c
.SS "Private Attributes"
.in +1c
.ti -1c
.RI "BinaryFunctor & \fBfunc\fP"
.br
.in -1c
.SH "Detailed Description"
.PP
.SS "template<class BinaryFunctor> class eoBinaryFunctorCounter< BinaryFunctor >"
Generic counter class that counts the number of times a binary function is used.
Add a binary function through its ctor and use this class instead of it.
.PP
It is derived from \fBeoValueParam\fP so you can add it to a monitor.
.PP
Definition at line 142 of file eoCounter.h.
.SH "Member Function Documentation"
.PP
.SS "template<class BinaryFunctor> BinaryFunctor::result_type \fBeoBinaryFunctorCounter\fP< BinaryFunctor >::operator() (typename BinaryFunctor::first_argument_type _arg1, typename BinaryFunctor::second_argument_type _arg2)\fC [inline]\fP"
.PP
Calls the embedded function and increments the counter.
.PP
Note for MSVC users, if this code does not compile, you are quite likely trying to count a function that has a non-void return type. Don't look at us, look at the MSVC builders. Code like 'return void;' is perfectly legal according to the ANSI standard, but the guys at Microsoft didn't get to implementing it yet.
.PP
We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. Given that in \fBEO\fP most functors return void, it was chosen to support void.
.PP
But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite capable of compiling return void; type of code. We'll try to change the signature then.
.PP
You happy GNU (and other compiler) users will not have a problem with this.
.PP
Definition at line 166 of file eoCounter.h.
.PP
References eoValueParam< unsigned long >::value().
.SH "Author"
.PP
Generated automatically by Doxygen for EO from the source code.