OROCHI
 
Loading...
Searching...
No Matches
GxResSystemConfig.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_CORE_NAMESPACE_BEGIN()
14
15#if GX_DEVELOP
16//===========================================================================
18//===========================================================================
19class GxResSystemConfig : public GxResBase
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
26 GX_RTTI_RESOURCE( GxResSystemConfig, GxResBase );
27 // GxClassBaseReference継承クラス用禁止宣言
28 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResSystemConfig)
29
30
31 static constexpr u32 DATA_MAX = 10;
32
34 class GxToolPositionData : public GxClassBase
35 {
36 //-----------------------------------------------------------
38 //-----------------------------------------------------------
40
41 // RTTI宣言
42 GX_RTTI_CLASS(GxToolPositionData, GxClassBase)
43
44
45 //-----------------------------------------------------------
47 //-----------------------------------------------------------
49
51 GxToolPositionData(void){}
52 public:
54 GxToolPositionData(GxRtti* pRtti, const GxRect& rectDefault) :_pRtti(pRtti), _rectDefault(rectDefault){}
55
57 //-----------------------------------------------------------
59 //-----------------------------------------------------------
61
62 GxRtti* _pRtti;
63 GxRect _rectDefault;
64 GxRect _rectBefore;
65
67 };
68
70 //-----------------------------------------------------------
72 //-----------------------------------------------------------
74
76 GxResSystemConfig( void );
78 void cleanup(void) override;
79
81 //-----------------------------------------------------------
83 //-----------------------------------------------------------
85
87 GxClassBase* loadElement( const GxRtti& rtti );
88
90 void saveElement( GxClassBase* pData );
91
93 b32 detachElement( const GxRtti& rtti );
94
96 void loadToolPosition(const GxRtti& rtti, GxRect* pRectDefault, GxRect* pRectBefore);
98 void saveToolPosition(const GxRtti& rtti, const GxRect& rect);
100 void saveToolDefaultPosition(void);
101
102protected:
104 GX_FORCE_INLINE b32 load(GxStream& stream, u32 size) { GX_UNUSED(size); return loadXml(stream); }
106 GX_FORCE_INLINE b32 save(GxStream& stream) { return saveXml( stream, GX_RTTI); }
107
109 //-----------------------------------------------------------
111 //-----------------------------------------------------------
113private:
114 GxListClassBase* _pListElement;
115 GxArray _listToolPosition;
116
118};
119
120//===========================================================================
122//===========================================================================
123class GxResSystemConfigXml : public GxResSystemConfig
124{
125 //-----------------------------------------------------------
127 //-----------------------------------------------------------
129public:
130 // RTTI定義
131 GX_RTTI_RESOURCE( GxResSystemConfigXml, GxResSystemConfig );
132 // GxClassBaseReference継承クラス用禁止宣言
133 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxResSystemConfigXml)
134
135
136 //-----------------------------------------------------------
138 //-----------------------------------------------------------
140
142 GxResSystemConfigXml( void ) {}
143
145 //-----------------------------------------------------------
147 //-----------------------------------------------------------
149protected:
154 GX_FORCE_INLINE b32 load(GxStream& stream, u32 /*dataSize*/) { return loadXml(stream); }
155
159 GX_FORCE_INLINE b32 save(GxStream& stream) { return saveXml(stream, GX_RTTI); }
160
162 GX_FORCE_INLINE b32 finalize(void) { return true; }
163
165};
166#endif // GX_DEVELOP
167
168GX_CORE_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
GxClassBase用連結リストクラス
Definition GxListClassBase.h:18
リソース基底クラス
Definition GxResBase.h:23
void cleanup(void) override
解放
Definition GxResBase.cpp:74
b32 load(GxStream &stream, u32 size)
ロード
Definition GxResBase.h:394
実行時型情報クラス
Definition GxRtti.h:154
ストリーム基礎クラス
Definition GxStream.h:20
矩形
Definition GxStruct.h:951
32bitブーリアン
Definition GxDefine.h:173