.TH "eoUnaryFunctorCounter" 3 "19 Oct 2006" "Version 0.9.4-cvs" "EO" \" -*- nroff -*- .ad l .nh .SH NAME eoUnaryFunctorCounter \- Generic counter class that counts the number of times a unary function is used. .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP Inherits \fBeoValueParam< unsigned long >\fP. .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBeoUnaryFunctorCounter\fP (UnaryFunctor &_func, std::string _name='uf_counter')" .br .ti -1c .RI "UnaryFunctor::result_type \fBoperator()\fP (typename UnaryFunctor::first_argument_type _arg1)" .br .RI "\fICalls the embedded function and increments the counter. \fP" .in -1c .SS "Private Attributes" .in +1c .ti -1c .RI "UnaryFunctor & \fBfunc\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template class eoUnaryFunctorCounter< UnaryFunctor >" Generic counter class that counts the number of times a unary function is used. Add a unary 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 Example: suppose you have an \fBeoEvalFunc\fP called myeval, to count the number of evaluations, just define: .PP eoUnaryFunctorCounter evalCounter(myeval); .PP and use evalCounter now instead of myeval. .PP Definition at line 95 of file eoCounter.h. .SH "Member Function Documentation" .PP .SS "template UnaryFunctor::result_type \fBeoUnaryFunctorCounter\fP< UnaryFunctor >::operator() (typename UnaryFunctor::first_argument_type _arg1)\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 118 of file eoCounter.h. .PP References eoValueParam< unsigned long >::value(). .SH "Author" .PP Generated automatically by Doxygen for EO from the source code.