|
||||
File indexing completed on 2025-01-18 10:15:36
0001 //------------------------------------------------------------------------------ 0002 // Copyright (c) 2011-2017 by European Organization for Nuclear Research (CERN) 0003 // Author: Krzysztof Jamrog <krzysztof.piotr.jamrog@cern.ch>, 0004 // Michal Simon <michal.simon@cern.ch> 0005 //------------------------------------------------------------------------------ 0006 // This file is part of the XRootD software suite. 0007 // 0008 // XRootD is free software: you can redistribute it and/or modify 0009 // it under the terms of the GNU Lesser General Public License as published by 0010 // the Free Software Foundation, either version 3 of the License, or 0011 // (at your option) any later version. 0012 // 0013 // XRootD is distributed in the hope that it will be useful, 0014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 0015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0016 // GNU General Public License for more details. 0017 // 0018 // You should have received a copy of the GNU Lesser General Public License 0019 // along with XRootD. If not, see <http://www.gnu.org/licenses/>. 0020 // 0021 // In applying this licence, CERN does not waive the privileges and immunities 0022 // granted to it by virtue of its status as an Intergovernmental Organization 0023 // or submit itself to any jurisdiction. 0024 //------------------------------------------------------------------------------ 0025 0026 #ifndef SRC_XRDCL_XRDCLFINALOPERATION_HH_ 0027 #define SRC_XRDCL_XRDCLFINALOPERATION_HH_ 0028 0029 #include <functional> 0030 0031 namespace XrdCl 0032 { 0033 class XRootDStatus; 0034 0035 //--------------------------------------------------------------------------- 0036 //! Final operation in the pipeline, always executed, no matter if the 0037 //! pipeline failed or not. 0038 //! 0039 //! Used to manage resources. 0040 //--------------------------------------------------------------------------- 0041 class FinalOperation 0042 { 0043 //declare friendship with other operations 0044 template<template<bool> class Derived, bool HasHndl, typename HdlrFactory, typename ... Args> 0045 friend class ConcreteOperation; 0046 0047 public: 0048 0049 //----------------------------------------------------------------------- 0050 //! Constructor 0051 //! 0052 //! @param final : the routine that should be called in order to finalize 0053 //! the pipeline 0054 //----------------------------------------------------------------------- 0055 FinalOperation( std::function<void(const XRootDStatus&)> final ) : final( std::move( final ) ) 0056 { 0057 } 0058 0059 private: 0060 0061 //----------------------------------------------------------------------- 0062 //! finalization routine 0063 //----------------------------------------------------------------------- 0064 std::function<void(const XRootDStatus&)> final; 0065 }; 0066 0067 typedef FinalOperation Final; 0068 } 0069 0070 #endif /* SRC_XRDCL_XRDCLFINALOPERATION_HH_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |