Commit Graph
17 Commits
Author SHA1 Message Date
portersky 4e2e5f72a2 feat(cmat): Completed Ex61 Part 1 2026-10-08 10:08:48 +02:00
portersky 058179b643 feat(cmat): Completed Ex51 2026-10-07 15:13:55 +02:00
porterskyandQwen 3.8 27B a65e84e796 feat(cmat): pass hints to Ex42 observers
Extend the Ex42 observer pattern with Hint objects so each
observer receives the reason for the update instead of
querying the subject:

- Subject::notify() and Observer::update() now take a
  const Hint& argument.
- Add LightHint and WaitHint carrying the traffic light
  state and WAIT button state, defined in Pelican.h.
- Pole dispatches on hint type using dynamic_cast.
- The Pole constructor sets its initial lights directly
  from the Pelican's current state, since no notification
  is sent at startup. Stopgap until the initial update
  is handled properly.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-07 11:31:16 +02:00
porterskyandQwen 3.8 27B 11b96e4410 docs(materials): update S3 905 material
Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-06 16:26:54 +02:00
porterskyandQwen 3.8 27B 6e0e45110a feat(cmat): implement Ex41 observer pattern
Refactor the Pelican crossing exercise to use the Observer
pattern: Pelican acts as Subject and each Pole observes it,
replacing direct calls through the owned Pole pointer.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-06 16:26:53 +02:00
porterskyandClaude Opus 5.5 c681ebab2b feat(deps): add FindBoost module with components
Fetch the Boost CMake release archive (default 1.92.0) and build only
the libraries requested via find_package(Boost COMPONENTS ...), plus
their dependencies. Each component is exposed as Boost::<name>, e.g.
Boost::serialization. cmat now uses this module instead of a system
Boost install, so the Boost exercises are always available.

Also fix SolutionEx62Bonus: Employee.h used base_object without
including <boost/serialization/base_object.hpp>. This was not an
intentional exercise bug; it likely relied on a transitive include
in older Boost versions.

Co-authored-by: Claude Opus 5.5 <claude.opus5.5@anthropic.com>
2026-10-06 08:11:54 +02:00
portersky edc567331d fix: Add back remove warning as error 2026-10-05 18:36:25 +02:00
porterskyandQwen 3.8 27B 3764421cc0 docs(materials): update S3 905 material
Refresh 397_MA_S3_905_S2.pdf with the re-saved handout (63 pages).

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 14:35:19 +02:00
porterskyandQwen 3.8 27B 2fc7e2ebdb chore(cmat): drop legacy warning flags
Comment out the loop that copied BASE_OPTIONS (minus -Werror) into
CMAT_OPTIONS so exercise targets no longer inherit the project
warning flags.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 14:35:17 +02:00
porterskyandQwen 3.8 27B db0d7b9bee refactor(Ex22): apply template method to Timer
Rename the virtual tick() override in PelicanTimer to doExpired()
and give the base Timer class a non-virtual tick() that checks for
expiration and dispatches to doExpired(). The exercise starting
point now matches SolutionEx22.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 14:35:16 +02:00
porterskyandQwen 3.8 27B 73114f1bab chore(cmat): remove cleanall.bat
Drop the Visual Studio artifact cleanup script; CMake handles
builds now and the original copy remains in 397/.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 12:39:10 +02:00
porterskyandQwen 3.8 27B e5d5952bbb chore(cmat): remove legacy vcproj files
Drop the pre-2010 Visual Studio project files (.vcproj) left over
from the original course material. CMake builds everything now and
the original copies remain in 397/.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 12:38:43 +02:00
porterskyandQwen 3.8 27B ca7bcb2f44 chore(cmat): remove VS upgrade log
Drop UpgradeLog.htm from Ex11; it is generated by Visual Studio
when upgrading a project and has no place in the course material.
The original copy remains in 397/.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 12:38:27 +02:00
porterskyandQwen 3.8 27B 82131c78de chore(cmat): remove legacy makefiles and empty dirs
Drop the old GCC 3.4.2 makefile/make.mk pairs from Ex11, Ex11bug and
SolutionEx11bug; CMake builds everything now. Also remove the VS build
artifacts (pelican.obj.enc, unsuccessfulbuild markers) and prune the
now-empty Debug, Release, Backup and x64 directories. Original copies
remain in 397/.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 12:38:25 +02:00
porterskyandQwen 3.8 27B f43ff27e1d chore(cmat): remove Visual Studio solution files
Drop the .sln, .vcxproj, .vcxproj.filters, .vcxproj.user and .suo
files from cmat/. CMake is the build system for the course material,
and the original copies are preserved in 397/ as the source backup.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 12:01:49 +02:00
porterskyandQwen 3.8 27B d8abd821ee docs(cmat): add course material PDFs
Add the two course material PDFs under cmat/Materials/.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 11:56:34 +02:00
porterskyandQwen 3.8 27B e09540c2b2 feat(cmat): add cmake build for course material
Add a CMakeLists.txt to each exercise directory, included from
cmat/CMakeLists.txt, so every exercise and solution becomes a buildable
target. GUI exercises link the curses-based DOS_Unix implementations on
Unix-like systems; the Windows-specific DOS variants are not compiled.
Exercises without a portable path or with missing dependencies (Boost)
are reported as not available at configure time.

Targets are excluded from the default build and built by name, e.g.
`cmake --build build --target Ex11`, so intentionally buggy exercises
such as Ex21 do not break the default build.

Also fix two portability issues: rename Ex11bug/pole.h to Pole.h for
case-sensitive filesystems and drop the extra Light:: qualification in
SolutionEx71A/Light.h. Document build commands and layout in AGENTS.md.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-05 11:55:00 +02:00