1 /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 * -------------------------------------- 3 * 4 * This file is part of liblcf. Copyright (c) 2021 liblcf authors. 5 * https://github.com/EasyRPG/liblcf - https://easyrpg.org 6 * 7 * liblcf is Free/Libre Open Source Software, released under the MIT License. 8 * For the full copyright and license information, please view the COPYING 9 * file that was distributed with this source code. 10 */ 11 12 #ifndef LCF_RPG_BATTLERANIMATIONPOSE_H 13 #define LCF_RPG_BATTLERANIMATIONPOSE_H 14 15 // Headers 16 #include <stdint.h> 17 #include "lcf/dbstring.h" 18 #include "lcf/enum_tags.h" 19 #include "lcf/context.h" 20 #include <ostream> 21 #include <type_traits> 22 23 /** 24 * rpg::BattlerAnimationPose class. 25 */ 26 namespace lcf { 27 namespace rpg { 28 class BattlerAnimationPose { 29 public: 30 enum AnimType { 31 AnimType_character = 0, 32 AnimType_battle = 1 33 }; 34 static constexpr auto kAnimTypeTags = lcf::makeEnumTags<AnimType>( 35 "character", 36 "battle" 37 ); 38 39 int ID = 0; 40 DBString name; 41 DBString battler_name; 42 int32_t battler_index = 0; 43 int32_t animation_type = 0; 44 int32_t battle_animation_id = 1; 45 }; 46 inline std::ostream& operator<<(std::ostream& os, BattlerAnimationPose::AnimType code) { 47 os << static_cast<std::underlying_type_t<decltype(code)>>(code); 48 return os; 49 } 50 51 inline bool operator==(const BattlerAnimationPose& l, const BattlerAnimationPose& r) { 52 return l.name == r.name 53 && l.battler_name == r.battler_name 54 && l.battler_index == r.battler_index 55 && l.animation_type == r.animation_type 56 && l.battle_animation_id == r.battle_animation_id; 57 } 58 59 inline bool operator!=(const BattlerAnimationPose& l, const BattlerAnimationPose& r) { 60 return !(l == r); 61 } 62 63 std::ostream& operator<<(std::ostream& os, const BattlerAnimationPose& obj); 64 65 template <typename F, typename ParentCtx = Context<void,void>> 66 void ForEachString(BattlerAnimationPose& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 67 const auto ctx1 = Context<BattlerAnimationPose, ParentCtx>{ "name", -1, &obj, parent_ctx }; 68 f(obj.name, ctx1); 69 const auto ctx2 = Context<BattlerAnimationPose, ParentCtx>{ "battler_name", -1, &obj, parent_ctx }; 70 f(obj.battler_name, ctx2); 71 (void)obj; 72 (void)f; 73 (void)parent_ctx; 74 } 75 76 } // namespace rpg 77 } // namespace lcf 78 79 #endif 80