bit7z 4.1.0
A C++ library for interfacing with the 7-zip shared libs.
Loading...
Searching...
No Matches
bitgenericitem.hpp
1/*
2 * bit7z - A C++ static library to interface with the 7-zip shared libraries.
3 * Copyright (c) Riccardo Ostani - All Rights Reserved.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef BITGENERICITEM_HPP
11#define BITGENERICITEM_HPP
12
13#include "bitdefines.hpp"
14#include "bitpropvariant.hpp"
15#include "bittypes.hpp"
16
17#include <cstdint>
18
19namespace bit7z {
20
24class BitGenericItem {
25 public:
29 BIT7Z_NODISCARD
30 virtual auto isDir() const -> bool = 0;
31
35 BIT7Z_NODISCARD
36 virtual auto isSymLink() const -> bool = 0;
37
41 BIT7Z_NODISCARD
42 virtual auto size() const -> std::uint64_t = 0;
43
47 BIT7Z_NODISCARD
48 virtual auto name() const -> tstring = 0;
49
53 BIT7Z_NODISCARD
54 virtual auto path() const -> tstring = 0;
55
59 BIT7Z_NODISCARD
60 virtual auto attributes() const -> std::uint32_t = 0;
61
69 BIT7Z_NODISCARD
70 virtual auto itemProperty( BitProperty property ) const -> BitPropVariant = 0;
71
72 virtual ~BitGenericItem() = default;
73
74 protected:
75 BitGenericItem() = default;
76
77 BitGenericItem( const BitGenericItem& ) = default;
78
79 BitGenericItem( BitGenericItem&& ) noexcept = default;
80
81 auto operator=( const BitGenericItem& ) -> BitGenericItem& = default;
82
83 auto operator=( BitGenericItem&& ) noexcept -> BitGenericItem& = default;
84};
85
86} // namespace bit7z
87
88#endif //BITGENERICITEM_HPP
virtual auto isSymLink() const -> bool=0
virtual auto itemProperty(BitProperty property) const -> BitPropVariant=0
Gets the specified item property.
virtual auto attributes() const -> std::uint32_t=0
virtual auto path() const -> tstring=0
virtual auto size() const -> std::uint64_t=0
virtual auto name() const -> tstring=0
virtual auto isDir() const -> bool=0
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
BitProperty
The BitProperty enum represents the archive/item properties that 7-zip can read or write.
Definition bitpropvariant.hpp:32
std::basic_string< tchar > tstring
Definition bittypes.hpp:104
The BitPropVariant struct is a light extension to the WinAPI PROPVARIANT struct providing useful gett...
Definition bitpropvariant.hpp:161