SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProjectManifest.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #ifndef PROJECTMANIFEST_H
9 #define PROJECTMANIFEST_H
10 
11 #include <QtCore/QString>
12 #include <set>
13 
14 struct ServerDescriptor;
15 
17  QString m_relativePath;
18  mutable QString m_signature; // mutable since we can change this while not changing the sorted-by key
19  bool operator==(const FileDescription &other) const {
20  return m_relativePath==other.m_relativePath && m_signature==other.m_signature;
21  }
22  bool operator!=(const FileDescription &other) const {
23  return m_relativePath!=other.m_relativePath || m_signature!=other.m_signature;
24  }
25  // used by std::set to order file descriptions
26  bool operator<(const FileDescription &other) const { return m_relativePath<other.m_relativePath; }
27 };
29 {
30 public:
32  std::set<FileDescription> m_files;
33  QString m_version;
34 public:
36  void buildFromFileSystem(const QString &basePath);
37 
38  bool operator==(const AppVersionManifest &other) const;
39  bool operator!=(const AppVersionManifest &other) const { return !(*this==other); }
40 };
41 
42 bool loadFrom(AppVersionManifest &target, const QString &data);
43 bool storeTo(AppVersionManifest &target, QString &data);
44 
45 AppVersionManifest calculateDelta(const AppVersionManifest &old_version,const AppVersionManifest &new_version);
46 #endif // PROJECTMANIFEST_H
QString m_signature
Definition: ProjectManifest.h:18
Definition: ProjectManifest.h:28
bool operator==(const AppVersionManifest &other) const
Definition: ProjectManifest.cpp:84
AppVersionManifest()
Definition: ProjectManifest.cpp:34
bool operator!=(const AppVersionManifest &other) const
Definition: ProjectManifest.h:39
QString m_relativePath
Definition: ProjectManifest.h:17
bool storeTo(AppVersionManifest &target, QString &data)
Definition: ProjectManifest.cpp:128
Definition: ProjectDescriptor.h:24
bool operator!=(const FileDescription &other) const
Definition: ProjectManifest.h:22
std::set< FileDescription > m_files
Definition: ProjectManifest.h:32
const ServerDescriptor * m_associated_server
Definition: ProjectManifest.h:31
Definition: ProjectManifest.h:16
QString m_version
Definition: ProjectManifest.h:33
AppVersionManifest calculateDelta(const AppVersionManifest &old_version, const AppVersionManifest &new_version)
calculateDelta will build a &#39;delta&#39; manifest containing only &#39;new&#39; files
Definition: ProjectManifest.cpp:149
bool operator<(const FileDescription &other) const
Definition: ProjectManifest.h:26
void buildFromFileSystem(const QString &basePath)
Definition: ProjectManifest.cpp:49
bool loadFrom(BinStore *s, TextureAnim_Data &target)
Definition: anim_serializers.cpp:19
bool operator==(const FileDescription &other) const
Definition: ProjectManifest.h:19