XRootD
XrdClFinalOperation.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2011-2017 by European Organization for Nuclear Research (CERN)
3 // Author: Krzysztof Jamrog <krzysztof.piotr.jamrog@cern.ch>,
4 // Michal Simon <michal.simon@cern.ch>
5 //------------------------------------------------------------------------------
6 // This file is part of the XRootD software suite.
7 //
8 // XRootD is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Lesser General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // XRootD is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public License
19 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
20 //
21 // In applying this licence, CERN does not waive the privileges and immunities
22 // granted to it by virtue of its status as an Intergovernmental Organization
23 // or submit itself to any jurisdiction.
24 //------------------------------------------------------------------------------
25 
26 #ifndef SRC_XRDCL_XRDCLFINALOPERATION_HH_
27 #define SRC_XRDCL_XRDCLFINALOPERATION_HH_
28 
29 #include <functional>
30 
31 namespace XrdCl
32 {
33  class XRootDStatus;
34 
35  //---------------------------------------------------------------------------
40  //---------------------------------------------------------------------------
42  {
43  //declare friendship with other operations
44  template<template<bool> class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
45  friend class ConcreteOperation;
46 
47  public:
48 
49  //-----------------------------------------------------------------------
54  //-----------------------------------------------------------------------
55  FinalOperation( std::function<void(const XRootDStatus&)> final ) : final( std::move( final ) )
56  {
57  }
58 
59  private:
60 
61  //-----------------------------------------------------------------------
63  //-----------------------------------------------------------------------
64  std::function<void(const XRootDStatus&)> final;
65  };
66 
68 }
69 
70 #endif /* SRC_XRDCL_XRDCLFINALOPERATION_HH_ */
FinalOperation(std::function< void(const XRootDStatus &)> final)
FinalOperation Final