OROCHI
 
Loading...
Searching...
No Matches
GxResPlayLog.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12GX_UTILITY_NAMESPACE_BEGIN()
13//===========================================================================
15//===========================================================================
16class GxResPlayLog : public GxResBase
17{
18 //-----------------------------------------------------------
20 //-----------------------------------------------------------
22public:
23 // RTTI 宣言
25 // GxClassBaseReference 継承クラス用禁止宣言
27
29 class GxStage : public GxClassBase
30 {
31 //-----------------------------------------------------------
33 //-----------------------------------------------------------
35 public:
36 friend class GxResPlayLog;
37
38 // RTTI定義
40
41
42 //-----------------------------------------------------------
44 //-----------------------------------------------------------
46
48 GxStage(void)
49 {
51 }
53 ~GxStage(void) override {}
54
56 //-----------------------------------------------------------
58 //-----------------------------------------------------------
60
61 s64 _time;
63 private:
64 static GxRtti* _pRtti;
65
67 };
68
70 class GxPlay : public GxClassBase
71 {
72 //-----------------------------------------------------------
74 //-----------------------------------------------------------
76 public:
77 friend class GxResPlayLog;
78
79 // RTTI定義
80 GX_RTTI_CLASS(GxResPlayLog::GxPlay, GxClassBase)
81
82
83 //-----------------------------------------------------------
85 //-----------------------------------------------------------
87
89 GxPlay(void);
91 ~GxPlay(void) override;
92
94 //-----------------------------------------------------------
96 //-----------------------------------------------------------
98
100 GxStage* addStageData(void);
101
103 //-----------------------------------------------------------
105 //-----------------------------------------------------------
107
109 s64 _time;
113 private:
114 static GxRtti* _pRtti;
115
117 };
118
120 //-----------------------------------------------------------
122 //-----------------------------------------------------------
124
126 GxResPlayLog(void);
127
129 //-----------------------------------------------------------
131 //-----------------------------------------------------------
133
135 void cleanup(void) override;
136protected:
138 b32 load(GxStream& in, u32 dataSize);
139#if GX_DEVELOP
141 b32 save(GxStream& out);
142#endif // GX_DEVELOP
143
145 //-----------------------------------------------------------
147 //-----------------------------------------------------------
149public:
151 GX_FORCE_INLINE static void setPlayRtti(const GxRtti& rtti) { GxPlay::_pRtti = const_cast<GxRtti*>(&rtti); }
153 GX_FORCE_INLINE static void setStageRtti(const GxRtti& rtti) { GxStage::_pRtti = const_cast<GxRtti*>(&rtti); }
155 constexpr GxPlay* getPlayData(void) const { return _pData; }
157 GxStage* addStageLog(void);
158
160 //-----------------------------------------------------------
162 //-----------------------------------------------------------
164protected:
166
168};
169
170#if GX_DEVELOP
171//===========================================================================
173//===========================================================================
174class GxResPlayLogJson : public GxResPlayLog
175{
176 //-----------------------------------------------------------
178 //-----------------------------------------------------------
180public:
181 // RTTI宣言
182 GX_RTTI_RESOURCE(GxResPlayLogJson, GxResPlayLog);
183 // GxClassBaseReference 継承クラス用禁止宣言
184 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResPlayLogJson);
185
187 //-----------------------------------------------------------
189 //-----------------------------------------------------------
191
193 GxResPlayLogJson(void);
194
196 //-----------------------------------------------------------
198 //-----------------------------------------------------------
200
202 b32 finalized(void);
203
204protected:
206 b32 load(GxStream& in, u32 dataSize);
208 b32 save(GxStream& out);
209
211};
212#endif // GX_DEVELOP
213
214GX_UTILITY_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
#define GX_RTTI_RESOURCE(__THIS__, __BASE__)
リソースクラス型情報宣言
Definition GxRttiResource.h:102
配列クラス
Definition GxArray.h:18
オブジェクト基底クラス
Definition GxBase.h:88
リソース基底クラス
Definition GxResBase.h:23
プレイ情報
Definition GxResPlayLog.h:71
~GxPlay(void) override
デストラクタ
Definition GxResPlayLog.cpp:99
GxArray _stages
ステージリスト
Definition GxResPlayLog.h:110
s64 _time
時刻
Definition GxResPlayLog.h:109
u32 _targetFPS
目標FPS
Definition GxResPlayLog.h:112
GxString _deviceName
デバイス名
Definition GxResPlayLog.h:111
GxPlay(void)
デフォルトコンストラクタ
Definition GxResPlayLog.cpp:90
GxStage * addStageData(void)
ステージデータを追加
Definition GxResPlayLog.cpp:111
u32 _version
バージョン
Definition GxResPlayLog.h:108
ステージ情報
Definition GxResPlayLog.h:30
~GxStage(void) override
デストラクタ
Definition GxResPlayLog.h:53
s64 _time
時刻
Definition GxResPlayLog.h:61
GxString _stageName
ステージ名
Definition GxResPlayLog.h:62
プレイログリソースクラス
Definition GxResPlayLog.h:17
static GX_FORCE_INLINE void setStageRtti(const GxRtti &rtti)
ステージ情報のRTTIを設定
Definition GxResPlayLog.h:153
GxStage * addStageLog(void)
ステージログを追加
Definition GxResPlayLog.cpp:69
void cleanup(void) override
保持しているデータを解放
Definition GxResPlayLog.cpp:36
static GX_FORCE_INLINE void setPlayRtti(const GxRtti &rtti)
プレイ情報のRTTIを設定
Definition GxResPlayLog.h:151
GxResPlayLog(void)
デフォルトコンストラクタ
Definition GxResPlayLog.cpp:28
GxPlay * _pData
プレイ情報リスト
Definition GxResPlayLog.h:165
constexpr GxPlay * getPlayData(void) const
プレイ情報を取得
Definition GxResPlayLog.h:155
b32 load(GxStream &in, u32 dataSize)
リソースロード
Definition GxResPlayLog.cpp:48
実行時型情報クラス
Definition GxRtti.h:154
ストリーム基礎クラス
Definition GxStream.h:20
static const s64 getUnixTime(void)
UNIX時刻を取得
Definition GxTimer.cpp:87
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173