OROCHI
Loading...
Searching...
No Matches
GxResText.h
Go to the documentation of this file.
1
//===========================================================================
10
//===========================================================================
11
#pragma once
12
13
GX_CORE_NAMESPACE_BEGIN()
14
15
//===========================================================================
17
//===========================================================================
18
class
GxResText
: public
GxResBase
19
{
20
//-----------------------------------------------------------
22
//-----------------------------------------------------------
24
public
:
25
// RTTI定義
26
GX_RTTI_RESOURCE
(
GxResText
,
GxResBase
)
27
// GxClassBaseReference継承クラス用禁止宣言
28
GX_PROHIBIT_CLASS_BASE_REFERENCE
(
GxResText
)
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
//-----------------------------------------------------------
66
protected
:
67
GxString
_text
;
68
70
};
71
72
#if GX_DEVELOP
73
//===========================================================================
75
//===========================================================================
76
class
GxResTextRaw :
public
GxResText
77
{
78
//-----------------------------------------------------------
80
//-----------------------------------------------------------
82
public
:
83
// RTTI定義
84
GX_RTTI_RESOURCE
(GxResTextRaw,
GxResText
)
85
// GxClassBaseReference継承クラス用禁止宣言
86
GX_PROHIBIT_CLASS_BASE_REFERENCE
(GxResTextRaw)
87
88
89
//-----------------------------------------------------------
91
//-----------------------------------------------------------
93
public
:
95
GxResTextRaw(
void
) {}
96
98
//-----------------------------------------------------------
100
//-----------------------------------------------------------
102
public
:
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
117
GX_CORE_NAMESPACE_END()
GX_PROHIBIT_CLASS_BASE_REFERENCE
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition
GxBase.h:244
GX_RTTI_RESOURCE
#define GX_RTTI_RESOURCE(__THIS__, __BASE__)
リソースクラス型情報宣言
Definition
GxRttiResource.h:102
GxResBase
リソース基底クラス
Definition
GxResBase.h:23
GxResText
テキストリソースクラス
Definition
GxResText.h:19
GxResText::getText
GX_FORCE_INLINE const GxString & getText(void)
テキストを取得
Definition
GxResText.h:59
GxResText::_text
GxString _text
テキスト
Definition
GxResText.h:67
GxResText::load
GX_FORCE_INLINE b32 load(GxStream &stream, u32)
リソース読み込み
Definition
GxResText.h:46
GxStream
ストリーム基礎クラス
Definition
GxStream.h:20
GxString
文字列型クラス
Definition
GxString.h:18
b32
32bitブーリアン
Definition
GxDefine.h:173
middleware
GxCore
src
GxResText.h
Generated by
1.12.0