Overview
Comment: | s_expressions-templates-generic_integers: add a Render procedure with client-provided default format |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0aeafdbf6256ab7c68d2fb7f6d60c35d |
User & Date: | nat on 2014-09-20 21:50:04 |
Other Links: | manifest | tags |
Context
2014-09-21
| ||
20:14 | s_expressions-templates-tests-integers: test the new Render procedure with client-provided default format check-in: 6f758d2e84 user: nat tags: trunk | |
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 | |
Changes
Modified src/natools-s_expressions-templates-generic_integers.adb from [d7b39cb7d8] to [5a59e200e3].
︙ | |||
373 374 375 376 377 378 379 380 381 382 383 384 385 386 | 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 | + + + + + + + + + + + + + | procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in T) is Parsed_Template : Format; begin Parse (Parsed_Template, Template); Output.Write (Render (Value, Parsed_Template)); end Render; procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Default_Format : in Format; Template : in out Lockable.Descriptor'Class; Value : in T) is Parsed_Template : Format := Default_Format; begin Parse (Parsed_Template, Template); Output.Write (Render (Value, Parsed_Template)); end Render; --------------------- |
︙ |
Modified src/natools-s_expressions-templates-generic_integers.ads from [424d915805] to [d783375add].
︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 71 72 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + + + + + + + | procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Template : in out Lockable.Descriptor'Class; Value : in T); -- Read a rendering format from Template and use it on Value procedure Render (Output : in out Ada.Streams.Root_Stream_Type'Class; Default_Format : in Format; Template : in out Lockable.Descriptor'Class; Value : in T); -- Read a rendering format from Template, using defaults -- from Default_Format, and use it on Value. --------------------- -- Auxiliary Types -- --------------------- type Alignment is (Left_Aligned, Centered, Right_Aligned); type Width is range 0 .. 10000; |
︙ |