Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWTFunctorR0<SR>


RWTFunctorR0<SR> RWHandleBase

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

Data Types

Member Functions

Package

Functor

Header File

#include <rw/functor/functorR0.h>

Description

RWTFunctorR0<SR> represents the group of functors that are invoked without any arguments, and whose invocation returns a 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 RWTFunctorR0 act as handles to functor implementations or bodies. Such implementations are created by using either the rwtMakeFunctorR0() 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, the encapsulated function may have up to 3 arguments.

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.

Example

Public Typedefs

typedef SR (*CallerSignature)(void);
typedef SR SRType;

Public Constructors

RWTFunctorR0(void);
RWTFunctorR0(RWStaticCtor);
RWTFunctorR0(const RWTFunctorR0<SR>& second);

Public Operators

RWTFunctorR0<SR>& 
operator=(const RWTFunctorR0<SR>& second);
SR 
operator()(void) const;

See Also

rwtMakeFunctorR0



Previous fileTop of DocumentContentsIndexNext file

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