DiskFileInfo.cpp 2.19 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * 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/>.
 */

19
#include "common/dataStructures/DiskFileInfo.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
DiskFileInfo::DiskFileInfo() {}
Daniele Kruse's avatar
Daniele Kruse committed
31

32
//------------------------------------------------------------------------------
33
// operator==
34
//------------------------------------------------------------------------------
35
36
37
38
39
bool DiskFileInfo::operator==(const DiskFileInfo &rhs) const {
  return path==rhs.path
      && owner==rhs.owner
      && group==rhs.group
      && recoveryBlob==rhs.recoveryBlob;
40
41
42
}

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

//------------------------------------------------------------------------------
50
// operator<<
51
//------------------------------------------------------------------------------
52
53
54
55
56
std::ostream &operator<<(std::ostream &os, const DiskFileInfo &obj) {
  os << "(path=" << obj.path
     << " owner=" << obj.owner
     << " group=" << obj.group
     << " recoveryBlob=" << obj.recoveryBlob << ")";
57
  return os;
58
59
}

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