Files
pip/doc/pages/using_advanced.md
2026-03-12 14:46:57 +03:00

65 lines
5.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
\~english \page using_advanced Further topics
\~russian \page using_advanced Дополнительные темы
\~english
After \ref using_basic you may want to explore:
* \ref summary — full list of PIP modules and classes (containers, I/O, threading, math, state machine, etc.).
* \ref config — reading and writing configuration with \a PIConfig (files, dotted paths, INI-style sections).
* \ref code_model — code generation: metadata, serialization operators, PIMETA, \c pip_cmg and CMake integration.
* \ref iostream — binary streams (\a PIBinaryStream, \a PIByteArray), operators and \a PIMemoryBlock.
* \ref chunk_stream — versioned serialization with \a PIChunkStream (chunks by id, backward compatibility).
* \ref state_machine — state machine concepts, states, transitions, conditions, \a PIStateMachine.
* \ref connection — complex I/O: \a PIConnection, device pool, filters, senders, diagnostics.
* \ref client_server — TCP server and client (\a PIClientServer::Server, \a PIClientServer::Client).
* \ref console — tiling console \a PIScreen, tiles, widgets (list, button, progress, input, etc.).
* \ref application — application-level: \a PICLI, \a PILog, \a PISystemMonitor, \a PISingleApplication, \a PITranslator.
* \ref threading — multithreading: \a PIThread, \a PITimer, synchronization, executor, blocking queue.
* \ref examples — index of sample code in doc/examples.
Events and handlers are documented on the \a PIObject reference page (\ref PIObject_sec0).
\par Threading and events
Many PIP classes inherit \a PIObject and use events: handlers can be invoked directly or queued. When events are queued (e.g. from another thread), they are dispatched in the object's thread; call \a callQueuedEvents() or \a maybeCallQueuedEvents() to drain the queue. \a PIThread can act as the performer for such objects. See \ref PIObject_sec0 and \a PIThread.
\par Introspection
With \c PIP_INTROSPECTION defined at build time, the introspection module provides macros and APIs to traverse objects and containers at runtime (e.g. for debugging or serialization). Build PIP with this option and link the introspection library; see the introspection headers in \a piintrospection_base.h and related files.
\par GPU / OpenCL
The OpenCL module wraps OpenCL for buffers and programs. See \a piopencl.h for the public API. Behavior and limitations may depend on the implementation; check the header and backend when integrating.
\~russian
После \ref using_basic имеет смысл перейти к:
* \ref summary — полный перечень модулей и классов PIP (контейнеры, ввод-вывод, потоки, математика, машина состояний и др.).
* \ref config — чтение и запись конфигурации с помощью \a PIConfig (файлы, точечные пути, секции в стиле INI).
* \ref code_model — кодогенерация: метаинформация, операторы сериализации, PIMETA, утилита \c pip_cmg и интеграция с CMake.
* \ref iostream — бинарные потоки (\a PIBinaryStream, \a PIByteArray), операторы и \a PIMemoryBlock.
* \ref chunk_stream — версионная сериализация с \a PIChunkStream (чанки по id, обратная совместимость).
* \ref state_machine — машина состояний: концепции, состояния, переходы, условия, \a PIStateMachine.
* \ref connection — сложный ввод-вывод: \a PIConnection, пул устройств, фильтры, отправители, диагностика.
* \ref client_server — TCP-сервер и клиент (\a PIClientServer::Server, \a PIClientServer::Client).
* \ref console — тайлинговая консоль \a PIScreen, тайлы, виджеты (список, кнопка, прогресс, ввод и др.).
* \ref application — уровень приложения: \a PICLI, \a PILog, \a PISystemMonitor, \a PISingleApplication, \a PITranslator.
* \ref threading — многопоточность: \a PIThread, \a PITimer, синхронизация, исполнитель, блокирующая очередь.
* \ref examples — перечень примеров в doc/examples.
События и обработчики описаны на странице \a PIObject (\ref PIObject_sec0).
\par Потоки и события
Многие классы PIP наследуют \a PIObject и используют события: обработчики могут вызываться сразу или ставиться в очередь. При постановке в очередь (например из другого потока) они обрабатываются в потоке объекта; вызов \a callQueuedEvents() или \a maybeCallQueuedEvents() обрабатывает очередь. \a PIThread может выступать исполнителем для таких объектов. См. \ref PIObject_sec0 и \a PIThread.
\par Интроспекция
При сборке с макросом \c PIP_INTROSPECTION модуль интроспекции предоставляет макросы и API для обхода объектов и контейнеров в runtime (например для отладки или сериализации). Соберите PIP с этой опцией и подключите библиотеку интроспекции; см. заголовки \a piintrospection_base.h и связанные.
\par GPU / OpenCL
Модуль OpenCL — обёртка над OpenCL для буферов и программ. Публичный API: \a piopencl.h. Поведение и ограничения зависят от реализации; при интеграции смотрите заголовок и бэкенд.