~zorba-coders/zorba/bugs-912586-912593-912722

« back to all changes in this revision

Viewing changes to src/runtime/visitors/printer_visitor_impl.cpp

  • Committer: Cezar Andrei
  • Date: 2012-03-28 15:42:12 UTC
  • mfrom: (10606.1.129 zorba)
  • Revision ID: cezar.lp@cezarandrei.com-20120328154212-jh2heq49xcqjppce
Merge from trunck and resolve ChangeLog conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
  thePrinter.startBeginVisit("TreatIterator", ++theId);
193
193
  if (a.theCheckPrime)
194
194
    thePrinter.addAttribute("type", TypeOps::toString(*a.theTreatType));
195
 
  thePrinter.addAttribute("quant", TypeOps::decode_quantifier
196
 
      (a.theQuantifier));
 
195
  thePrinter.addAttribute("quant", TypeOps::decode_quantifier(a.theQuantifier));
197
196
  printCommons( &a, theId );
198
197
  thePrinter.endBeginVisit(theId);
199
198
}
337
336
}
338
337
 
339
338
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<AddOperation,
340
 
                    TypeConstants::XS_DECIMAL>& a)
 
339
                    store::XS_DECIMAL>& a)
341
340
{
342
341
  thePrinter.startBeginVisit("SpecificNumArithIterator_AddOperation_DECIMAL",
343
342
                             ++theId);
345
344
  thePrinter.endBeginVisit(theId);
346
345
}
347
346
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<AddOperation,
348
 
                    TypeConstants::XS_INTEGER>& a)
 
347
                    store::XS_INTEGER>& a)
349
348
{
350
349
  thePrinter.startBeginVisit("SpecificNumArithIterator_AddOperation_INTEGER",
351
350
                             ++theId);
353
352
  thePrinter.endBeginVisit(theId);
354
353
}
355
354
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<AddOperation,
356
 
                    TypeConstants::XS_FLOAT>& a)
 
355
                    store::XS_FLOAT>& a)
357
356
{
358
357
  thePrinter.startBeginVisit("SpecificNumArithIterator_AddOperation_FLOAT",
359
358
                             ++theId);
361
360
  thePrinter.endBeginVisit(theId);
362
361
}
363
362
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<AddOperation,
364
 
                    TypeConstants::XS_DOUBLE>& a)
 
363
                    store::XS_DOUBLE>& a)
365
364
{
366
365
  thePrinter.startBeginVisit("SpecificNumArithIterator_AddOperation_DOUBLE",
367
366
                             ++theId);
370
369
}
371
370
void PrinterVisitor::beginVisit ( const
372
371
SpecificNumArithIterator<SubtractOperation,
373
 
                    TypeConstants::XS_DECIMAL>& a)
 
372
                    store::XS_DECIMAL>& a)
374
373
{
375
374
thePrinter.startBeginVisit("SpecificNumArithIterator_SubtractOperation_DECIMAL",
376
375
                             ++theId);
380
379
 
381
380
void PrinterVisitor::beginVisit ( const
382
381
SpecificNumArithIterator<SubtractOperation,
383
 
                    TypeConstants::XS_INTEGER>& a)
 
382
                    store::XS_INTEGER>& a)
384
383
{
385
384
thePrinter.startBeginVisit("SpecificNumArithIterator_SubtractOperation_INTEGER",
386
385
                             ++theId);
389
388
}
390
389
void PrinterVisitor::beginVisit ( const
391
390
SpecificNumArithIterator<SubtractOperation,
392
 
                    TypeConstants::XS_FLOAT>& a)
 
391
                    store::XS_FLOAT>& a)
393
392
{
394
393
  thePrinter.startBeginVisit("SpecificNumArithIterator_SubtractOperation_FLOAT",
395
394
                             ++theId);
398
397
}
399
398
void PrinterVisitor::beginVisit ( const
400
399
SpecificNumArithIterator<SubtractOperation,
401
 
                    TypeConstants::XS_DOUBLE>& a)
 
