Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-26 09:01:11

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
0010 \***********************************************************************************/
0011 #pragma once
0012 
0013 #include <GaudiKernel/StateMachine.h>
0014 
0015 namespace Gaudi {
0016   /**
0017    *  Interface defining a CallBack registration functionality based on the
0018    *  State Machine of Gaudi. Callbacks are std::function which can be registered
0019    *  for each transition. They will then be called automatically just after
0020    *  the transition took place in the order in which they have been registered.
0021    */
0022   struct IFSMCallbackHolder : virtual public IInterface {
0023 
0024   public:
0025     DeclareInterfaceID( IFSMCallbackHolder, 1, 0 );
0026 
0027     using CallBack                                                      = std::function<void()>;
0028     virtual void registerCallBack( StateMachine::Transition, CallBack ) = 0;
0029   };
0030 } // namespace Gaudi