Home > The Program Execution Monitor > Implementation
PrevNext

The Program Execution Monitor implementation

To monitor execution of user supplied function cpp_main() the Program Execution Monitor relies on the Boost.Test's Execution Monitor. Also the Program Execution Monitor supplies the function main() to facilitate uniform error reporting. Following files constitute the Program Execution Monitor implementation:
為了監控用戶提供的 cpp_main() 函數的執行,Program Execution Monitor 依賴於 Boost.Test 的 Execution Monitor。 同樣,Program Execution Monitor 提供 main() 函數來簡化統一錯誤報告。 下面的文件組成了 Program Execution Monitor 的實現:

libs/test/execution_monitor.cpp

provides Execution Monitor implementation for all supported configurations.
提供 Execution Monitor 支持所有設置的實現。

libs/test/cpp_main.cpp

supplies function main() for static library build
為靜態庫生成提供 main() 函數

boost/test/included/prg_exec_monitor.hpp

combines all implementation files into single header to be use as inlined version of component
將所有實現文件組合成為一個單一的頭文件,用於組件的內聯化版本

boost/test/prg_exec_monitor.hpp

contains definitions for main() function for dynamic library build and pragmas for auto-linking feature support.
包含為動態庫生成定義的 main() 和用於自動鏈接 (auto-link) 特性的 pragma。

The Program Execution Monitor implementation wraps several system headers and is intended to be used as standalone library. While there exist an alternative variant to include the whole implementation directly into your program, for the long term usage the preferable solution is to build library once and reuse it.
Program Execution Monitor 的實現覆蓋了一些系統頭文件,並且傾向於作為單獨的庫使用。 作為替代可以將所有實現直接包含 (include the whole implementation directly) 進你的程序, 但如果長期使用,更好的解決方案是生成庫一次 (build library once) 並重用。


PrevUpHomeNext