forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArchiveEntry.cpp
More file actions
81 lines (63 loc) · 1.38 KB
/
ArchiveEntry.cpp
File metadata and controls
81 lines (63 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// ArchiveEntry.cpp
//
// $Id$
//
// Library: SevenZip
// Package: Archive
// Module: ArchiveEntry
//
// Copyright (c) 2014, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SevenZip/ArchiveEntry.h"
#include <algorithm>
namespace Poco {
namespace SevenZip {
ArchiveEntry::ArchiveEntry():
_type(ENTRY_FILE),
_size(0),
_lastModified(0),
_attributes(0),
_index(0)
{
}
ArchiveEntry::ArchiveEntry(EntryType type, const std::string& path, Poco::UInt64 size, Poco::Timestamp lastModified, UInt32 attributes, Poco::UInt32 index):
_type(type),
_path(path),
_size(size),
_lastModified(lastModified),
_attributes(attributes),
_index(index)
{
}
ArchiveEntry::ArchiveEntry(const ArchiveEntry& entry):
_type(entry._type),
_path(entry._path),
_size(entry._size),
_lastModified(entry._lastModified),
_attributes(entry._attributes),
_index(entry._index)
{
}
ArchiveEntry::~ArchiveEntry()
{
}
ArchiveEntry& ArchiveEntry::operator = (const ArchiveEntry& entry)
{
ArchiveEntry temp(entry);
swap(temp);
return *this;
}
void ArchiveEntry::swap(ArchiveEntry& entry)
{
std::swap(_type, entry._type);
std::swap(_path, entry._path);
std::swap(_size, entry._size);
_lastModified.swap(entry._lastModified);
std::swap(_attributes, entry._attributes);
std::swap(_index, entry._index);
}
} } // namespace Poco::SevenZip