#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/Core/Base/Trigger.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVL_TRIGGER_HEADER #define RAVL_TRIGGER_HEADER 1 ////////////////////////////////////////////////////////// //! rcsid="$Id: Trigger.hh,v 1.5 2002/05/21 14:45:43 craftit Exp $" //! file="Ravl/Core/Base/Trigger.hh" //! lib=RavlCore //! userlevel=Default //! author="Charles Galambos" //! date="24/01/2001" //! docentry="Ravl.Core.Calls" #include "Ravl/RCHandleV.hh" namespace RavlN { //! userlevel=Develop typedef void (*VoidFuncPtrT)(); //: Void function pointer. //:- //! userlevel=Develop //: Signal Event handle class TriggerBodyC : public RCBodyVC { public: TriggerBodyC() {} //: Default constructor. virtual void Invoke(); //: Trigger event. }; //! userlevel=Normal //: Signal Event handle class TriggerC : public RCHandleVC { public: TriggerC() {} //: Default constructor. // Creates an invalid handle. protected: TriggerC(TriggerBodyC &bod) : RCHandleVC(bod) {} //: Body constructor. TriggerBodyC &Body() { return RCHandleC::Body(); } //: Access body. const TriggerBodyC &Body() const { return RCHandleC::Body(); } //: Access body. public: void Invoke() { Body().Invoke(); } //: Invoke the method. void operator()() { Body().Invoke(); } //: Invoke the method. }; } #endif