1
0
forked from Alepha/Alepha

42 Commits

Author SHA1 Message Date
39e30217d7 Simpler Str << form. 2025-05-02 19:04:15 -04:00
abca951604 Add line-comment filter for streambuf. 2024-08-08 21:35:46 -04:00
0737afc002 Add line-comment filter for streambuf. 2024-08-08 17:12:33 -04:00
970cfa3b62 Unify everything to template_for form. 2024-07-05 12:23:26 -04:00
32e6c36570 Rename the template_for header.
C++26 (I hope) is supposed to have this syntax:

```
template for( const auto &element: aggregate )
{
	...;
}
```

Thus, I've adjusted this gadget to have a similar name, to enable
simple mechanical code changes.  From Alepha, you'd use it
thus:

```
template_for( aggregate ) <=[&]( const auto &element )
{
	...;
};
```
2024-07-05 11:59:26 -04:00
3844026429 Move streamable name to be more like the others. 2024-05-07 22:46:38 -04:00
f47b942e28 Remove some debugging code from the line-tracking streambuf. 2024-04-12 17:14:16 -04:00
1a6460e717 Stackable streambufs have a depth observer now. 2024-04-04 22:29:23 -04:00
541a945605 IWYU for OStreamable using delimited list. 2024-04-04 22:25:56 -04:00
379a2b4dc2 Start using the stream adaptor. 2024-04-04 18:07:41 -04:00
58327d5afd We should be using sentry in our generated istream operators. 2024-04-04 13:56:26 -04:00
38df35ebc4 IOStream filter stage.
This permits creation of custom filtration stages in the IOStream
streambuf stack.
2024-04-03 23:44:51 -04:00
cc1fdf725b Correct some of the underlying-forwarding parts of stream stacks. 2024-04-03 23:38:13 -04:00
83034c501f AutoRAII based stream adaptors. 2024-04-03 16:28:55 -04:00
8bd9852bd4 Fix forwarding the messages to the underlying functions.
If you take the address of the overriding function, it cannot be
converted to the base class.  So for all the "forward to underlying"
set I have to make a base class with no overrides which forwards.

Then the main stackable class can make any overrides it wants.  I
believe that this is still safe, since the base class knows the name
to be virtual.  So we're not taking the address of the impl function,
but instead taking the index of the virtual function.  If I'm
wrong... I'll need a whole different approach here.
2024-04-03 15:50:31 -04:00
d8689b85e8 Make the underlying streambuf private in stacks. 2024-04-03 15:01:52 -04:00
7410245314 Input stream stacking with line numbers!
This should help when building custom language parsers.  An input
stream can be augmented with this stackable streambuf to track
the current line number.  This can (and should) be done low in
the stack, so that any variable expansion and comment stripping
stages will not affect line number count.

The stage bolts on a stream state sidecar to point back to itself.
The observer for the current line peeks into the sidecar to see
the current line number tracking object for the stream and then
gets the current line number from that object.

The line number is the current line the input cursor is on.
Newline characters are treated as-if they're part of the current
line.  The newly created line will start on the first character
after the newline character.  This helps keep line-index counts
accurate too.  (Idea for a further stage?  Line index cursor
too?)
2024-04-03 08:29:10 -04:00
373b07e1c4 Apply the newer namespace rules and layout/formatting. 2024-04-02 23:32:02 -04:00
b9de163083 Exception state masking. 2023-12-02 04:18:58 -05:00
7a569f9b58 IWYU 2023-12-01 21:14:29 -05:00
4682fe3ffb Consolidate the StaticValue implementations. 2023-11-12 05:23:20 -05:00
5db7ad01f8 A large number of files have had their module namespace renamed 2023-11-12 05:03:26 -05:00
db70cb3b08 Relocate StackableStreambuf to IOStreams. 2023-11-10 13:30:08 -05:00
e3ceed0233 A unix file descriptor streambuf for writing. 2023-11-10 01:49:42 -05:00
d1157cabf7 Start the C++23 adoption. 2023-11-07 05:30:50 -05:00
bb51660272 Simplify the delimiters 2023-10-31 02:17:27 -04:00
4a74921cb8 I started a weird rewrite, but I'll likely abandon it.
But I'll keep this commit in my history, in case I want to try again.
2023-10-31 01:44:34 -04:00
c6bce63536 Forgot the rename in the cmake for the streamable capability 2023-10-29 06:01:45 -04:00
1963485b9a Start renaming capabilities to lowercase. 2023-10-29 06:00:29 -04:00
01cf7bc0a9 Unified streamable support capability. 2023-10-29 05:59:55 -04:00
540e30ec18 Auto-generated istream operators respect delimiters now. 2023-10-29 05:58:55 -04:00
c15e42034f Now it's possible to set delimiters on input streams. 2023-10-29 05:58:29 -04:00
1fc1c8daac Add ability to get the current delimiter in a stream. 2023-10-29 05:57:49 -04:00
a62335960e Rename string gen to IOStreams::String. 2023-10-25 20:54:39 -04:00
0fb0b578d3 Discard unit test library explicit links. 2023-10-25 04:46:54 -04:00
c2bc8dae2e Stream builder notation for strings.
This should be less boilerplate than repeated `lexical_cast`
or `stringify` calls when building strings.
2023-10-25 04:03:39 -04:00
bacaa9fcee Make stream state have a default-construction option.
Start integrating it for the field delimiters.
2023-10-25 03:55:42 -04:00
5e86b58987 Start to migrate delimiter code to common helper. 2023-10-25 03:40:57 -04:00
e1d3374e09 Delimiters helpers which work with ostream helpers. 2023-10-23 03:31:23 -04:00
3a92d2b788 OStream automatic generation for aggregates.
I still have to sort out the extended capabilities system and
implement the ostream_lens system.
2023-10-23 01:50:47 -04:00
23c71c8d27 Auto-generation of comparisons as a capability. 2023-10-22 05:15:43 -04:00
08971abb06 Add IStreamable helper. 2023-10-22 04:43:25 -04:00