OROCHI
 
Loading...
Searching...
No Matches
GxResText.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_CORE_NAMESPACE_BEGIN()
14
15//===========================================================================
17//===========================================================================
18class GxResText : public GxResBase
19{
20 //-----------------------------------------------------------
22 //-----------------------------------------------------------
24public:
25 // RTTI定義
27 // GxClassBaseReference継承クラス用禁止宣言
29
30
31 //-----------------------------------------------------------
33 //-----------------------------------------------------------
35
37 GxResText(void){}
38
40 //-----------------------------------------------------------
42 //-----------------------------------------------------------
44
46 GX_FORCE_INLINE b32 load(GxStream& stream, u32 /*dataSize*/) { return loadBinary(stream); }
47#if GX_DEVELOP
49 GX_FORCE_INLINE b32 save(GxStream& stream) { return saveBinary(stream, GxResText::GX_RTTI); }
50#endif // GX_DEVELOP
51
53 //-----------------------------------------------------------
55 //-----------------------------------------------------------
57
59 GX_FORCE_INLINE const GxString& getText(void){ return _text; }
60
62 //-----------------------------------------------------------
64 //-----------------------------------------------------------
66protected:
68
70};
71
72#if GX_DEVELOP
73//===========================================================================
75//===========================================================================
76class GxResTextRaw : public GxResText
77{
78 //-----------------------------------------------------------
80 //-----------------------------------------------------------
82public:
83 // RTTI定義
84 GX_RTTI_RESOURCE(GxResTextRaw, GxResText)
85 // GxClassBaseReference継承クラス用禁止宣言
87
88
89 //-----------------------------------------------------------
91 //-----------------------------------------------------------
93public:
95 GxResTextRaw(void) {}
96
98 //-----------------------------------------------------------
100 //-----------------------------------------------------------
102public:
104 virtual b32 load(GxStream& stream, u32 /*dataSize*/);
105
107 GX_FORCE_INLINE virtual b32 save(GxStream& /*stream*/) { return true; }
108
110 GX_FORCE_INLINE b32 finalize(void) { return true; }
111
113};
114
115#endif // GX_DEVELOP
116
117GX_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 GxResBase.h:23
テキストリソースクラス
Definition GxResText.h:19
GX_FORCE_INLINE const GxString & getText(void)
テキストを取得
Definition GxResText.h:59
GxString _text
テキスト
Definition GxResText.h:67
GX_FORCE_INLINE b32 load(GxStream &stream, u32)
リソース読み込み
Definition GxResText.h:46
ストリーム基礎クラス
Definition GxStream.h:20
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173