SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
keybind_serializers.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 
10 #include "keybind_definitions.h"
11 
12 #include <stdint.h>
13 #include <vector>
14 
15 class BinStore;
16 class QString;
17 class KeybindSettings;
18 
19 using Parse_AllKeyProfiles = std::vector<struct Keybind_Profiles>;
20 using Parse_AllCommandCategories = std::vector<struct CommandCategory_Entry>;
21 
22 constexpr const static uint32_t keyprofile_i0_requiredCrc = 0x4513EAB7;
23 bool loadFrom(BinStore *s,Parse_AllKeyProfiles &target) ;
24 void saveTo(const Parse_AllKeyProfiles &target,const QString &baseName,bool text_format=false);
25 
26 constexpr const static uint32_t keycommands_i0_requiredCrc = 0xA918C191;
28 void saveTo(const Parse_AllCommandCategories &target,const QString &baseName,bool text_format=false);
29 
30 template<class Archive>
31 void serialize(Archive &archive, Keybind &k);
32 
33 template<class Archive>
34 void serialize(Archive &archive, Keybind_Profiles &kp);
35 
36 template<class Archive>
37 void serialize(Archive &archive, KeybindSettings &kbds, uint32_t const version);
38 
39 void saveTo(const KeybindSettings &target,const QString &baseName,bool text_format=false);
40 
41 void serializeToDb(const KeybindSettings &data, QString &tgt);
42 void serializeFromDb(KeybindSettings &data, const QString &src);
Keybind & k
Definition: keybind_serializers.cpp:199
Definition: keybind_definitions.h:448
archive(cereal::make_nvp("OriginIdx", ed.m_origin_idx))
Definition: DataStorage.h:23
void serializeToDb(const KeybindSettings &data, QString &tgt)
Definition: keybind_serializers.cpp:263
void saveTo(const Parse_AllKeyProfiles &target, const QString &baseName, bool text_format=false)
Definition: keybind_definitions.h:439
bool loadFrom(BinStore *s, Parse_AllKeyProfiles &target)
Definition: keybind_serializers.cpp:150
Definition: keybind_definitions.h:476
void serialize(Archive &archive, Keybind &k)
void serializeFromDb(KeybindSettings &data, const QString &src)
Definition: keybind_serializers.cpp:273
std::vector< CommandCategory_Entry > Parse_AllCommandCategories
Definition: keybind_definitions.h:474
EntityData uint32_t const version
Definition: entitydata_serializers.cpp:25
std::vector< struct Keybind_Profiles > Parse_AllKeyProfiles
Definition: Entity.h:35