BinaryFunction

This is an abstract class and cannot be directly instanced.

[ Samples | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

template <class T1, class T2, class R> struct BinaryFunction
{
public:
R operator() (T1, T2) const; // pure virtual
protected:
}; // BinaryFunction

Back to the top of BinaryFunction

DESCRIPTION

BinaryFunction is an abstract class that as the base class for function objects that take two parameters of type T1 and T2 and returns an object of type R. The parameter types T1, T2, and R may, or may not, all be the same type.

The BinaryFunction class defines one pure virtual function, which is operator(). Any class which inherits fron BinaryFunction must override the operator() before it can be used.

BinaryFunction also defines three typedefs for BinaryFunction objects. They are:

  • first_arg_type,
  • second_arg_type, and
  • result_type;
  • Back to the top of BinaryFunction

    R operator() (T1, T2) const;

    A pure virtual operator. Child class must implement operator() before they can be instantiated. A binary function takes two paramters of type T1 and T2 and returns an object of type R

        virtual R operator() (T1, T2) const;    
    

    Back to the top of BinaryFunction

    All Members

    public:
    R operator() (T1, T2) const; // pure virtual
    protected:

    Back to the top of BinaryFunction

    Ancestors

    Class does not inherit from any other class.

    Back to the top of BinaryFunction

    Descendants

    Back to the top of BinaryFunction

    Generated from source by the Cocoon utilities on Fri Jan 26 13:37:35 2001 .

    Report problems to jkotula@vitalimages.com