OROCHI
 
Loading...
Searching...
No Matches
GxGuiPropertyFlagArray.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17//===========================================================================
19//===========================================================================
20class GxGuiPropertyFlagArray : public GxGuiFormExpand
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 GX_RTTI_CLASS(GxGuiPropertyFlagArray, GxGuiFormExpand)
28 // ClassBaseReference継承クラス用禁止宣言
29 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiPropertyFlagArray)
30
31private:
32 class GxFlagData;
33
35 //-----------------------------------------------------------
37 //-----------------------------------------------------------
39public:
41 GxGuiPropertyFlagArray(void);
43 GxGuiPropertyFlagArray(const GxProperty& property, GxTypedObject* pOwner, const GX_FLAG* pFlag, u32 count, u32 index );
44
46 b32 initialize( void ) override;
47
49 //-----------------------------------------------------------
51 //-----------------------------------------------------------
53public:
55 void cleanup( void ) override;
57 static GxGuiBase* createGui(GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, u32 index);
58
59protected:
61 void onExpand(b32 on) override;
62
64 void createFlagGui(void);
65
67 //-----------------------------------------------------------
69 //-----------------------------------------------------------
71public:
73 void addFlagData( GX_CSTR pName, u32 value );
75 u32 getFlagValue(u32 index);
77 GX_FORCE_INLINE GxProperty* getPropertyFlagOwner(void){ return &_property; }
79 constexpr GxTypedObject* getFlagOwner(void) const { return _pFlagOwner; }
81 constexpr u32 getIndexFlagOwner(void) const { return _index; }
82
83protected:
85 void getFlag( const void* const, u32 );
86
88 void setFlag( void* const, u32 );
89
90 // 配列数取得
91 constexpr u32 getCount( void ) const { return _listFlagData.getCount(); }
92
93 // 配列数セット
94 constexpr void setCount( u32 /*count*/ ){}
95
97 //-----------------------------------------------------------
99 //-----------------------------------------------------------
101protected:
102 GxProperty _property;
103 GxTypedObject* _pFlagOwner;
104 u32 _index;
105
106 GxArrayClassBase _listFlagData;
107
109};
110
111//===========================================================================
113//===========================================================================
114class GxGuiPropertyFlagArray::GxFlagData : public GxClassBase
115{
116 //-----------------------------------------------------------
118 //-----------------------------------------------------------
120public:
121 GX_RTTI_CLASS(GxFlagData, GxClassBase)
122 // GxClassBase継承の禁止宣言
123 GX_PROHIBIT_CLASS_BASE(GxFlagData)
124 // new, delete定義
125 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
126
127
128 //-----------------------------------------------------------
130 //-----------------------------------------------------------
132public:
134 GxFlagData(void) : _value(0){};
136 GxFlagData( GX_CSTR name, s32 value ) : _name(name), _value(value){};
137
139 //-----------------------------------------------------------
141 //-----------------------------------------------------------
143public:
145 constexpr GX_CSTR getName( void ) const { return _name.getString(); }
146
148 constexpr u32 getValue( void ) const { return _value; }
149
151 //-----------------------------------------------------------
153 //-----------------------------------------------------------
155protected:
156 GxString _name;
157 u32 _value;
158
160};
161
162GX_CORE_NAMESPACE_END()
163
164#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
void GxTypedObject
その他
Definition GxDefine.h:213
配列クラス
Definition GxArrayClassBase.h:18
オブジェクト基底クラス
Definition GxBase.h:88
プロパティクラス
Definition GxProperty.h:48
実行時型情報クラス
Definition GxRtti.h:154
GUI用フラグ型
Definition GxDefine.h:203
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173