Lines Matching refs:name

29 #define NW_RES_FIELD_PRIMITIVE_DECL( type, name )                                   \  argument
30 type Get##name() const { return static_cast<type>(ref().m_##name); } \
31 void Set##name(type value) { ref().m_##name = value; } \
33 #define NW_RES_FIELD_FLAGS_DECL( type, name ) \ argument
34 type Get##name() const { return static_cast<type>(ref().m_##name); } \
35 void Set##name(type value) { ref().m_##name = value; } \
36 …void Enable##name(type value) { ref().m_##name = ut::EnableFlag(ref().m_##name, value); } …
37 …void Disable##name(type value) { ref().m_##name = ut::DisableFlag(ref().m_##name, value); }…
39 #define NW_RES_FIELD_BOOL_PRIMITIVE_DECL( name ) \ argument
40 bool Is##name() const { return static_cast<bool>(ref().m_Is##name); } \
41 void Set##name(bool value) { ref().m_Is##name = value; } \
44 #define NW_RES_FIELD_STRING_DECL( name ) \ argument
45 const char* Get##name() const { return ref().to##name.to_ptr(); } \
48 #define NW_RES_FIELD_CLASS_DECL( type, name ) \ argument
49 type Get##name() { return type( ref().to##name.to_ptr() ); } \
50 const type Get##name() const { return type( ref().to##name.to_ptr() ); } \
52 #define NW_RES_FIELD_STRUCT_DECL( type, name ) \ argument
53 type& Get##name() { return ref().m_##name; } \
54 const type& Get##name() const { return ref().m_##name; } \
55 void Set##name(const type& value) { ref().m_##name = value; } \
57 #define NW_RES_FIELD_VECTOR2_DECL( type, name ) \ argument
58 void Set##name( f32 x, f32 y ) { ref().m_##name.Set(x, y); } \
59 const type& Get##name() const { return ref().m_##name; } \
60 void Set##name(const type& value) { ref().m_##name = value; } \
62 #define NW_RES_FIELD_VECTOR3_DECL( type, name ) \ argument
63 void Set##name( f32 x, f32 y, f32 z ) { ref().m_##name.Set(x, y, z); } \
64 const type& Get##name() const { return ref().m_##name; } \
65 void Set##name(const type& value) { ref().m_##name = value; } \
67 #define NW_RES_FIELD_RECT_DECL( type, name ) \ argument
68 …void NW_DEPRECATED_FUNCTION(Set##name( f32 l, f32 r, f32 b, f32 t )) { ref().m_##name.SetWi…
69 …void Set##name##WithoutFlip( f32 l, f32 r, f32 b, f32 t ) { ref().m_##name.SetWithoutFlip(l…
70 …void Set##name##WithYFlip( f32 l, f32 r, f32 b, f32 t ) { ref().m_##name.SetWithYFlip(l, r,…
71 const type& Get##name() const { return ref().m_##name; } \
72 void Set##name(const type& value) { ref().m_##name = value; } \
74 #define NW_RES_FIELD_FLOAT_COLOR_DECL( type, name ) \ argument
75 void Set##name( f32 r, f32 g, f32 b ) { ref().m_##name.Set(r, g, b); } \
76 void Set##name( f32 r, f32 g, f32 b, f32 a ) { ref().m_##name.Set(r, g, b, a); } \
77 const type& Get##name() const { return ref().m_##name; } \
78 void Set##name(const type& value) { ref().m_##name = value; } \
80 #define NW_RES_FIELD_FLOAT_U32_COLOR_DECL( type, name ) \ argument
81 u32 Get##name##U32() const { return ref().m_##name##U32; } \
82 …void Set##name( f32 r, f32 g, f32 b ) { ref().m_##name.Set(r, g, b); ref().m_##name##U32 = …
83 …void Set##name( f32 r, f32 g, f32 b, f32 a ) { ref().m_##name.Set(r, g, b, a); ref().m_##na…
84 const type& Get##name() const { return ref().m_##name; } \
85 …void Set##name(const type& value) { ref().m_##name = value; ref().m_##name##U32 = ref().m_#…
87 #define NW_RES_FIELD_RESSTRUCT_DECL( type, name ) \ argument
88 type Get##name() { return type( &(ref().m_##name) ); } \
89 const type Get##name() const { return type( &(ref().m_##name) ); } \
90 type##Data& Get##name##Data() { return ref().m_##name; } \
91 const type##Data& Get##name##Data() const { return ref().m_##name; } \
93 #define NW_RES_FIELD_CONST_RESSTRUCT_DECL( type, name ) \ argument
94 const type Get##name() const { return type( &(ref().m_##name) ); } \
95 const type##Data& Get##name##Data() const { return ref().m_##name; } \
97 #define NW_RES_FIELD_PRIMITIVE_FIXED_LIST_DECL( type, name ) \ argument
98 s32 Get##name##Count() const \
99 { return sizeof(ref().m_##name) / sizeof(type); } \
100 type Get##name(int idx) const \
101 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
102 void Set##name(int idx, type value ) \
103 { NW_INDEX_ASSERT( name, idx ); ref().m_##name[ idx ] = value; } \
104 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() \
105 …ray<type, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().m_##name[ 0 ]), Get##name##Count() )…
106 …:ut::internal::ResArray<const type, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() const \
107 …nst type, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().m_##name[ 0 ]), Get##name##Count() )…
110 #define NW_RES_FIELD_STRING_FIXED_LIST_DECL( name ) \ argument
111 s32 Get##name##Count() const \
112 { return sizeof(ref().to##name) / sizeof(nw::ut::BinString); } \
113 const char* Get##name(int idx) const \
114 { NW_INDEX_ASSERT( name, idx ); return ref().to##name[ idx ].to_ptr(); } \
115 …::ResArray<const nw::ut::BinString, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() const \
116 …BinString, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().to##name[0]), Get##name##Count() );…
119 #define NW_RES_FIELD_CLASS_FIXED_LIST_DECL( type, name ) \ argument
120 s32 Get##name##Count() const \
121 { return sizeof(ref().to##name) / sizeof(nw::ut::Offset); } \
122 type Get##name(int idx) \
123 { NW_INDEX_ASSERT( name, idx ); return type( ref().to##name[ idx ].to_ptr() ); } \
124 const type Get##name(int idx) const \
125 { return type( ref().to##name[ idx ].to_ptr() ); } \
126 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
127 …esArray<type, nw::ut::internal::ResArrayClassTraits>( &(ref().to##name[ 0 ]), Get##name##Count() )…
128 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
129 …y<const type, nw::ut::internal::ResArrayClassTraits>( &(ref().to##name[ 0 ]), Get##name##Count() )…
132 #define NW_RES_FIELD_STRUCT_FIXED_LIST_DECL( type, name ) \ argument
133 s32 Get##name##Count() const \
134 { return sizeof(ref().m_##name) / sizeof(type##Data); } \
135 type Get##name(int idx) \
136 { NW_INDEX_ASSERT( name, idx ); return type( &(ref().m_##name[ idx ]) ); } \
137 const type Get##name(int idx) const \
138 { NW_INDEX_ASSERT( name, idx ); return type( &(ref().m_##name[ idx ]) ); } \
139 type##Data& Get##name##Data(int idx) \
140 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
141 const type##Data& Get##name##Data(int idx) const \
142 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
143 type##Data* Get##name##Data() { return ref().m_##name; } \
144 const type##Data* Get##name##Data() const { return ref().m_##name; } \
147 #define NW_RES_FIELD_PRIMITIVE_LIST_DECL( type, name ) \ argument
148 s32 Get##name##Count() const \
149 { return ref().m_##name##TableCount; } \
150 type Get##name(int idx) const \
152 NW_INDEX_ASSERT( name, idx ); \
153 … const type* tbl_ptr = static_cast<const type*>( ref().to##name##Table.to_table_ptr() ); \
156 void Set##name(int idx, type value) \
158 NW_INDEX_ASSERT( name, idx ); \
159 type* tbl_ptr = Get##name(); \
162 type* Get##name() \
163 { return static_cast<type*>(ref().to##name##Table.to_table_ptr()); } \
164 const type* Get##name() const \
165 { return static_cast<const type*>(ref().to##name##Table.to_table_ptr()); } \
169 #define NW_RES_FIELD_STRING_LIST_DECL( name ) \ argument
170 s32 Get##name##Count() const \
171 { return ref().m_##name##TableCount; } \
172 const char* Get##name(int idx) const \
174 NW_INDEX_ASSERT( name, idx ); \
175 …const BinString* tbl_ptr = static_cast<const BinString*>( ref().to##name##Table.to_table_ptr() ); \
180 #define NW_RES_FIELD_CLASS_LIST_DECL( type, name ) \ argument
181 s32 Get##name##Count() const \
182 { return ref().m_##name##TableCount; } \
183 type Get##name(int idx) \
185 NW_INDEX_ASSERT( name, idx ); \
186 … nw::ut::Offset* tbl_ptr = static_cast<nw::ut::Offset*>( ref().to##name##Table.to_table_ptr() ); \
189 const type Get##name(int idx) const \
191 NW_INDEX_ASSERT( name, idx ); \
192 …const nw::ut::Offset* tbl_ptr = static_cast<const nw::ut::Offset*>( ref().to##name##Table.to_table…
195 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
197 …y<type, nw::ut::internal::ResArrayClassTraits>( ref().to##name##Table.to_table_ptr(), Get##name##C…
199 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
201 …t type, nw::ut::internal::ResArrayClassTraits>( ref().to##name##Table.to_table_ptr(), Get##name##C…
205 #define NW_RES_FIELD_STRUCT_LIST_DECL( type, name ) \ argument
206 s32 Get##name##Count() const \
207 { return ref().m_##name##TableCount; } \
208 type##Data* Get##name##Data() \
210 return static_cast<type##Data*>( ref().to##name##Table.to_table_ptr() ); \
212 const type##Data* Get##name##Data() const \
214 return static_cast<const type##Data*>( ref().to##name##Table.to_table_ptr() ); \
216 type##Data& Get##name##Data(int idx) \
218 NW_INDEX_ASSERT( name, idx ); \
219 type##Data* tbl_ptr = this->Get##name##Data(); \
222 const type##Data& Get##name##Data(int idx) const \
224 NW_INDEX_ASSERT( name, idx ); \
225 const type##Data* tbl_ptr = this->Get##name##Data(); \
228 type Get##name(int idx) \
230 return type( &(this->Get##name##Data(idx)) ); \
232 const type Get##name(int idx) const \
234 return type( &(this->Get##name##Data(idx)) ); \
238 #define NW_RES_FIELD_CLASS_DIC_DECL( type, name, ResDicType ) \ argument
239 s32 Get##name##Count() const \
241 return ref().m_##name##DicCount; \
243 type Get##name(int idx) \
245 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
246 NW_INDEX_ASSERT( name, idx ); \
249 type Get##name(const char* key) \
251 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
254 const type Get##name(int idx) const \
256 NW_INDEX_ASSERT( name, idx ); \
257 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
260 const type Get##name(const char* key) const \
262 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
265 s32 Get##name##Index(const char* key) const \
267 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
270 …rnal::ResArray< type, nw::ut::internal::ResArrayDicTraits<ResDicType##Data>::Traits > Get##name() \
272 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
276 >( (dic.IsValid()) ? dic.ref().GetBeginNode() : NULL, Get##name##Count() ); \
278 …ay< const type, nw::ut::internal::ResArrayDicTraits<ResDicType##Data>::Traits > Get##name() const \
280 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
284 >( (dic.IsValid()) ? dic.ref().GetBeginNode() : NULL, Get##name##Count() ); \
288 #define NW_RES_FIELD_PRIMITIVE_LIST_INLINE_DECL( type, name ) \ argument
289 s32 Get##name##Count() const \
290 { return ref().m_##name##Count; } \
291 type Get##name(int idx) const \
293 NW_INDEX_ASSERT( name, idx ); \
294 return ref().m_##name##Table[ idx ]; \
296 void Set##name(int idx, type value) \
298 NW_INDEX_ASSERT( name, idx ); \
299 ref().m_##name##Table[ idx ] = value; \
301 type* Get##name() \
302 { return static_cast<type*>(ref().m_##name##Table); } \
303 const type* Get##name() const \
304 { return static_cast<const type*>(ref().m_##name##Table); } \
307 #define NW_RES_FIELD_STRING_LIST_INLINE_DECL( name ) \ argument
308 s32 Get##name##Count() const \
309 { return ref().m_##name##Count; } \
310 const char* Get##name(int idx) const \
312 NW_INDEX_ASSERT( name, idx ); \
313 return ref().m_##name##Table[ idx ].to_ptr(); \
317 #define NW_RES_FIELD_CLASS_LIST_INLINE_DECL( type, name ) \ argument
318 s32 Get##name##Count() const \
319 { return ref().m_##name##Count; } \
320 type Get##name(int idx) \
322 NW_INDEX_ASSERT( name, idx ); \
323 return type( ref().m_##name##Table[ idx ].to_ptr() ); \
325 const type Get##name(int idx) const \
327 NW_INDEX_ASSERT( name, idx ); \
328 return type( ref().m_##name##Table[ idx ].to_ptr() ); \
330 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
335 >( &(ref().m_##name##Table[0]), Get##name##Count() ); \
337 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
342 >( &(ref().m_##name##Table[0]), Get##name##Count() ); \