Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWFunctor0


RWFunctor0 RWHandleBase

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Data Types

Member Functions

Package

Functor

Header File

#include <rw/functor/functor0.h>

Description

RWFunctor0 represents the group of functors that are invoked without any arguments and whose invocation returns no value.

A function object, or a functor, is an object that encapsulates a call to an associated global or member function. When a functor is invoked, it calls the associated function.

Instances of class RWFunctor0 act as handles to functor implementations or bodies. Such implementations are created by using either the rwtMakeFunctor0() global functions or macros. Each of these methods creates a new body instance, and returns the handle to that instance. See the example below.

Note that although an instance of this class is invoked with no arguments, and returns no value, the encapsulated function may have both arguments and a return value.

The arguments that will be passed to the encapsulated function are provided to the functor at the time of creation. They are stored within the functor object, and are retrieved at the time of invocation.

Any return value of the function will be ignored by the functor, and hence not passed back to the user. If you are interested in the function's return value, see the RWTFunctorR0 group of classes.

Example

Public Typedef

typedef void (*CallerSignature)(void);

Public Constructors

RWFunctor0(void);
RWFunctor0(RWStaticCtor);
RWFunctor0(const RWFunctor0& second);

Public Operators

RWFunctor0& 
operator=(const RWFunctor0& second);
void 
operator()(void) const;

See Also

rwtMakeFunctor0



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.