git » swiftpm » main » tree

[main] / Sources / c_snikket / iinclude / hx / Anon.h

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
#ifndef HX_ANON_H
#define HX_ANON_H


namespace hx
{

typedef Dynamic FieldMap;

HXCPP_EXTERN_CLASS_ATTRIBUTES
Dynamic FieldMapCreate();

HXCPP_EXTERN_CLASS_ATTRIBUTES
bool FieldMapGet(Dynamic *inMap, const ::String &inName, ::Dynamic &outValue);
HXCPP_EXTERN_CLASS_ATTRIBUTES
bool FieldMapHas(Dynamic *inMap, const ::String &inName);
HXCPP_EXTERN_CLASS_ATTRIBUTES
bool FieldMapGet(Dynamic *inMap, int inID, ::Dynamic &outValue);
HXCPP_EXTERN_CLASS_ATTRIBUTES
#ifdef HXCPP_GC_GENERATIONAL
void FieldMapSet(hx::Object *inThis,Dynamic *inMap, const ::String &inName, const ::Dynamic &inValue);
#else
void FieldMapSet(Dynamic *inMap, const ::String &inName, const ::Dynamic &inValue);
#endif
HXCPP_EXTERN_CLASS_ATTRIBUTES
void FieldMapAppendFields(Dynamic *inMap,::Array< ::String> &outFields);
HXCPP_EXTERN_CLASS_ATTRIBUTES
void FieldMapMark(Dynamic *inMap,hx::MarkContext *__inCtx);
#ifdef HXCPP_VISIT_ALLOCS
HXCPP_EXTERN_CLASS_ATTRIBUTES
void FieldMapVisit(Dynamic **inMap,hx::VisitContext *__inCtx);
#endif

} // end namespace hx




namespace hx
{

// --- hx::Anon_obj ----------------------------------------------
//
// The hx::Anon_obj contains an arbitrary string map of fields.

class HXCPP_EXTERN_CLASS_ATTRIBUTES Anon_obj : public hx::Object
{
   typedef hx::Anon_obj OBJ_;
   typedef hx::ObjectPtr<hx::Anon_obj> Anon;
   typedef hx::Object super;

   inline void *operator new( size_t inSize, int inExtra )
   {
      return hx::Object::operator new(inSize+inExtra, true, 0);
   }

   struct VariantKey
   {
      int    hash;
      String key;
      cpp::Variant value;
   };

   Dynamic mFields;
   int     mFixedFields;

public:
   HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdDynamic };

   inline void *operator new( size_t inSize )
   {
      return hx::Object::operator new(inSize, true, 0);
   }
   inline void operator delete(void *, size_t inSize ) { }
   inline void operator delete(void *, size_t inSize, int inExtra ) { }

   inline Anon_obj *setFixed(int index, const String &inName, const ::cpp::Variant &inValue)
   {
      VariantKey *fixed = getFixed() + index;
      fixed->hash = inName.hash();
      fixed->key = inName;
      fixed->value = inValue;
      if (inValue.type == ::cpp::Variant::typeObject) {
        HX_OBJ_WB_GET(this, inValue.valObject);
      }
      else if (inValue.type == ::cpp::Variant::typeString) {
        HX_OBJ_WB_GET(this, inValue.valStringPtr);
      }
      return this;
   }
   inline VariantKey *getFixed()
   {
      return (VariantKey *)(this + 1);
   }
   inline int findFixed(const ::String &inKey,bool inSkip5 = false);




   Anon_obj(int inFixedFields = 0);

   static Anon Create(int inElements)
   {
      return Anon(new (inElements*sizeof(VariantKey) ) hx::Anon_obj(inElements) );
   }

   static Anon Create() { return Anon(new (0) hx::Anon_obj); }
   static Anon Create(const Dynamic &inSrc) { return Anon(new (0) hx::Anon_obj); }

   static Dynamic __CreateEmpty() { return Anon(new (0) hx::Anon_obj); }
   static Dynamic __Create(DynamicArray inArgs);
   static void __boot();

   void operator delete( void *, int) { }


   hx::Val __Field(const String &inString ,hx::PropertyAccess inCallProp);
   bool __HasField(const String &inString);
   hx::Val __SetField(const String &inString,const hx::Val &inValue ,hx::PropertyAccess inCallProp);
   virtual void __GetFields(Array<String> &outFields);
   Dynamic *__GetFieldMap() { return &mFields; }

