Skip to content

C++ IOStreams support: inserters and manipulators - #12

Merged
synesissoftware merged 19 commits into
masterfrom
c++-iostreams
Nov 5, 2026
Merged

synesissoftware merged 19 commits into
masterfrom
c++-iostreams

Conversation

@synesissoftware

Copy link
Copy Markdown
Owner

No description provided.

Map the standard iostreams onto the C streams woad already understands:
cout and wcout to stdout, and cerr, clog, and their wide counterparts to
stderr.  woad_seq_for() then calls woad_seq_for_stream(), so policy,
terminal attachment, and Windows virtual-terminal gating stay in the C API.
An unrecognised buffer is passed as NULL.

Enable C++ in the CMake project and add example.c++.colour_for. Bump the
library version to 0.2.0 with RELSTATUS 0x41, and update the version unit
test to match.
Add stream manipulators and message inserters for the standard SGR
sequences. Each writes its sequence only when woad_seq_for_stream() says
the destination warrants colour, and a chain of inserters shares one
conditional trailing reset.

example.c++.colour_for now shows macros, manipulators, and inserters. The C
colour_for example uses the same magenta-on-bright_black stderr line.
* chore(examples, test): removed unnecessary copyright information

* feat(woad): release 0.1.2 with C++ framing and richer version example
* chore(examples, test): removed unnecessary copyright information

* feat(woad): release 0.1.2 with C++ framing and richer version example

* feature(examples): added C++ examples

* feature(API): C++ namespace methods
Promote the unreleased 0.1.2 to 0.2.0 following the merged C++ work.

- woad.h: set WOAD_VER_MINOR to 2 and WOAD_VER_PATCH to 0; bump the header
  revision macros (patch 6, edit 13);
- test/unit/version: expect 0.2.0;
- Doxyfile, INSTALL.md: refer to 0.2.0;
- CHANGES.md: retitle 0.1.2 as 0.2.0 and record the woad:: C++ API, removal
  of the extern "C" blocks, the C++ examples, and the CXX language
  enablement;
- NEWS.md: retitle the 0.1.2 row as 0.2.0;
Add Doxygen markup for every function in woad/iostreams.hpp, group the
IOStreams API into manipulator and inserter modules, and describe the C++
and IOStreams support in the README.

- iostreams.hpp: document the stream-mapping helpers, apply_sequence(),
  the woad_seq_for() overload, woad_inserter_t, and all manipulators and
  inserters; add group__woad__iostreams with sub-groups
  group__woad__iostreams__manipulators and
  group__woad__iostreams__inserters;
- Doxyfile: stop excluding iostreams.hpp; expand the two WOAD_DEFINE_*
  macros to one prototype each so that the comment before each invocation
  documents that function;
- doc/mainpage.md: list the three IOStreams modules;
- README.md: add C++ API and IOStreams interface sections, and update the
  introduction, table of contents, and examples table;
- examples/iostreams/colour_for: rename the target to
  example.iostreams.colour_for;
- CHANGES.md: record the above under 0.3.0;
@synesissoftware
synesissoftware merged commit 3f79e11 into master Nov 5, 2026
18 checks passed
@synesissoftware
synesissoftware deleted the c++-iostreams branch November 5, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants