cafe::Function Class Reference
[CAF Environment (Cafe)]

#include <Function.hpp>

Inheritance diagram for cafe::Function:

cafe::Processor List of all members.

Detailed Description

A Processor encapsulating a normal C++ function.

The function's signature should be:

User functions that don't inherit from Processor are encapsulated in an object of this type. A normal user should never have to use this.

Definition at line 23 of file Function.hpp.

Public Types

typedef bool(* FUNC )(cafe::Event &)

Public Member Functions

 Function (const char *name)
 Function (const std::string &name, FUNC func)
virtual bool processEvent (Event &event)
 Called for every event.

 ClassDef (Function, 0)

Private Types

typedef std::map< std::string,
FUNC
Map

Static Private Member Functions

MapgetMap ()

Private Attributes

FUNC _func

Friends

class Function::Register


Member Typedef Documentation

typedef bool(* cafe::Function::FUNC)(cafe::Event&)
 

Definition at line 25 of file Function.hpp.

Referenced by cafe::Function::Register::Register().

typedef std::map<std::string,FUNC> cafe::Function::Map [private]
 

Definition at line 45 of file Function.hpp.

Referenced by getMap().


Constructor & Destructor Documentation

cafe::Function::Function const char *  name  ) 
 

Definition at line 11 of file Function.cpp.

References _func, getMap(), and cafe::Processor::name().

cafe::Function::Function const std::string &  name,
FUNC  func
 


Member Function Documentation

cafe::Function::ClassDef Function  ,
 

Function::Map & cafe::Function::getMap  )  [static, private]
 

Definition at line 43 of file Function.cpp.

References Map.

Referenced by Function(), and cafe::Function::Register::Register().

bool cafe::Function::processEvent Event event  )  [virtual]
 

Called for every event.

Reimplemented from cafe::Processor.

Definition at line 33 of file Function.cpp.

References _func, cafe::Processor::err(), and cafe::Processor::name().


Friends And Related Function Documentation

friend class Function::Register [friend]
 

Definition at line 43 of file Function.hpp.


Member Data Documentation

FUNC cafe::Function::_func [private]
 

Definition at line 41 of file Function.hpp.

Referenced by Function(), and processEvent().


The documentation for this class was generated from the following files:
Generated on Thu Apr 3 04:14:27 2008 for CAF by doxygen 1.3.4