Lines Matching refs:name

26 #define NW_RES_FIELD_PRIMITIVE_DECL( type, name )                                   \  argument
27 type Get##name() const { return static_cast<type>(ref().m_##name); } \
28 void Set##name(type value) { ref().m_##name = value; } \
31 #define NW_RES_FIELD_BOOL_PRIMITIVE_DECL( name ) \ argument
32 bool Is##name() const { return static_cast<bool>(ref().m_Is##name); } \
33 void Set##name(bool value) { ref().m_Is##name = value; } \
36 #define NW_RES_FIELD_STRING_DECL( name ) \ argument
37 const char* Get##name() const { return ref().to##name.to_ptr(); } \
40 #define NW_RES_FIELD_CLASS_DECL( type, name ) \ argument
41 type Get##name() { return type( ref().to##name.to_ptr() ); } \
42 const type Get##name() const { return type( ref().to##name.to_ptr() ); } \
44 #define NW_RES_FIELD_STRUCT_DECL( type, name ) \ argument
45 type& Get##name() { return ref().m_##name; } \
46 const type& Get##name() const { return ref().m_##name; } \
47 void Set##name(const type& value) { ref().m_##name = value; } \
49 #define NW_RES_FIELD_VECTOR2_DECL( type, name ) \ argument
50 void Set##name( f32 x, f32 y ) { ref().m_##name.Set(x, y); } \
51 const type& Get##name() const { return ref().m_##name; } \
52 void Set##name(const type& value) { ref().m_##name = value; } \
54 #define NW_RES_FIELD_VECTOR3_DECL( type, name ) \ argument
55 void Set##name( f32 x, f32 y, f32 z ) { ref().m_##name.Set(x, y, z); } \
56 const type& Get##name() const { return ref().m_##name; } \
57 void Set##name(const type& value) { ref().m_##name = value; } \
59 #define NW_RES_FIELD_RECT_DECL( type, name ) \ argument
60 void Set##name( f32 l, f32 r, f32 b, f32 t ) { ref().m_##name.Set(l, r, b, t); } \
61 const type& Get##name() const { return ref().m_##name; } \
62 void Set##name(const type& value) { ref().m_##name = value; } \
64 #define NW_RES_FIELD_FLOAT_COLOR_DECL( type, name ) \ argument
65 void Set##name( f32 r, f32 g, f32 b ) { ref().m_##name.Set(r, g, b); } \
66 void Set##name( f32 r, f32 g, f32 b, f32 a ) { ref().m_##name.Set(r, g, b, a); } \
67 const type& Get##name() const { return ref().m_##name; } \
68 void Set##name(const type& value) { ref().m_##name = value; } \
70 #define NW_RES_FIELD_FLOAT_U32_COLOR_DECL( type, name ) \ argument
71 u32 Get##name##U32() const { return ref().m_##name##U32; } \
72 …void Set##name( f32 r, f32 g, f32 b ) { ref().m_##name.Set(r, g, b); ref().m_##name##U32 = …
73 …void Set##name( f32 r, f32 g, f32 b, f32 a ) { ref().m_##name.Set(r, g, b, a); ref().m_##na…
74 const type& Get##name() const { return ref().m_##name; } \
75 …void Set##name(const type& value) { ref().m_##name = value; ref().m_##name##U32 = ref().m_#…
77 #define NW_RES_FIELD_RESSTRUCT_DECL( type, name ) \ argument
78 type Get##name() { return type( &(ref().m_##name) ); } \
79 const type Get##name() const { return type( &(ref().m_##name) ); } \
80 type##Data& Get##name##Data() { return ref().m_##name; } \
81 const type##Data& Get##name##Data() const { return ref().m_##name; } \
83 #define NW_RES_FIELD_CONST_RESSTRUCT_DECL( type, name ) \ argument
84 const type Get##name() const { return type( &(ref().m_##name) ); } \
85 const type##Data& Get##name##Data() const { return ref().m_##name; } \
87 #define NW_RES_FIELD_PRIMITIVE_FIXED_LIST_DECL( type, name ) \ argument
88 s32 Get##name##Count() const \
89 { return sizeof(ref().m_##name) / sizeof(type); } \
90 type Get##name(int idx) const \
91 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
92 void Set##name(int idx, type value ) \
93 { NW_INDEX_ASSERT( name, idx ); ref().m_##name[ idx ] = value; } \
94 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() \
95 …ray<type, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().m_##name[ 0 ]), Get##name##Count() )…
96 …:ut::internal::ResArray<const type, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() const \
97 …nst type, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().m_##name[ 0 ]), Get##name##Count() )…
100 #define NW_RES_FIELD_STRING_FIXED_LIST_DECL( name ) \ argument
101 s32 Get##name##Count() const \
102 { return sizeof(ref().to##name) / sizeof(nw::ut::BinString); } \
103 const char* Get##name(int idx) const \
104 { NW_INDEX_ASSERT( name, idx ); return ref().to##name[ idx ].to_ptr(); } \
105 …::ResArray<const nw::ut::BinString, nw::ut::internal::ResArrayPrimitiveTraits> Get##name() const \
106 …BinString, nw::ut::internal::ResArrayPrimitiveTraits>( &(ref().to##name[0]), Get##name##Count() );…
109 #define NW_RES_FIELD_CLASS_FIXED_LIST_DECL( type, name ) \ argument
110 s32 Get##name##Count() const \
111 { return sizeof(ref().to##name) / sizeof(nw::ut::Offset); } \
112 type Get##name(int idx) \
113 { NW_INDEX_ASSERT( name, idx ); return type( ref().to##name[ idx ].to_ptr() ); } \
114 const type Get##name(int idx) const \
115 { return type( ref().to##name[ idx ].to_ptr() ); } \
116 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
117 …esArray<type, nw::ut::internal::ResArrayClassTraits>( &(ref().to##name[ 0 ]), Get##name##Count() )…
118 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
119 …y<const type, nw::ut::internal::ResArrayClassTraits>( &(ref().to##name[ 0 ]), Get##name##Count() )…
122 #define NW_RES_FIELD_STRUCT_FIXED_LIST_DECL( type, name ) \ argument
123 s32 Get##name##Count() const \
124 { return sizeof(ref().m_##name) / sizeof(type##Data); } \
125 type Get##name(int idx) \
126 { NW_INDEX_ASSERT( name, idx ); return type( &(ref().m_##name[ idx ]) ); } \
127 const type Get##name(int idx) const \
128 { NW_INDEX_ASSERT( name, idx ); return type( &(ref().m_##name[ idx ]) ); } \
129 type##Data& Get##name##Data(int idx) \
130 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
131 const type##Data& Get##name##Data(int idx) const \
132 { NW_INDEX_ASSERT( name, idx ); return ref().m_##name[ idx ]; } \
133 type##Data* Get##name##Data() { return ref().m_##name; } \
134 const type##Data* Get##name##Data() const { return ref().m_##name; } \
137 #define NW_RES_FIELD_PRIMITIVE_LIST_DECL( type, name ) \ argument
138 s32 Get##name##Count() const \
139 { return ref().m_##name##TableCount; } \
140 type Get##name(int idx) const \
142 NW_INDEX_ASSERT( name, idx ); \
143 … const type* tbl_ptr = static_cast<const type*>( ref().to##name##Table.to_table_ptr() ); \
146 void Set##name(int idx, type value) \
148 NW_INDEX_ASSERT( name, idx ); \
149 type* tbl_ptr = Get##name(); \
152 type* Get##name() \
153 { return static_cast<type*>(ref().to##name##Table.to_table_ptr()); } \
154 const type* Get##name() const \
155 { return static_cast<const type*>(ref().to##name##Table.to_table_ptr()); } \
159 #define NW_RES_FIELD_STRING_LIST_DECL( name ) \ argument
160 s32 Get##name##Count() const \
161 { return ref().m_##name##TableCount; } \
162 const char* Get##name(int idx) const \
164 NW_INDEX_ASSERT( name, idx ); \
165 …const BinString* tbl_ptr = static_cast<const BinString*>( ref().to##name##Table.to_table_ptr() ); \
170 #define NW_RES_FIELD_CLASS_LIST_DECL( type, name ) \ argument
171 s32 Get##name##Count() const \
172 { return ref().m_##name##TableCount; } \
173 type Get##name(int idx) \
175 NW_INDEX_ASSERT( name, idx ); \
176 … nw::ut::Offset* tbl_ptr = static_cast<nw::ut::Offset*>( ref().to##name##Table.to_table_ptr() ); \
179 const type Get##name(int idx) const \
181 NW_INDEX_ASSERT( name, idx ); \
182 …const nw::ut::Offset* tbl_ptr = static_cast<const nw::ut::Offset*>( ref().to##name##Table.to_table…
185 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
187 …y<type, nw::ut::internal::ResArrayClassTraits>( ref().to##name##Table.to_table_ptr(), Get##name##C…
189 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
191 …t type, nw::ut::internal::ResArrayClassTraits>( ref().to##name##Table.to_table_ptr(), Get##name##C…
195 #define NW_RES_FIELD_STRUCT_LIST_DECL( type, name ) \ argument
196 s32 Get##name##Count() const \
197 { return ref().m_##name##TableCount; } \
198 type##Data* Get##name##Data() \
200 return static_cast<type##Data*>( ref().to##name##Table.to_table_ptr() ); \
202 const type##Data* Get##name##Data() const \
204 return static_cast<const type##Data*>( ref().to##name##Table.to_table_ptr() ); \
206 type##Data& Get##name##Data(int idx) \
208 NW_INDEX_ASSERT( name, idx ); \
209 type##Data* tbl_ptr = this->Get##name##Data(); \
212 const type##Data& Get##name##Data(int idx) const \
214 NW_INDEX_ASSERT( name, idx ); \
215 const type##Data* tbl_ptr = this->Get##name##Data(); \
218 type Get##name(int idx) \
220 return type( &(this->Get##name##Data(idx)) ); \
222 const type Get##name(int idx) const \
224 return type( &(this->Get##name##Data(idx)) ); \
228 #define NW_RES_FIELD_CLASS_DIC_DECL( type, name, ResDicType ) \ argument
229 s32 Get##name##Count() const \
231 return ref().m_##name##DicCount; \
233 type Get##name(int idx) \
235 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
236 NW_INDEX_ASSERT( name, idx ); \
239 type Get##name(const char* key) \
241 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
244 const type Get##name(int idx) const \
246 NW_INDEX_ASSERT( name, idx ); \
247 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
250 const type Get##name(const char* key) const \
252 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
255 s32 Get##name##Index(const char* key) const \
257 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
260 …rnal::ResArray< type, nw::ut::internal::ResArrayDicTraits<ResDicType##Data>::Traits > Get##name() \
262 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
266 >( (dic.IsValid()) ? dic.ref().GetBeginNode() : NULL, Get##name##Count() ); \
268 …ay< const type, nw::ut::internal::ResArrayDicTraits<ResDicType##Data>::Traits > Get##name() const \
270 ResDicType dic = ResDicType( ref().to##name##Dic.to_ptr() ); \
274 >( (dic.IsValid()) ? dic.ref().GetBeginNode() : NULL, Get##name##Count() ); \
278 #define NW_RES_FIELD_PRIMITIVE_LIST_INLINE_DECL( type, name ) \ argument
279 s32 Get##name##Count() const \
280 { return ref().m_##name##Count; } \
281 type Get##name(int idx) const \
283 NW_INDEX_ASSERT( name, idx ); \
284 return ref().m_##name##Table[ idx ]; \
286 void Set##name(int idx, type value) \
288 NW_INDEX_ASSERT( name, idx ); \
289 ref().m_##name##Table[ idx ] = value; \
291 type* Get##name() \
292 { return static_cast<type*>(ref().m_##name##Table); } \
293 const type* Get##name() const \
294 { return static_cast<const type*>(ref().m_##name##Table); } \
297 #define NW_RES_FIELD_STRING_LIST_INLINE_DECL( name ) \ argument
298 s32 Get##name##Count() const \
299 { return ref().m_##name##Count; } \
300 const char* Get##name(int idx) const \
302 NW_INDEX_ASSERT( name, idx ); \
303 return ref().m_##name##Table[ idx ].to_ptr(); \
307 #define NW_RES_FIELD_CLASS_LIST_INLINE_DECL( type, name ) \ argument
308 s32 Get##name##Count() const \
309 { return ref().m_##name##Count; } \
310 type Get##name(int idx) \
312 NW_INDEX_ASSERT( name, idx ); \
313 return type( ref().m_##name##Table[ idx ].to_ptr() ); \
315 const type Get##name(int idx) const \
317 NW_INDEX_ASSERT( name, idx ); \
318 return type( ref().m_##name##Table[ idx ].to_ptr() ); \
320 nw::ut::internal::ResArray<type, nw::ut::internal::ResArrayClassTraits> Get##name() \
325 >( &(ref().m_##name##Table[0]), Get##name##Count() ); \
327 …const nw::ut::internal::ResArray<const type, nw::ut::internal::ResArrayClassTraits> Get##name() co…
332 >( &(ref().m_##name##Table[0]), Get##name##Count() ); \