400
                    store::XS_DOUBLE>& a)
402
401
{
403
402
thePrinter.startBeginVisit("SpecificNumArithIterator_SubtractOperation_DOUBLE",
404
403
                             ++theId);
407
406
}
408
407
void PrinterVisitor::beginVisit ( const
409
408
SpecificNumArithIterator<MultiplyOperation,
410
 
                    TypeConstants::XS_DECIMAL>& a)
 
409
                    store::XS_DECIMAL>& a)
411
410
{
412
411
thePrinter.startBeginVisit("SpecificNumArithIterator_MultiplyOperation_DECIMAL",
413
412
                             ++theId);
416
415
}
417
416
void PrinterVisitor::beginVisit ( const
418
417
SpecificNumArithIterator<MultiplyOperation,
419
 
                    TypeConstants::XS_INTEGER>& a)
 
418
                    store::XS_INTEGER>& a)
420
419
{
421
420
thePrinter.startBeginVisit("SpecificNumArithIterator_MultiplyOperation_INTEGER",
422
421
                             ++theId);
426
425
 
427
426
void PrinterVisitor::beginVisit ( const
428
427
SpecificNumArithIterator<MultiplyOperation,
429
 
                    TypeConstants::XS_FLOAT>& a)
 
428
                    store::XS_FLOAT>& a)
430
429
{
431
430
  thePrinter.startBeginVisit("SpecificNumArithIterator_MultiplyOperation_FLOAT",
432
431
                             ++theId);
435
434
}
436
435
void PrinterVisitor::beginVisit ( const
437
436
SpecificNumArithIterator<MultiplyOperation,
438
 
                    TypeConstants::XS_DOUBLE>& a)
 
437
                    store::XS_DOUBLE>& a)
439
438
{
440
439
thePrinter.startBeginVisit("SpecificNumArithIterator_MultiplyOperation_DOUBLE",
441
440
                             ++theId);
444
443
}
445
444
void PrinterVisitor::beginVisit ( const
446
445
SpecificNumArithIterator<DivideOperation,
447
 
                    TypeConstants::XS_DECIMAL>& a)
 
446
                    store::XS_DECIMAL>& a)
448
447
{
449
448
  thePrinter.startBeginVisit("SpecificNumArithIterator_DivideOperation_DECIMAL",
450
449
                             ++theId);
453
452
}
454
453
void PrinterVisitor::beginVisit ( const
455
454
SpecificNumArithIterator<DivideOperation,
456
 
                    TypeConstants::XS_INTEGER>& a)
 
455
                    store::XS_INTEGER>& a)
457
456
{
458
457
  thePrinter.startBeginVisit("SpecificNumArithIterator_DivideOperation_INTEGER",
459
458
                             ++theId);
462
461
}
463
462
void PrinterVisitor::beginVisit ( const
464
463
SpecificNumArithIterator<DivideOperation,
465
 
                    TypeConstants::XS_FLOAT>& a)
 
464
                    store::XS_FLOAT>& a)
466
465
{
467
466
  thePrinter.startBeginVisit("SpecificNumArithIterator_DivideOperation_FLOAT",
468
467
                             ++theId);
472
471
 
473
472
void PrinterVisitor::beginVisit ( const
474
473
SpecificNumArithIterator<DivideOperation,
475
 
                    TypeConstants::XS_DOUBLE>& a)
 
474
                    store::XS_DOUBLE>& a)
476
475
{
477
476
 
478
477
  thePrinter.startBeginVisit("SpecificNumArithIterator_DivideOperation_DOUBLE",
481
480
  thePrinter.endBeginVisit(theId);
482
481
}
483
482
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<ModOperation,
484
 
                    TypeConstants::XS_DECIMAL>& a)
 
483
                    store::XS_DECIMAL>& a)
485
484
{
486
485
  thePrinter.startBeginVisit("SpecificNumArithIterator_ModOperation_DECIMAL",
487
486
                             ++theId);
489
488
  thePrinter.endBeginVisit(theId);
490
489
}
491
490
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<ModOperation,
492
 
                    TypeConstants::XS_INTEGER>& a)
 