   virtual int __GetType() const { return vtObject; }

   hx::Anon_obj *Add(const String &inName,const Dynamic &inValue,bool inSetThisPointer=true);
   void __Mark(hx::MarkContext *__inCtx);
   #ifdef HXCPP_VISIT_ALLOCS
   void __Visit(hx::VisitContext *__inCtx);
   #endif

   String __ToString() const;
   String toString();

   static hx::ObjectPtr<hx::Class_obj> __mClass; \
   static hx::ObjectPtr<hx::Class_obj> &__SGetClass() { return __mClass; }
   hx::ObjectPtr<hx::Class_obj > __GetClass() const { return __mClass; }

   bool __Remove(String inKey);
};


typedef hx::ObjectPtr<hx::Anon_obj> Anon;

HXCPP_EXTERN_CLASS_ATTRIBUTES
Anon SourceInfo(String inFile, int inLine, String inClass, String inMethod);


HXCPP_EXTERN_CLASS_ATTRIBUTES String StringFromAnonFields(hx::Object *inPtr);


template<typename _hx_T0>
class AnonStruct1_obj : public hx::Object
{
public:
   HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdDynamic };

   String name0; _hx_T0 t0;

   inline static hx::Object *Create(const String &inName0, _hx_T0 inT0)
   {
      AnonStruct1_obj *result = new AnonStruct1_obj;
      result->name0 = inName0; result->t0 = inT0;
      if (hx::ContainsPointers<_hx_T0>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT0));
      }
      return result;
   }
   hx::Val __Field(const String &inField, hx::PropertyAccess)
   {
      if (HX_QSTR_EQ(inField,name0)) return t0;
      return null();
   }
   hx::Val __SetField(const String &inField,const hx::Val &inValue, hx::PropertyAccess inCallProp)
   {
      if (inField.__s==name0.__s || HX_QSTR_EQ(inField,name0)) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      hx::Throw(HX_CSTRING("Missing field ") + inField);
      return inValue;
   }

   void __Mark(hx::MarkContext *__inCtx)
   {
      HX_MARK_MEMBER(t0);
   }
   #ifdef HXCPP_VISIT_ALLOCS
   void __Visit(hx::VisitContext *__inCtx)
   {
      HX_VISIT_MEMBER(t0);
   }
   #endif

    void __GetFields(Array<String> &outFields)
    {
       outFields->push(name0);
    }

   String toString() { return StringFromAnonFields(this); }
};



template<typename _hx_T0, typename _hx_T1>
class AnonStruct2_obj : public hx::Object
{
public:
   HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdDynamic };

   String name0; _hx_T0 t0;
   String name1; _hx_T1 t1;

   inline static hx::Object *Create(const String &inName0, _hx_T0 inT0,
                             const String &inName1, _hx_T1 inT1)
   {
      AnonStruct2_obj *result = new AnonStruct2_obj;
      result->name0 = inName0; result->t0 = inT0;
      if (hx::ContainsPointers<_hx_T0>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT0));
      }
      result->name1 = inName1; result->t1 = inT1;
      if (hx::ContainsPointers<_hx_T1>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT1));
      }
      return result;
   }
   hx::Val __Field(const String &inField, hx::PropertyAccess)
   {
      if (inField.__s==name0.__s) return t0;
      if (inField.__s==name1.__s) return t1;

      #ifdef HX_SMART_STRINGS
      if (!inField.isAsciiEncodedQ())
         return null();
      #endif

      if (HX_QSTR_EQ_AE(inField,name0)) return t0;
      if (HX_QSTR_EQ_AE(inField,name1)) return t1;
      return null();
   }
   hx::Val __SetField(const String &inField,const hx::Val &inValue, hx::PropertyAccess inCallProp)
   {
      if (inField.__s==name0.__s) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (inField.__s==name1.__s) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }

      if (HX_QSTR_EQ(inField,name0)) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name1)) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }
      hx::Throw(HX_CSTRING("Missing field ") + inField);
      return inValue;
   }

   void __Mark(hx::MarkContext *__inCtx)
   {
      HX_MARK_MEMBER(t0);
      HX_MARK_MEMBER(t1);
   }
   #ifdef HXCPP_VISIT_ALLOCS
   void __Visit(hx::VisitContext *__inCtx)
   {
      HX_VISIT_MEMBER(t0);
      HX_VISIT_MEMBER(t1);
   }
   #endif

    void __GetFields(Array<String> &outFields)
    {
       outFields->push(name0);
       outFields->push(name1);
    }

   String toString() { return StringFromAnonFields(this); }

};



