#ifndef FNOBJ_H
#define FNOBJ_H

/*
  Implmenting functional objects with virtual functions.

  Use templates if you want direct bindings, this is for
  dynamic purposes.
*/

/*! 
\brief Functional object with return and no arguments. 

The base class for functional objects with no arguments.
*/
template< class A0 >
class fnobj0
{
public:

  virtual A0 operator () () = 0;
  virtual ~fnobj0() {}
};

/*! 
\brief Functional object with return and no arguments. 

The base class for functional objects with no arguments.
*/
template< class A0 >
class fnobj0const
{
public:

  virtual A0 operator () () const = 0;
  virtual ~fnobj0const() {}
};


/*! 
\brief Functional object with return and one argument. 

The base class for functional objects with one argument.
*/
template< class A0, class A1 >
class fnobj1
{
public:

  virtual A0 operator () (A1) = 0;
  virtual ~fnobj1() {}
};

/*! 
\brief Functional object with return and one argument. 

The base class for functional objects with one argument.
*/
template< class A0, class A1 >
class fnobj1const
{
public:

  virtual A0 operator () (A1) const = 0;
  virtual ~fnobj1const() {}
};

/*! 
\brief Functional object with return and two arguments. 

The base class for functional objects with two arguments.
*/
template< class A0, class A1, class A2 >
class fnobj2
{
public:

  virtual A0 operator () (A1,A2) = 0;
  virtual ~fnobj2() {}
};

/*! 
\brief Functional object with return and two arguments. 

The base class for functional objects with two arguments.
*/
template< class A0, class A1, class A2 >
class fnobj2const
{
public:

  virtual A0 operator () (A1,A2) const = 0;
  virtual ~fnobj2const() {}
};


/*! 
\brief Functional object with return and three arguments. 

The base class for functional objects with three arguments.
*/
template< class A0, class A1, class A2, class A3 >
class fnobj3
{
public:

  virtual A0 operator () (A1,A2,A3) = 0;
  virtual ~fnobj3() {}
};

/*! 
\brief Functional object with return and three arguments. 

The base class for functional objects with three arguments.
*/
template< class A0, class A1, class A2, class A3 >
class fnobj3const
{
public:

  virtual A0 operator () (A1,A2,A3) const = 0;
  virtual ~fnobj3const() {}
};


#endif


