CancelRetrieveRequest.cpp 2.33 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * The CERN Tape Archive (CTA) project
 * Copyright (C) 2015  CERN
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "common/dataStructures/CancelRetrieveRequest.hpp"
20
#include "common/dataStructures/utils.hpp"
21
22
#include "common/exception/Exception.hpp"

23
24
25
26
namespace cta {
namespace common {
namespace dataStructures {

Daniele Kruse's avatar
Daniele Kruse committed
27
28
29
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
30
CancelRetrieveRequest::CancelRetrieveRequest():
Daniele Kruse's avatar
Daniele Kruse committed
31
32
  archiveFileID(0) {}

33
//------------------------------------------------------------------------------
34
// operator==
35
//------------------------------------------------------------------------------
36
bool CancelRetrieveRequest::operator==(const CancelRetrieveRequest &rhs) const {
37
38
  return requester==rhs.requester
      && archiveFileID==rhs.archiveFileID
39
      && dstURL==rhs.dstURL
40
      && diskFileInfo==rhs.diskFileInfo;
41
42
43
}

//------------------------------------------------------------------------------
44
// operator!=
45
//------------------------------------------------------------------------------
46
bool CancelRetrieveRequest::operator!=(const CancelRetrieveRequest &rhs) const {
47
  return !operator==(rhs);
48
49
50
}

//------------------------------------------------------------------------------
51
// operator<<
52
//------------------------------------------------------------------------------
53
std::ostream &operator<<(std::ostream &os, const CancelRetrieveRequest &obj) {
54
55
  os << "(requester=" << obj.requester
     << " archiveFileID=" << obj.archiveFileID
56
     << " dstURL=" << obj.dstURL
57
     << " diskFileInfo=" << obj.diskFileInfo << ")";
58
  return os;
59
60
}

61
62
63
} // namespace dataStructures
} // namespace common
} // namespace cta