* indentations + whitespace cleanup

This commit is contained in:
Caner Candan 2011-05-05 16:54:00 +02:00
commit 56c6edab04
285 changed files with 6068 additions and 6223 deletions

View file

@ -3,7 +3,7 @@
//-----------------------------------------------------------------------------
// eoCounter.h
// (c) Maarten Keijzer 2000
/*
/*
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@ -31,9 +31,9 @@
#include <utils/eoParam.h>
/**
Generic counter class that counts the number of times
a procedure is used. Add a procedure through its ctor and
use this class instead of it.
Generic counter class that counts the number of times
a procedure is used. Add a procedure through its ctor and
use this class instead of it.
It is derived from eoValueParam so you can add it to a monitor.
@ -44,21 +44,21 @@ class eoProcedureCounter : public Procedure, public eoValueParam<unsigned long>
{
public:
eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter")
eoProcedureCounter(Procedure& _proc, std::string _name = "proc_counter")
: eoValueParam<unsigned long>(0, _name), proc(_proc) {}
/** Calls the embedded function and increments the counter
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.
Microsoft didn't get to implementing it yet.
We had two choices: assuming (and compiling ) code that returns void or code that returns non-void.
Given that in EO most functors return void, it was chosen to support void.
But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite
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.
You happy GNU (and other compiler) users will not have a problem with this..
@ -79,39 +79,39 @@ class eoProcedureCounter : public Procedure, public eoValueParam<unsigned long>
};
/**
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.
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.
It is derived from eoValueParam so you can add it to a monitor.
Example: suppose you have an eoEvalFunc called myeval, to count the
Example: suppose you have an eoEvalFunc called myeval, to count the
number of evaluations, just define:
eoUnaryFunctorCounter<void, EoType> evalCounter(myeval);
and use evalCounter now instead of myeval.
and use evalCounter now instead of myeval.
*/
template <class UnaryFunctor>
class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam<unsigned long>
{
public:
eoUnaryFunctorCounter(UnaryFunctor& _func, std::string _name = "uf_counter")
eoUnaryFunctorCounter(UnaryFunctor& _func, std::string _name = "uf_counter")
: eoValueParam<unsigned long>(0, _name), func(_func) {}
/** Calls the embedded function and increments the counter
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.
Microsoft didn't get to implementing it yet.
We had two choices: assuming (and compiling ) code that returns void or code that returns non-void.
Given that in EO most functors return void, it was chosen to support void.
But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite
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.
You happy GNU (and other compiler) users will not have a problem with this.
@ -133,10 +133,10 @@ class eoUnaryFunctorCounter : public UnaryFunctor, public eoValueParam<unsigned
};
/**
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.
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.
It is derived from eoValueParam so you can add it to a monitor.
*/
@ -144,28 +144,28 @@ template <class BinaryFunctor>
class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam<unsigned long>
{
public:
eoBinaryFunctorCounter(BinaryFunctor& _func, std::string _name = "proc_counter")
eoBinaryFunctorCounter(BinaryFunctor& _func, std::string _name = "proc_counter")
: eoValueParam<unsigned long>(0, _name), func(_func) {}
/** Calls the embedded function and increments the counter
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.
Microsoft didn't get to implementing it yet.
We had two choices: assuming (and compiling ) code that returns void or code that returns non-void.
Given that in EO most functors return void, it was chosen to support void.
But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite
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.
You happy GNU (and other compiler) users will not have a problem with this.
*/
typename BinaryFunctor::result_type operator()
(typename BinaryFunctor::first_argument_type _arg1,
(typename BinaryFunctor::first_argument_type _arg1,
typename BinaryFunctor::second_argument_type _arg2)
{
value()++;
@ -185,7 +185,7 @@ class eoBinaryFunctorCounter : public BinaryFunctor, public eoValueParam<unsigne
how it works...
by using the xxx_function_tag structure defined in eoFunctionBase, you
by using the xxx_function_tag structure defined in eoFunctionBase, you
can easily create a counter from a general class (say eoEval<EOT>), by
simply stating: