Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWTFunctorMap2


RWTFunctorMap2 RWTFunctor2

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

Data Types

Member Functions

Package

Functor Map, subpackage of Functor

Header File

#include <rw/functor/map/RWTFunctorMap2.h>

Description

The RWTFunctorMap2 class represents the functor maps that take two arguments at invocation time. Since one of these arguments is the key into the map, the functors that are held in the map take only one argument; they are RWTFunctor1<S1> functors.

Functor maps allow functors to be grouped together in a key/value table structure. They add functors to the map with a corresponding key of type key_type, later using it to invoke the desired functor.

Example

Public Typedefs

typedef Key key_type;
typedef unsigned  (*hash_function)(const Key&);

Public Constructors

RWTFunctorMap2(hash_function hf, 
               size_t size = RW_FUNCTOR_MAP_CAPACITY);
RWTFunctorMap2(const RWTFunctorMap2<key_type,S1>& second);

Public Operators

RWTFunctorMap2<key_type,S1>& 
operator=(const RWTFunctorMap2<key_type,S1>& second);
void 
operator()(key_type key, S1 s1) const;

Public Member Functions

RWBoolean 
add(key_type key, RWTFunctor1<S1> functor);
void 
clear();
RWBoolean 
contains(key_type key) const;
size_t 
entries() const;
RWBoolean 
find(key_type key, RWTFunctor1<S1>& functor) const;
RWTFunctor1<S1> 
getDefault() const;
RWBoolean 
remove(key_type key);
void 
resize(size_t size);
void 
setDefault(RWTFunctor1<S1> functor);


Previous fileTop of DocumentContentsIndexNext file

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