491
                    store::XS_INTEGER>& a)
493
492
{
494
493
  thePrinter.startBeginVisit("SpecificNumArithIterator_ModOperation_INTEGER",
495
494
                             ++theId);
497
496
  thePrinter.endBeginVisit(theId);
498
497
}
499
498
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<ModOperation,
500
 
                    TypeConstants::XS_FLOAT>& a)
 
499
                    store::XS_FLOAT>& a)
501
500
{
502
501
  thePrinter.startBeginVisit("SpecificNumArithIterator_ModOperation_FLOAT",
503
502
                             ++theId);
505
504
  thePrinter.endBeginVisit(theId);
506
505
}
507
506
void PrinterVisitor::beginVisit ( const SpecificNumArithIterator<ModOperation,
508
 
                    TypeConstants::XS_DOUBLE>& a)
 
507
                    store::XS_DOUBLE>& a)
509
508
{
510
509
  thePrinter.startBeginVisit("SpecificNumArithIterator_ModOperation_DOUBLE",
511
510
                             ++theId);
514
513
}
515
514
 
516
515
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
517
 
                  TypeConstants::XS_DECIMAL>& )
518
 
{
519
 
  thePrinter.startEndVisit();
520
 
  thePrinter.endEndVisit();
521
 
}
522
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
523
 
                  TypeConstants::XS_INTEGER>& )
524
 
{
525
 
  thePrinter.startEndVisit();
526
 
  thePrinter.endEndVisit();
527
 
}
528
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
529
 
                  TypeConstants::XS_FLOAT>& )
530
 
{
531
 
  thePrinter.startEndVisit();
532
 
  thePrinter.endEndVisit();
533
 
}
534
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
535
 
                  TypeConstants::XS_DOUBLE>& )
536
 
{
537
 
  thePrinter.startEndVisit();
538
 
  thePrinter.endEndVisit();
539
 
}
540
 
void PrinterVisitor::endVisit ( const
541
 
SpecificNumArithIterator<SubtractOperation,
542
 
                    TypeConstants::XS_DECIMAL>& )
543
 
{
544
 
  thePrinter.startEndVisit();
545
 
  thePrinter.endEndVisit();
546
 
}
547
 
 
548
 
void PrinterVisitor::endVisit ( const
549
 
SpecificNumArithIterator<SubtractOperation,
550
 
                  TypeConstants::XS_INTEGER>& )
551
 
{
552
 
  thePrinter.startEndVisit();
553
 
  thePrinter.endEndVisit();
554
 
}
555
 
void PrinterVisitor::endVisit ( const
556
 
SpecificNumArithIterator<SubtractOperation,
557
 
                  TypeConstants::XS_FLOAT>& )
558
 
{
559
 
  thePrinter.startEndVisit();
560
 
  thePrinter.endEndVisit();
561
 
}
562
 
void PrinterVisitor::endVisit ( const
563
 
SpecificNumArithIterator<SubtractOperation,
564
 
                  TypeConstants::XS_DOUBLE>& )
565
 
{
566
 
  thePrinter.startEndVisit();
567
 
  thePrinter.endEndVisit();
568
 
}
569
 
void PrinterVisitor::endVisit ( const
570
 
SpecificNumArithIterator<MultiplyOperation,
571
 
                  TypeConstants::XS_DECIMAL>& )
572
 
{
573
 
  thePrinter.startEndVisit();
574
 
  thePrinter.endEndVisit();
575
 
}
576
 
void PrinterVisitor::endVisit ( const
577
 
SpecificNumArithIterator<MultiplyOperation,
578
 
                  TypeConstants::XS_INTEGER>& )
579
 
{
580
 
  thePrinter.startEndVisit();
581
 
  thePrinter.endEndVisit();
582
 
}
583
 
 
584
 
