NAME
ACE_Command_Base -
Defines an abstract class that allows us to invoke commands
without knowing anything about the implementation.
SYNOPSIS
#include <ace/Functor.h>
class ACE_Command_Base
{
public:
ACE_Command_Base (void);
virtual ~ACE_Command_Base (void);
virtual int execute (void *arg = 0) = 0;
};
DESCRIPTION
Non-templatized classes and class template specializations for
implementing function objects that are used in various places
in ACE. There are currently two major categories of function
objects in ACE: GOF Command Pattern objects, and STL-style
functors for comparison of container elements. The command objects
are invoked via an execute () method, while the STL-style functors are
invoked via an operator() () method.
Non-templatized classes for implementing the GOF Command Pattern,
also known as functors or function objects.
Initialization and termination methods.
ACE_Command_Base (void);
virtual ~ACE_Command_Base (void);
virtual int execute (void *arg = 0) = 0;
Invokes the method encapsulated by the command, passing along the
passed argument (if any). Users of classes derived from this
class must ensure that the resulting invocation can tolerate a
null void pointer being passed, or otherwise ensure that this
will never occur.
AUTHOR
Chris Gill cdgill@cs.wustl.edu
Based on Command Pattern implementations originally done by
Carlos O'Ryan coryan@cs.wustl.edu
and
Douglas C. Schmidt schmidt@cs.wustl.edu
and
Sergio Flores-Gaitan sergio@cs.wustl.edu
and on STL-style functor implementations originally done by
Irfan Pyarali irfan@cs.wustl.edu
LIBRARY
ace