Overview
Comment: | s_expressions-templates-generic_integers: change prefix and suffix syntax to make shared values clearer |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0c604fe54e4e2ffad24da3194bdb8218 |
User & Date: | nat on 2014-09-27 16:30:56 |
Other Links: | manifest | tags |
Context
2014-09-28
| ||
14:25 | s_expressions-templates-tests-integers: test the new prefix and suffix features check-in: 3f152ff81d user: nat tags: trunk | |
2014-09-27
| ||
16:30 | s_expressions-templates-generic_integers: change prefix and suffix syntax to make shared values clearer check-in: 0c604fe54e user: nat tags: trunk | |
2014-09-26
| ||
21:13 | s_expressions-templates-generic_integers: add prefixes and suffixes to rendered numbers check-in: b0204e546f user: nat tags: trunk | |
Changes
Modified src/natools-s_expressions-templates-generic_integers.adb from [449cf22008] to [2c6754c683].
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + + + | procedure Insert_Image (State : in out Format; Context : in Meaningless_Type; Image : in Atom); procedure Update_Image (State : in out Format; Context : in Meaningless_Type; Name : in Atom; Arguments : in out Lockable.Descriptor'Class); procedure Update_Format (State : in out Format; Context : in Meaningless_Type; Name : in Atom; Arguments : in out Lockable.Descriptor'Class); |
︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Image : in Atom) is pragma Unreferenced (Context); begin State.Append_Image (Image); end Insert_Image; procedure Update_Image (State : in out Format; Context : in Meaningless_Type; Name : in Atom; Arguments : in out Lockable.Descriptor'Class) is pragma Unreferenced (Context); Value : T; begin begin Value := T'Value (To_String (Name)); exception when Constraint_Error => return; end; case Arguments.Current_Event is when Events.Add_Atom => State.Set_Image (Value, Arguments.Current_Atom); when others => State.Remove_Image (Value); end case; end Update_Image; procedure Image_Interpreter is new Interpreter_Loop (Format, Meaningless_Type, Update_Image, Insert_Image); procedure Update_Format (State : in out Format; Context : in Meaningless_Type; Name : in Atom; Arguments : in out Lockable.Descriptor'Class) is |
︙ | |||
96 97 98 99 100 101 102 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - + | when Commands.Align_Right => State.Set_Align (Right_Aligned); when Commands.Base => State.Set_Symbols (Arguments); when Commands.Images => |
︙ | |||
368 369 370 371 372 373 374 | 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 | + + - + + - - - - - - - + + + + - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + - - - + - - - + - - - - - + - - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + + - + + + + + + - - - - - - + + + + + + + + + + + + | procedure Include (Map : in out Atom_Maps.Map; Values : in Interval; Image : in Atom_Refs.Immutable_Reference) is begin Exclude (Map, Values); if not Image.Is_Empty then |
︙ | |||
828 829 830 831 832 833 834 | 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | - - - - + - | procedure Set_Prefix (Object : in out Format; Values : in Interval; Prefix : in Atom_Refs.Immutable_Reference) is begin |
︙ | |||
884 885 886 887 888 889 890 | 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 | - - - - + - | procedure Set_Suffix (Object : in out Format; Values : in Interval; Suffix : in Atom_Refs.Immutable_Reference) is begin |
︙ |
Modified src/natools-s_expressions-templates-generic_integers.ads from [82529a82fc] to [224fa4320b].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + - + | -- (base "symbol 0" "symbol 1" "symbol 2" ...) -- -- (left-padding "symbol") -- -- (image (0 "symbol 0") (2 "symbol 2") ...) -- -- (max-width "max width" ["overflow text"]) -- -- (min-width "min width") -- -- (padding "left-symbol" "right-symbol") -- -- (padding "symbol") -- |
︙ | |||
133 134 135 136 137 138 139 | 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 | - + + - + - - + + - + | Values : in Interval); -- Remove the given interval from the map procedure Include (Map : in out Atom_Maps.Map; Values : in Interval; Image : in Atom_Refs.Immutable_Reference); |
︙ |