void PrinterVisitor::endVisit ( const
585
 
SpecificNumArithIterator<MultiplyOperation,
586
 
                  TypeConstants::XS_FLOAT>& )
587
 
{
588
 
  thePrinter.startEndVisit();
589
 
  thePrinter.endEndVisit();
590
 
}
591
 
void PrinterVisitor::endVisit ( const
592
 
SpecificNumArithIterator<MultiplyOperation,
593
 
                  TypeConstants::XS_DOUBLE>& )
594
 
{
595
 
  thePrinter.startEndVisit();
596
 
  thePrinter.endEndVisit();
597
 
}
598
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
599
 
                  TypeConstants::XS_DECIMAL>& )
600
 
{
601
 
  thePrinter.startEndVisit();
602
 
  thePrinter.endEndVisit();
603
 
}
604
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
605
 
                  TypeConstants::XS_INTEGER>& )
606
 
{
607
 
  thePrinter.startEndVisit();
608
 
  thePrinter.endEndVisit();
609
 
}
610
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
611
 
                  TypeConstants::XS_FLOAT>& )
612
 
{
613
 
  thePrinter.startEndVisit();
614
 
  thePrinter.endEndVisit();
615
 
}
616
 
 
617
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
618
 
                  TypeConstants::XS_DOUBLE>& )
619
 
{
620
 
  thePrinter.startEndVisit();
621
 
  thePrinter.endEndVisit();
622
 
}
623
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
624
 
                  TypeConstants::XS_DECIMAL>& )
625
 
{
626
 
  thePrinter.startEndVisit();
627
 
  thePrinter.endEndVisit();
628
 
}
629
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
630
 
                  TypeConstants::XS_INTEGER>& )
631
 
{
632
 
  thePrinter.startEndVisit();
633
 
  thePrinter.endEndVisit();
634
 
}
635
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
636
 
                  TypeConstants::XS_FLOAT>& )
637
 
{
638
 
  thePrinter.startEndVisit();
639
 
  thePrinter.endEndVisit();
640
 
}
641
 
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
642
 
                  TypeConstants::XS_DOUBLE>& )
 
516
                  store::XS_DECIMAL>& )
 
517
{
 
518
  thePrinter.startEndVisit();
 
519
  thePrinter.endEndVisit();
 
520
}
 
521
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
 
522
                  store::XS_INTEGER>& )
 
523
{
 
524
  thePrinter.startEndVisit();
 
525
  thePrinter.endEndVisit();
 
526
}
 
527
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
 
528
                  store::XS_FLOAT>& )
 
529
{
 
530
  thePrinter.startEndVisit();
 
531
  thePrinter.endEndVisit();
 
532
}
 
533
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<AddOperation,
 
534
                  store::XS_DOUBLE>& )
 
535
{
 
536
  thePrinter.startEndVisit();
 
537
  thePrinter.endEndVisit();
 
538
}
 
539
void PrinterVisitor::endVisit ( const
 
540
SpecificNumArithIterator<SubtractOperation,
 
541
                    store::XS_DECIMAL>& )
 
542
{
 
543
  thePrinter.startEndVisit();
 
544
  thePrinter.endEndVisit();
 
545
}
 
546
 
 
547
void PrinterVisitor::endVisit ( const
 
548
SpecificNumArithIterator<SubtractOperation,
 
549
                  store::XS_INTEGER>& )
 
550
{
 
551
  thePrinter.startEndVisit();
 
552
  thePrinter.endEndVisit();
 
553
}
 
554
void PrinterVisitor::endVisit ( const
 
555
SpecificNumArithIterator<SubtractOperation,
 
556
                  store::XS_FLOAT>& )
 
557
{
 
558
  thePrinter.startEndVisit();
 
559
  thePrinter.endEndVisit();
 
560
}
 
561
void PrinterVisitor::endVisit ( const
 
562
SpecificNumArithIterator<SubtractOperation,
 
563
                  store::XS_DOUBLE>& )
 
564
{
 
565
  thePrinter.startEndVisit();
 
566
  thePrinter.endEndVisit();
 
567
}
 
