Lines Matching refs:name

27 #define NW_RES_FIELD_PRIMITIVE_DECL( type, name )                                   \  argument
28 type Get##name() const { return static_cast<type>(ref().m_##name); } \
29 void Set##name(type value) { ref().m_##name = value; } \
31 #define NW_RES_FIELD_FLAGS_DECL( type, name ) \ argument
32 type Get##name() const { return static_cast<type>(ref().m_##name); } \
33 void Set##name(type value) { ref().m_##name = value; } \
34 …void Enable##name(type value) { ref().m_##name = ut::EnableFlag(ref().m_##name, value); } …
35 …void Disable##name(type value) { ref().m_##name = ut::DisableFlag(ref().m_##name, value); }…
37 #define NW_RES_FIELD_BOOL_PRIMITIVE_DECL( name ) \ argument
38 bool Is##name() const { return static_cast<bool>(ref().m_Is##name); } \
39 void Set##name(bool value) { ref().m_Is##name = value; } \
42 #define NW_RES_FIELD_STRING_DECL( name ) \ argument
43 const char* Get##name() const { return ref().to##name.to_ptr(); } \
46 #define NW_RES_FIELD_CLASS_DECL( type, name ) \ argument
47 type Get##name() { return type( ref().to##name.to_ptr() ); } \
48 const type Get##name() const { return type( ref().to##name.to_ptr() ); } \
50 #define NW_RES_FIELD_STRUCT_DECL( type, name ) \ argument
51 type& Get##name() { return ref().m_##name; } \
52 const type& Get##name() const { return ref().m_##name; } \
53 void Set##name(const type& value) { ref().m_##name = value; } \
55 #define NW_RES_FIELD_VECTOR2_DECL( type, name ) \ argument
56 void Set##name( f32 x, f32 y ) { ref().m_##name.Set(x, y); } \
57 const type& Get##name() const { return ref().m_##name; } \
58 void Set##name(const type& value) { ref().m_##name = value; } \
60 #define NW_RES_FIELD_VECTOR3_DECL( type, name ) \ argument
61 void Set##name( f32 x, f32 y, f32 z ) { ref().m_##name.Set(x, y, z); } \
62 const type& Get##name() const { return ref().m_##name; } \
63 void Set##name(const type& value) { ref().m_##name = value; } \
65 #define NW_RES_FIELD_RECT_DECL( type, name ) \ argument
66 …void NW_DEPRECATED_FUNCTION(Set##name( f32 l, f32 r, f32 b, f32 t )) { ref().m_##name.SetWi…
67 …void Set##name##WithoutFlip( f32 l, f32 r, f32 b, f32 t ) { ref().m_##name.SetWithoutFlip(l…
68 …void Set##name##WithYFlip( f32 l, f32 r, f32 b, f32 t ) { ref().m_##name.SetWithYFlip(l, r,…
69 const type& Get##name() const { return ref().m_##name; } \
70 void Set##name(const type& value) { ref().m_##name = value; } \
72 #define NW_RES_FIELD_FLOAT_COLOR_DECL( type, name ) \ argument
73 void Set##name( f32 r, f32 g, f32 b ) { ref().m_##name.Set(r, g, b); } \
74 void Set##name( f32 r, f32 g, f32 b, f32 a ) { ref().m_##name.Set(r, g, b, a); } \
75 const type& Get##name() const { return ref().m_##name; } \
76 void Set##name(const type& value) { ref().m_##name = value; } \
78 #define NW_RES_FIELD_FLOAT_U32_COLOR_DECL( type, name ) \ argument
79 u32 Get##name##U32() const { return ref().m_##name##U32; } \
80 …void Set##name( f32 r, f32 g, f32 b ) { ref().m_##name.Set(r, g, b); ref().m_##name##U32 = …
81 …void Set##name( f32 r, f32 g, f32 b, f32 a ) { ref().m_##name.Set(r, g, b, a); ref().m_##na…
82 const type& Get##name() const { return ref().m_##name; } \
83 …void Set##name(const type& value) { ref().m_##name = value; ref().m_##name##U32 = ref().m_#…
85 #define NW_RES_FIELD_RESSTRUCT_DECL( type, name ) \ argument
86 type Get##name() { return type( &(ref().m_##name) ); } \
87 const type Get##name() const { return type( &(ref().m_##name) ); } \
88 type##Data& Get##name##Data() { return ref().m_##name; } \
89 const type##Data& Get##name##Data() const { return ref().m_##name; } \
91 #define NW_RES_FIELD_CONST_RESSTRUCT_DECL( type, name ) \ argument
92 const type Get##name() const { return type( &(ref().m_##name) ); } \
93 const type##Data& Get##name##Data() const { return ref().m_##name; } \
95 #define NW_RES_FIELD_PRIMITIVE_FIXED_LIST_DECL( type, name ) \ argument
96 s32 Get##name##Count() const \
97 { return sizeof(ref().m_##name) / sizeof(type); } \
98 type Get##name(int idx) const \
99 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
100 void Set##name(int idx, type value ) \
101 { NW_INDEX_ASSERT( name, idx ); ref().m_##name[ idx ] = value; } \
102 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() \
103 …ray<type, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().m_##name[ 0 ]), Get##name##Count() )…
104 …:ut::internal::ResArray<const type, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() const \
105 …nst type, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().m_##name[ 0 ]), Get##name##Count() )…
108 #define NW_RES_FIELD_STRING_FIXED_LIST_DECL( name ) \ argument
109 s32 Get##name##Count() const \
110 { return sizeof(ref().to##name) / sizeof(nw::ut::BinString); } \
111 const char* Get##name(int idx) const \
112 { NW_INDEX_ASSERT( name, idx ); return ref().to##name[ idx ].to_ptr(); } \
113 …::ResArray<const nw::ut::BinString, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() const \
114 …BinString, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().to##name[0]), Get##name##Count() );…
117 #define NW_RES_FIELD_CLASS_FIXED_LIST_DECL( type, name ) \ argument
118 s32 Get##name##Count() const \
119 { return sizeof(ref().to##name) / sizeof(nw::ut::Offset); } \
120 type Get##name(int idx) \
121 { NW_INDEX_ASSERT( name, idx ); return type( ref().to##name[ idx ].to_ptr() ); } \
122 const type Get##name(int idx) const \
123 { return type( ref().to##name[ idx ].to_ptr() ); } \
124 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
125 …esArray<type, nw::ut::internal::ResArrayClassTraits>( &(ref().to##name[ 0 ]), Get##name##Count() )…
126 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
127 …y<const type, nw::ut::internal::ResArrayClassTraits>( &(ref().to##name[ 0 ]), Get##name##Count() )…
130 #define NW_RES_FIELD_STRUCT_FIXED_LIST_DECL( type, name ) \ argument
131 s32 Get##name##Count() const \
132 { return sizeof(ref().m_##name) / sizeof(type##Data); } \
133 type Get##name(int idx) \
134 { NW_INDEX_ASSERT( name, idx ); return type( &(ref().m_##name[ idx ]) ); } \
135 const type Get##name(int idx) const \
136 { NW_INDEX_ASSERT( name, idx ); return type( &(ref().m_##name[ idx ]) ); } \
137 type##Data& Get##name##Data(int idx) \
138 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
139 const type##Data& Get##name##Data(int idx) const \
140 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
141 type##Data* Get##name##Data() { return ref().m_##name; } \
142 const type##Data* Get##name##Data() const { return ref().m_##name; } \
145 #define NW_RES_FIELD_PRIMITIVE_LIST_DECL( type, name ) \ argument
146 s32 Get##name##Count() const \
147 { return ref().m_##name##TableCount; } \
148 type Get##name(int idx) const \
150 NW_INDEX_ASSERT( name, idx ); \
151 … const type* tbl_ptr = static_cast<const type*>( ref().to##name##Table.to_table_ptr() ); \
154 void Set##name(int idx, type value) \
156 NW_INDEX_ASSERT( name, idx ); \
157 type* tbl_ptr = Get##name(); \
160 type* Get##name() \
161 { return static_cast<type*>(ref().to##name##Table.to_table_ptr()); } \
162 const type* Get##name() const \
163 { return static_cast<const type*>(ref().to##name##Table.to_table_ptr()); } \
167 #define NW_RES_FIELD_STRING_LIST_DECL( name ) \ argument
168 s32 Get##name##Count() const \
169 { return ref().m_##name##TableCount; } \
170 const char* Get##name(int idx) const \
172 NW_INDEX_ASSERT( name, idx ); \
173 …const BinString* tbl_ptr = static_cast<const BinString*>( ref().to##name##Table.to_table_ptr() ); \
178 #define NW_RES_FIELD_CLASS_LIST_DECL( type, name ) \ argument
179 s32 Get##name##Count() const \
180 { return ref().m_##name##TableCount; } \
181 type Get##name(int idx) \
183 NW_INDEX_ASSERT( name, idx ); \
184 … nw::ut::Offset* tbl_ptr = static_cast<nw::ut::Offset*>( ref().to##name##Table.to_table_ptr() ); \
187 const type Get##name(int idx) const \
189 NW_INDEX_ASSERT( name, idx ); \
190 …const nw::ut::Offset* tbl_ptr = static_cast<const nw::ut::Offset*>( ref().to##name##Table.to_table…
193 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
195 …y<type, nw::ut::internal::ResArrayClassTraits>( ref().to##name##Table.to_table_ptr(), Get##name##C…
197 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
199 …t type, nw::ut::internal::ResArrayClassTraits>( ref().to##name##Table.to_table_ptr(), Get##name##C…
203 #define NW_RES_FIELD_STRUCT_LIST_DECL( type, name ) \ argument
204 s32 Get##name##Count() const \
205 { return ref().m_##name##TableCount; } \
206 type##Data* Get##name##Data() \
208 return static_cast<type##Data*>( ref().to##name##Table.to_table_ptr() ); \
210 const type##Data* Get##name##Data() const \
212 return static_cast<const type##Data*>( ref().to##name##Table.to_table_ptr() ); \
214 type##Data& Get##name##Data(int idx) \
216 NW_INDEX_ASSERT( name, idx ); \
217 type##Data* tbl_ptr = this->Get##name##Data(); \
220 const type##Data& Get##name##Data(int idx) const \
222 NW_INDEX_ASSERT( name, idx ); \
223 const type##Data* tbl_ptr = this->Get##name##Data(); \
226 type Get##name(int idx) \
228 return type( &(this->Get##name##Data(idx)) ); \
230 const type Get##name(int idx) const \
232 return type( &(this->Get##name##Data(idx)) ); \
236 #define NW_RES_FIELD_CLASS_DIC_DECL( type, name, ResDicType ) \ argument
237 s32 Get##name##Count() const \
239 return ref().m_##name##DicCount; \
241 type Get##name(int idx) \
243 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
244 NW_INDEX_ASSERT( name, idx ); \
247 type Get##name(const char* key) \
249 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
252 const type Get##name(int idx) const \
254 NW_INDEX_ASSERT( name, idx ); \
255 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
258 const type Get##name(const char* key) const \
260 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
263 s32 Get##name##Index(const char* key) const \
265 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
268 …rnal::ResArray< type, nw::ut::internal::ResArrayDicTraits<ResDicType##Data>::Traits > Get##name() \
270 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
274 >( (dic.IsValid()) ? dic.ref().GetBeginNode() : NULL, Get##name##Count() ); \
276 …ay< const type, nw::ut::internal::ResArrayDicTraits<ResDicType##Data>::Traits > Get##name() const \
278 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
282 >( (dic.IsValid()) ? dic.ref().GetBeginNode() : NULL, Get##name##Count() ); \
286 #define NW_RES_FIELD_PRIMITIVE_LIST_INLINE_DECL( type, name ) \ argument
287 s32 Get##name##Count() const \
288 { return ref().m_##name##Count; } \
289 type Get##name(int idx) const \
291 NW_INDEX_ASSERT( name, idx ); \
292 return ref().m_##name##Table[ idx ]; \
294 void Set##name(int idx, type value) \
296 NW_INDEX_ASSERT( name, idx ); \
297 ref().m_##name##Table[ idx ] = value; \
299 type* Get##name() \
300 { return static_cast<type*>(ref().m_##name##Table); } \
301 const type* Get##name() const \
302 { return static_cast<const type*>(ref().m_##name##Table); } \
305 #define NW_RES_FIELD_STRING_LIST_INLINE_DECL( name ) \ argument
306 s32 Get##name##Count() const \
307 { return ref().m_##name##Count; } \
308 const char* Get##name(int idx) const \
310 NW_INDEX_ASSERT( name, idx ); \
311 return ref().m_##name##Table[ idx ].to_ptr(); \
315 #define NW_RES_FIELD_CLASS_LIST_INLINE_DECL( type, name ) \ argument
316 s32 Get##name##Count() const \
317 { return ref().m_##name##Count; } \
318 type Get##name(int idx) \
320 NW_INDEX_ASSERT( name, idx ); \
321 return type( ref().m_##name##Table[ idx ].to_ptr() ); \
323 const type Get##name(int idx) const \
325 NW_INDEX_ASSERT( name, idx ); \
326 return type( ref().m_##name##Table[ idx ].to_ptr() ); \
328 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
333 >( &(ref().m_##name##Table[0]), Get##name##Count() ); \
335 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
340 >( &(ref().m_##name##Table[0]), Get##name##Count() ); \