FBB::repeat

FBB::repeat

libbobcat1-dev_2.02.03-x.tar.gz

2005-2009


FBB::repeat(3bobcat)

FBB::repeat(3bobcat)

libbobcat1-dev_2.02.03-x.tar.gz Unary FnWrapper

2005-2009

NAME

FBB::repeat - call a (member) function a number of times

SYNOPSIS

#include <bobcat/foreach>

DESCRIPTION

The FBB::repeat function templates allows a function or function object to be called a certain number of times.

The STL repeat function templates requires a counter set to the number of times a function or function object is activated. No argument and no local context is passed to the function (object). The for_each function templates can be used for that.

The FBB::repeat function templates are defined inline, allowing the compiler to `optimize away' the repeat function call itself.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

OVERLOADED FUNCTIONS

In the following description several template type parameters are used. They are: Class and Member may also be defined as const objects.

EXAMPLES

#include <iostream>
#include <bobcat/repeat>

using namespace std;
using namespace FBB;

class Object
{
    public:
        void member();
};

void Object::member()
{
    cout << "member called\n";
}

int main(int argc, char **argv)
{
    Object object;

    repeat(argc, object, &Object::member);
}

FILES

bobcat/repeat - defines the class interface

SEE ALSO

bobcat(7), fnwrap1(3bobcat), fnwrap1c(3bobcat), fnwrap2(3bobcat), fnwrap2c(3bobcat), foreach(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).