template<typename _hx_T0, typename _hx_T1, typename _hx_T2>
class AnonStruct3_obj : public hx::Object
{
public:
   HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdDynamic };

   String name0; _hx_T0 t0;
   String name1; _hx_T1 t1;
   String name2; _hx_T2 t2;

   inline static hx::Object *Create(const String &inName0, _hx_T0 inT0,
                             const String &inName1, _hx_T1 inT1,
                             const String &inName2, _hx_T2 inT2)
   {
      AnonStruct3_obj *result = new AnonStruct3_obj;
      result->name0 = inName0; result->t0 = inT0;
      if (hx::ContainsPointers<_hx_T0>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT0));
      }
      result->name1 = inName1; result->t1 = inT1;
      if (hx::ContainsPointers<_hx_T1>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT1));
      }
      result->name2 = inName2; result->t2 = inT2;
      if (hx::ContainsPointers<_hx_T2>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT2));
      }
      return result;
   }
   hx::Val __Field(const String &inField, hx::PropertyAccess)
   {
      if (inField.__s==name0.__s) return t0;
      if (inField.__s==name1.__s) return t1;
      if (inField.__s==name2.__s) return t2;
      #ifdef HX_SMART_STRINGS
      if (!inField.isAsciiEncodedQ())
         return null();
      #endif
      if (HX_QSTR_EQ_AE(inField,name0)) return t0;
      if (HX_QSTR_EQ_AE(inField,name1)) return t1;
      if (HX_QSTR_EQ_AE(inField,name2)) return t2;
      return null();
   }
   hx::Val __SetField(const String &inField,const hx::Val &inValue, hx::PropertyAccess inCallProp)
   {
      if (inField.__s==name0.__s) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (inField.__s==name1.__s) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }
      if (inField.__s==name2.__s) {
        t2 = inValue.Cast< _hx_T2 >();
        if (hx::ContainsPointers<_hx_T2>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t2));
        }
        return inValue;
      }


      if (HX_QSTR_EQ(inField,name0)) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name1)) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name2)) {
        t2 = inValue.Cast< _hx_T2 >();
        if (hx::ContainsPointers<_hx_T2>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t2));
        }
        return inValue;
      }
      hx::Throw(HX_CSTRING("Missing field ") + inField);
      return inValue;
   }

   void __Mark(hx::MarkContext *__inCtx)
   {
      HX_MARK_MEMBER(t0);
      HX_MARK_MEMBER(t1);
      HX_MARK_MEMBER(t2);
   }
   #ifdef HXCPP_VISIT_ALLOCS
   void __Visit(hx::VisitContext *__inCtx)
   {
      HX_VISIT_MEMBER(t0);
      HX_VISIT_MEMBER(t1);
      HX_VISIT_MEMBER(t2);
   }
   #endif

    void __GetFields(Array<String> &outFields)
    {
       outFields->push(name0);
       outFields->push(name1);
       outFields->push(name2);
    }

   String toString() { return StringFromAnonFields(this); }
};


