Overview
Comment: | s_expressions-templates-generic_integers: add public mutators for Format objects |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
61b64dbec787cbffc11df087ce577762 |
User & Date: | nat on 2014-09-19 19:20:32 |
Other Links: | manifest | tags |
Context
2014-09-20
| ||
21:50 | s_expressions-templates-generic_integers: add a Render procedure with client-provided default format check-in: 0aeafdbf62 user: nat tags: trunk | |
2014-09-19
| ||
19:20 | s_expressions-templates-generic_integers: add public mutators for Format objects check-in: 61b64dbec7 user: nat tags: trunk | |
2014-09-18
| ||
20:08 | s_expressions-templates-tests: a simple tests for discrete-type templates check-in: 6f0dd49985 user: nat tags: trunk | |
Changes
Modified src/natools-s_expressions-templates-generic_integers.adb from [b65cf1ae02] to [d7b39cb7d8].
︙ | |||
57 58 59 60 61 62 63 | 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 | - + - + - + - + - + - + - - - + - - - - - - - - + - + - + - + - + + - - - + + + + + + - - + + - + - - + + - + - - + + | when Events.Add_Atom => case Commands.To_Align_Command (To_String (Arguments.Current_Atom)) is when Commands.Unknown_Align => null; when Commands.Set_Left => |
︙ | |||
382 383 384 385 386 387 388 389 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | is Parsed_Template : Format; begin Parse (Parsed_Template, Template); Output.Write (Render (Value, Parsed_Template)); end Render; --------------------- -- Format Mutators -- --------------------- procedure Set_Align (Object : in out Format; Value : in Alignment) is begin Object.Align := Value; end Set_Align; procedure Set_Left_Padding (Object : in out Format; Symbol : in Atom_Refs.Immutable_Reference) is begin Object.Left_Padding := Symbol; end Set_Left_Padding; procedure Set_Left_Padding (Object : in out Format; Symbol : in Atom) is begin Set_Left_Padding (Object, Create (Symbol)); end Set_Left_Padding; procedure Set_Maximum_Width (Object : in out Format; Value : in Width) is begin Object.Maximum_Width := Value; if Object.Minimum_Width > Object.Maximum_Width then Object.Minimum_Width := Value; end if; end Set_Maximum_Width; procedure Set_Minimum_Width (Object : in out Format; Value : in Width) is begin Object.Minimum_Width := Value; if Object.Minimum_Width > Object.Maximum_Width then Object.Maximum_Width := Value; end if; end Set_Minimum_Width; procedure Set_Negative_Sign (Object : in out Format; Sign : in Atom_Refs.Immutable_Reference) is begin Object.Negative_Sign := Sign; end Set_Negative_Sign; procedure Set_Negative_Sign (Object : in out Format; Sign : in Atom) is begin Set_Negative_Sign (Object, Create (Sign)); end Set_Negative_Sign; procedure Set_Overflow_Message (Object : in out Format; Message : in Atom_Refs.Immutable_Reference) is begin Object.Overflow_Message := Message; end Set_Overflow_Message; procedure Set_Overflow_Message (Object : in out Format; Message : in Atom) is begin Set_Overflow_Message (Object, Create (Message)); end Set_Overflow_Message; procedure Set_Positive_Sign (Object : in out Format; Sign : in Atom_Refs.Immutable_Reference) is begin Object.Positive_Sign := Sign; end Set_Positive_Sign; procedure Set_Positive_Sign (Object : in out Format; Sign : in Atom) is begin Set_Positive_Sign (Object, Create (Sign)); end Set_Positive_Sign; procedure Set_Right_Padding (Object : in out Format; Symbol : in Atom_Refs.Immutable_Reference) is begin Object.Right_Padding := Symbol; end Set_Right_Padding; procedure Set_Right_Padding (Object : in out Format; Symbol : in Atom) is begin Set_Right_Padding (Object, Create (Symbol)); end Set_Right_Padding; procedure Set_Symbols (Object : in out Format; Symbols : in Atom_Arrays.Immutable_Reference) is begin if not Symbols.Is_Empty and then Symbols.Query.Data.all'Length >= 2 then Object.Symbols := Symbols; end if; end Set_Symbols; procedure Set_Symbols (Object : in out Format; Expression : in out S_Expressions.Descriptor'Class) is begin Set_Symbols (Object, Create (Expression)); end Set_Symbols; end Natools.S_Expressions.Templates.Generic_Integers; |
Modified src/natools-s_expressions-templates-generic_integers.ads from [013201ba5d] to [424d915805].
︙ | |||
39 40 41 42 43 44 45 | 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 | + + + + - + - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - | with Natools.Storage_Pools; generic type T is range <>; package Natools.S_Expressions.Templates.Generic_Integers is pragma Preelaborate; -------------------------- -- High-Level Interface -- -------------------------- |