568
void PrinterVisitor::endVisit ( const
 
569
SpecificNumArithIterator<MultiplyOperation,
 
570
                  store::XS_DECIMAL>& )
 
571
{
 
572
  thePrinter.startEndVisit();
 
573
  thePrinter.endEndVisit();
 
574
}
 
575
void PrinterVisitor::endVisit ( const
 
576
SpecificNumArithIterator<MultiplyOperation,
 
577
                  store::XS_INTEGER>& )
 
578
{
 
579
  thePrinter.startEndVisit();
 
580
  thePrinter.endEndVisit();
 
581
}
 
582
 
 
583
void PrinterVisitor::endVisit ( const
 
584
SpecificNumArithIterator<MultiplyOperation,
 
585
                  store::XS_FLOAT>& )
 
586
{
 
587
  thePrinter.startEndVisit();
 
588
  thePrinter.endEndVisit();
 
589
}
 
590
void PrinterVisitor::endVisit ( const
 
591
SpecificNumArithIterator<MultiplyOperation,
 
592
                  store::XS_DOUBLE>& )
 
593
{
 
594
  thePrinter.startEndVisit();
 
595
  thePrinter.endEndVisit();
 
596
}
 
597
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
 
598
                  store::XS_DECIMAL>& )
 
599
{
 
600
  thePrinter.startEndVisit();
 
601
  thePrinter.endEndVisit();
 
602
}
 
603
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
 
604
                  store::XS_INTEGER>& )
 
605
{
 
606
  thePrinter.startEndVisit();
 
607
  thePrinter.endEndVisit();
 
608
}
 
609
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
 
610
                  store::XS_FLOAT>& )
 
611
{
 
612
  thePrinter.startEndVisit();
 
613
  thePrinter.endEndVisit();
 
614
}
 
615
 
 
616
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<DivideOperation,
 
617
                  store::XS_DOUBLE>& )
 
618
{
 
619
  thePrinter.startEndVisit();
 
620
  thePrinter.endEndVisit();
 
621
}
 
622
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
 
623
                  store::XS_DECIMAL>& )
 
624
{
 
625
  thePrinter.startEndVisit();
 
626
  thePrinter.endEndVisit();
 
627
}
 
628
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
 
629
                  store::XS_INTEGER>& )
 
630
{
 
631
  thePrinter.startEndVisit();
 
632
  thePrinter.endEndVisit();
 
633
}
 
634
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
 
635
                  store::XS_FLOAT>& )
 
636
{
 
637
  thePrinter.startEndVisit();
 
638
  thePrinter.endEndVisit();
 
639
}
 
640
void PrinterVisitor::endVisit ( const SpecificNumArithIterator<ModOperation,
 
641
                  store::XS_DOUBLE>& )
643
642
{
644
643
  thePrinter.startEndVisit();
645
644
  thePrinter.endEndVisit();
1205
1204
 
1206
1205
 
1207
1206
#define TYPED_VAL_CMP( xqt )                                            \
1208
 
void PrinterVisitor::beginVisit(const TypedValueCompareIterator<TypeConstants::XS_##xqt>& a){\
 
1207
void PrinterVisitor::beginVisit(const TypedValueCompareIterator<store::XS_##xqt>& a){\
1209
1208
    thePrinter.startBeginVisit("TypedValueCompareIterator_" #xqt, ++theId); \
1210
1209
    printCommons( &a, theId );                                          \
1211
1210
    thePrinter.endBeginVisit(theId);                                    \
1212
1211
}                                                                     \
1213
1212
                                                                        \
1214
 
void PrinterVisitor::endVisit(const TypedValueCompareIterator<TypeConstants::XS_##xqt>& a){\
 
1213
void PrinterVisitor::endVisit(const TypedValueCompareIterator<store::XS_##xqt>& a){\
1215
1214
    thePrinter.startEndVisit();                                         \
1216
1215
    thePrinter.endEndVisit();                                           \
1217
1216
}