template<typename _hx_T0, typename _hx_T1, typename _hx_T2, typename _hx_T3>
class AnonStruct4_obj : public hx::Object
{
public:
   HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdDynamic };

   String name0; _hx_T0 t0;
   String name1; _hx_T1 t1;
   String name2; _hx_T2 t2;
   String name3; _hx_T3 t3;

   inline static hx::Object *Create(const String &inName0, _hx_T0 inT0,
                             const String &inName1, _hx_T1 inT1,
                             const String &inName2, _hx_T2 inT2,
                             const String &inName3, _hx_T3 inT3
                             )
   {
      AnonStruct4_obj *result = new AnonStruct4_obj;
      result->name0 = inName0; result->t0 = inT0;
      if (hx::ContainsPointers<_hx_T0>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT0));
      }
      result->name1 = inName1; result->t1 = inT1;
      if (hx::ContainsPointers<_hx_T1>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT1));
      }
      result->name2 = inName2; result->t2 = inT2;
      if (hx::ContainsPointers<_hx_T2>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT2));
      }
      result->name3 = inName3; result->t3 = inT3;
      if (hx::ContainsPointers<_hx_T3>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT3));
      }
      return result;
   }
   hx::Val __Field(const String &inField, hx::PropertyAccess)
   {
      if (inField.__s==name0.__s) return t0;
      if (inField.__s==name1.__s) return t1;
      if (inField.__s==name2.__s) return t2;
      if (inField.__s==name3.__s) return t3;
      #ifdef HX_SMART_STRINGS
      if (!inField.isAsciiEncodedQ())
         return null();
      #endif
      if (HX_QSTR_EQ_AE(inField,name0)) return t0;
      if (HX_QSTR_EQ_AE(inField,name1)) return t1;
      if (HX_QSTR_EQ_AE(inField,name2)) return t2;
      if (HX_QSTR_EQ_AE(inField,name3)) return t3;
      return null();
   }
   hx::Val __SetField(const String &inField,const hx::Val &inValue, hx::PropertyAccess inCallProp)
   {
      if (inField.__s==name0.__s) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (inField.__s==name1.__s) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }
      if (inField.__s==name2.__s) {
        t2 = inValue.Cast< _hx_T2 >();
        if (hx::ContainsPointers<_hx_T2>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t2));
        }
        return inValue;
      }
      if (inField.__s==name3.__s) {
        t3 = inValue.Cast< _hx_T3 >();
        if (hx::ContainsPointers<_hx_T3>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t3));
        }
        return inValue;
      }



      if (HX_QSTR_EQ(inField,name0)) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name1)) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }  
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name2)) {
        t2 = inValue.Cast< _hx_T2 >();
        if (hx::ContainsPointers<_hx_T2>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t2));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name3)) {
        t3 = inValue.Cast< _hx_T3 >();
        if (hx::ContainsPointers<_hx_T3>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t3));
        }
        return inValue;
      }
      hx::Throw(HX_CSTRING("Missing field ") + inField);
      return inValue;
   }

   void __Mark(hx::MarkContext *__inCtx)
   {
      HX_MARK_MEMBER(t0);
      HX_MARK_MEMBER(t1);
      HX_MARK_MEMBER(t2);
      HX_MARK_MEMBER(t3);
   }
   #ifdef HXCPP_VISIT_ALLOCS
   void __Visit(hx::VisitContext *__inCtx)
   {
      HX_VISIT_MEMBER(t0);
      HX_VISIT_MEMBER(t1);
      HX_VISIT_MEMBER(t2);
      HX_VISIT_MEMBER(t3);
   }
   #endif

    void __GetFields(Array<String> &outFields)
    {
       outFields->push(name0);
       outFields->push(name1);
       outFields->push(name2);
       outFields->push(name3);
    }

   String toString() { return StringFromAnonFields(this); }
};




template<typename _hx_T0, typename _hx_T1, typename _hx_T2, typename _hx_T3, typename _hx_T4>
class AnonStruct5_obj : public hx::Object
{
public:
   HX_IS_INSTANCE_OF enum { _hx_ClassId = hx::clsIdDynamic };

   String name0; _hx_T0 t0;
   String name1; _hx_T1 t1;
   String name2; _hx_T2 t2;
   String name3; _hx_T3 t3;
   String name4; _hx_T4 t4;

