1 | // |
2 | // ChecksumImpl.h |
3 | // |
4 | // Library: Foundation |
5 | // Package: Core |
6 | // Module: ChecksumImpl |
7 | // |
8 | // Definition of the ChecksumImpl class. |
9 | // |
10 | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. |
11 | // and Contributors. |
12 | // |
13 | // SPDX-License-Identifier: BSL-1.0 |
14 | // |
15 | |
16 | |
17 | #ifndef Foundation_ChecksumImpl_INCLUDED |
18 | #define Foundation_ChecksumImpl_INCLUDED |
19 | |
20 | |
21 | #include "Poco/Foundation.h" |
22 | |
23 | |
24 | namespace Poco { |
25 | |
26 | |
27 | class ChecksumImpl |
28 | { |
29 | public: |
30 | enum Type |
31 | { |
32 | TYPE_ADLER32_IMPL = 0, |
33 | TYPE_CRC32_IMPL, |
34 | TYPE_CRC64_IMPL |
35 | }; |
36 | |
37 | virtual ~ChecksumImpl() {} |
38 | virtual void update(const char* data, unsigned length) = 0; |
39 | virtual void update(const std::string& data) = 0; |
40 | virtual void update(char data) = 0; |
41 | virtual Poco::UInt64 checksum() const = 0; |
42 | virtual Type type() const = 0; |
43 | }; |
44 | |
45 | |
46 | } // namespace Poco |
47 | |
48 | |
49 | #endif // Foundation_ChecksumImpl_INCLUDED |
50 | |