Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00:32

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 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 #ifndef __GAUDI_INTERFACES_IVALIDITY_H__
0012 #define __GAUDI_INTERFACES_IVALIDITY_H__
0013 
0014 #include "GaudiKernel/Kernel.h"
0015 namespace Gaudi {
0016   class Time;
0017 }
0018 
0019 /// @class IValidity IValidity.h GaudiKernel/IValidity.h
0020 /// Interface for objects with a validity
0021 class GAUDI_API IValidity {
0022 public:
0023   /// Check if the object is valid (it can be always invalid).
0024   virtual bool isValid() const = 0;
0025 
0026   /// Check if the object is valid for the specified point in time.
0027   virtual bool isValid( const Gaudi::Time& ) const = 0;
0028 
0029   /// Returns the start of validity of the object.
0030   virtual const Gaudi::Time& validSince() const = 0;
0031 
0032   /// Returns the end of validity of the object.
0033   virtual const Gaudi::Time& validTill() const = 0;
0034 
0035   /// Set the interval of validity of the object.
0036   virtual void setValidity( const Gaudi::Time&, const Gaudi::Time& ) = 0;
0037 
0038   /// Sets the start of validity of the object.
0039   virtual void setValiditySince( const Gaudi::Time& ) = 0;
0040 
0041   /// Sets the end of validity of the object.
0042   virtual void setValidityTill( const Gaudi::Time& ) = 0;
0043 
0044   /// destructor
0045   virtual ~IValidity() = default;
0046 };
0047 
0048 #endif //  __GAUDI_INTERFACES_IVALIDITY_H__