   inline static hx::Object *Create(const String &inName0, _hx_T0 inT0,
                             const String &inName1, _hx_T1 inT1,
                             const String &inName2, _hx_T2 inT2,
                             const String &inName3, _hx_T3 inT3,
                             const String &inName4, _hx_T4 inT4
                             )
   {
      AnonStruct5_obj *result = new AnonStruct5_obj;
      result->name0 = inName0; result->t0 = inT0;
      if (hx::ContainsPointers<_hx_T0>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT0));
      }
      result->name1 = inName1; result->t1 = inT1;
      if (hx::ContainsPointers<_hx_T1>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT1));
      }
      result->name2 = inName2; result->t2 = inT2;
      if (hx::ContainsPointers<_hx_T2>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT2));
      }
      result->name3 = inName3; result->t3 = inT3;
      if (hx::ContainsPointers<_hx_T3>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT3));
      }
      result->name4 = inName4; result->t4 = inT4;
      if (hx::ContainsPointers<_hx_T4>()) {
        HX_OBJ_WB_GET(result, hx::PointerOf(inT4));
      }
      return result;
   }
   hx::Val __Field(const String &inField, hx::PropertyAccess)
   {
      if (inField.__s==name0.__s) return t0;
      if (inField.__s==name1.__s) return t1;
      if (inField.__s==name2.__s) return t2;
      if (inField.__s==name3.__s) return t3;
      if (inField.__s==name4.__s) return t4;
      #ifdef HX_SMART_STRINGS
      if (!inField.isAsciiEncodedQ())
         return null();
      #endif
      if (HX_QSTR_EQ_AE(inField,name0)) return t0;
      if (HX_QSTR_EQ_AE(inField,name1)) return t1;
      if (HX_QSTR_EQ_AE(inField,name2)) return t2;
      if (HX_QSTR_EQ_AE(inField,name3)) return t3;
      if (HX_QSTR_EQ_AE(inField,name4)) return t4;
      return null();
   }
   hx::Val __SetField(const String &inField,const hx::Val &inValue, hx::PropertyAccess inCallProp)
   {
      if (inField.__s==name0.__s) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (inField.__s==name1.__s) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }
      if (inField.__s==name2.__s) {
        t2 = inValue.Cast< _hx_T2 >();
        if (hx::ContainsPointers<_hx_T2>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t2));
        }
        return inValue;
      }
      if (inField.__s==name3.__s) {
        t3 = inValue.Cast< _hx_T3 >();
        if (hx::ContainsPointers<_hx_T3>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t3));
        }
        return inValue;
      }
      if (inField.__s==name4.__s) {
        t4 = inValue.Cast< _hx_T4 >();
        if (hx::ContainsPointers<_hx_T4>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t4));
        }
        return inValue;
      }




      if (HX_QSTR_EQ(inField,name0)) {
        t0 = inValue.Cast< _hx_T0 >();
        if (hx::ContainsPointers<_hx_T0>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t0));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name1)) {
        t1 = inValue.Cast< _hx_T1 >();
        if (hx::ContainsPointers<_hx_T1>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t1));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name2)) {
        t2 = inValue.Cast< _hx_T2 >();
        if (hx::ContainsPointers<_hx_T2>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t2));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name3)) {
        t3 = inValue.Cast< _hx_T3 >();
        if (hx::ContainsPointers<_hx_T3>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t3));
        }
        return inValue;
      }
      if (HX_QSTR_EQ(inField,name4)) {
        t4 = inValue.Cast< _hx_T4 >();
        if (hx::ContainsPointers<_hx_T4>()) {
          HX_OBJ_WB_GET(this, hx::PointerOf(t4));
        }
        return inValue;
      }
      hx::Throw(HX_CSTRING("Missing field ") + inField);
      return inValue;
   }

   void __Mark(hx::MarkContext *__inCtx)
   {
      HX_MARK_MEMBER(t0);
      HX_MARK_MEMBER(t1);
      HX_MARK_MEMBER(t2);
      HX_MARK_MEMBER(t3);
      HX_MARK_MEMBER(t4);
   }
   #ifdef HXCPP_VISIT_ALLOCS
   void __Visit(hx::VisitContext *__inCtx)
   {
      HX_VISIT_MEMBER(t0);
      HX_VISIT_MEMBER(t1);
      HX_VISIT_MEMBER(t2);
      HX_VISIT_MEMBER(t3);
      HX_VISIT_MEMBER(t4);
   }
   #endif

    void __GetFields(Array<String> &outFields)
    {
       outFields->push(name0);
       outFields->push(name1);
       outFields->push(name2);
       outFields->push(name3);
       outFields->push(name4);
    }

   String toString() { return StringFromAnonFields(this); }
};






} // end namespace hx

HXCPP_EXTERN_CLASS_ATTRIBUTES
bool __hxcpp_anon_remove(Dynamic inObj,::String inKey);

#endif