Verbatim port of Fastway-Server's TFWEventBus from fw_plugin_host.pas
per feedback_copy_dont_reinterpret.md. Adjustments limited to:
- Type renames (TFW* -> T*).
- uses clause: drop fw_log; add log.types from fpc-log so the
optional Logger property uses the canonical ecosystem-wide
TLogProc shape, matching every other fpc-* library.
- Per-handler exception logging now calls Logger with
Level=llError, Category='events', and includes the source
plugin (ASourcePlugin parameter) in the message text so the
canonical signature stays meaningful.
Behaviours preserved verbatim: APluginName bulk-Unsubscribe key,
wildcard '*' subscriber, OnBroadcast external-listener tap,
snapshot-iterate-outside-lock pattern, per-handler exception
isolation, TCriticalSection.
docs/DEVELOPER_GUIDE.md added covering threading, payload
ownership, recursive Fire, OnBroadcast, logger plumbing, and
the relationship between fpc-events (ecosystem-wide pub/sub)
and per-library typed observer callbacks (bp.events / cm.events
pattern).
Tests: 44 assertions across 14 scenarios pass on x86_64-linux.
Pre-tag -vh audit on src/ev.bus.pas reports zero hints/warnings.
53 lines
1.0 KiB
INI
53 lines
1.0 KiB
INI
# fpc-events fpc.cfg — multi-target FPC build configuration.
|
|
#
|
|
# Pulls compiler-bundled RTL paths from /opt/fpcup, then adds the library
|
|
# source root + sibling fpc-* libraries so callers can build with
|
|
# `-Fucfg=fpc.cfg`.
|
|
|
|
#IFNDEF FPC_CROSSCOMPILING
|
|
#IFDEF LINUX
|
|
#INCLUDE /opt/fpcup/fpc/bin/x86_64-linux/fpc.cfg
|
|
#ENDIF LINUX
|
|
#IFDEF OS2
|
|
#INCLUDE P:\fpc\bin\os2\fpc.cfg
|
|
#ENDIF OS2
|
|
#IFDEF DOS
|
|
-Fuc:\pp/units/i386-$FPCTARGET/
|
|
-Fuc:\pp/units/i386-$FPCTARGET/*
|
|
-Fuc:\pp/units/i386-$FPCTARGET/rtl
|
|
#ENDIF DOS
|
|
#ELSE
|
|
-Fu/opt/fpcup/fpc/units/$FPCTARGET/rtl
|
|
-Fu/opt/fpcup/fpc/units/$FPCTARGET/*
|
|
#ENDIF
|
|
|
|
# Allow GOTO/LABEL, inline, C-operators
|
|
-Sgic
|
|
|
|
# Library source roots
|
|
-Fusrc
|
|
|
|
# Sibling fpc-* libraries we depend on
|
|
-Fu../fpc-log/src
|
|
|
|
# Output trees
|
|
-FEbuild
|
|
-FUbuild
|
|
|
|
# Cross-compile binutils prefixes
|
|
#IFDEF FPC_CROSSCOMPILING
|
|
#IFDEF CPUI386
|
|
#IFDEF OS2
|
|
-FD/opt/fpcup/cross/i386-pc-os2-emx
|
|
-XPi386-emx-
|
|
-k-e
|
|
-k0x10000
|
|
#ELSE
|
|
-FD/opt/fpcup/cross/bin
|
|
-XP$FPCTARGET-
|
|
#ENDIF OS2
|
|
#ENDIF CPUI386
|
|
#ENDIF FPC_CROSSCOMPILING
|
|
|
|
-Xs
|