File indexing completed on 2024-04-28 03:50:19
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Daniel Marth <danielmarth@gmx.at> 0004 // 0005 0006 #ifndef OPENCACHINGCACHELOG_H 0007 #define OPENCACHINGCACHELOG_H 0008 0009 #include "OpenCachingCacheLogEntry.h" 0010 0011 #include <QList> 0012 0013 namespace Marble 0014 { 0015 0016 /** 0017 * All log entries for a cache. 0018 */ 0019 class OpenCachingCacheLog 0020 { 0021 public: 0022 OpenCachingCacheLog(); 0023 0024 OpenCachingCacheLogEntry& operator[]( int index ); 0025 0026 void setCacheId( unsigned long long cacheId ); 0027 0028 unsigned long long cacheId() const; 0029 0030 void addLogEntry( const OpenCachingCacheLogEntry& logEntry ); 0031 0032 void removeLogEntry( int index ); 0033 0034 int size() const; 0035 0036 void clear(); 0037 0038 int currentIndex() const; 0039 0040 private: 0041 unsigned long long m_cacheId; ///< Unique ID of the cache. 0042 0043 QList<OpenCachingCacheLogEntry> m_logEntries; ///< All log entries. 0044 }; 0045 0046 } 0047 #endif // OPENCACHINGCACHELOG_H