Production adapter whose queue owns all task state. 更多...
#include <RTSTypes.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ProductionComponent () | |
| Production component. | |
| ~ProductionComponent () | |
| Production component. | |
| ProductionComponent (const ProductionComponent &other) | |
| Production component. | |
| ProductionComponent & | operator= (const ProductionComponent &other) |
| Operator =. | |
| ProductionComponent (ProductionComponent &&other) noexcept | |
| Production component. | |
| ProductionComponent & | operator= (ProductionComponent &&other) noexcept |
| Operator =. | |
| Result< std::string > | enqueue (std::string_view owner, std::string_view kind, std::string_view product, Duration duration, int priority=0) |
| Enqueue a production task with an injected simulation duration. | |
| Result< std::string > | enqueue (production::ProductionRequest request) |
| Enqueue a fully validated canonical request, including a pinned definition handle. | |
| Result< void > | advance (const SimulationStep &step) |
| Advance the queue using a caller-owned deterministic step. | |
| std::size_t | taskCount () const noexcept |
| Return the number of retained tasks. | |
| OptionalRef< const production::ProductionTask > | taskAt (int index) |
| Borrow a retained canonical task by enqueue index. | |
| OptionalRef< const production::ProductionTask > | find (std::string_view taskId) |
| Borrow a retained canonical task by stable task id. | |
| Result< void > | pause (std::string_view taskId) |
| Pause a queued or running task through the canonical queue. | |
| Result< void > | resume (std::string_view taskId) |
| Resume a paused task through the canonical queue. | |
| Result< void > | cancel (std::string_view taskId, std::string_view reason="cancelled") |
| Cancel a non-terminal task through the canonical queue. | |
| std::vector< production::ProductionTask > | readyToSettle (std::string_view kind) const |
| Copy work-complete tasks of one kind that await domain settlement. | |
| Result< void > | settle (std::string_view taskId, production::ProductionSettlementReceipt receipt) |
| Commit one domain settlement with an idempotency receipt. | |
| Result< std::string > | snapshot () const |
| Serialize the canonical production queue for persistence/replay. | |
| Result< void > | restore (std::string_view json) |
| Transactionally restore the canonical production queue. | |
友元 | |
| class | RTSProductionActionAdapter |
详细描述
Production adapter whose queue owns all task state.
在文件 RTSTypes.h 第 438 行定义.
构造及析构函数说明
◆ ProductionComponent() [1/3]
| eve::rts::ProductionComponent::ProductionComponent | ( | ) |
Production component.
在文件 RTSTypes.cpp 第 540 行定义.
◆ ~ProductionComponent()
|
default |
Production component.
◆ ProductionComponent() [2/3]
| eve::rts::ProductionComponent::ProductionComponent | ( | const ProductionComponent & | other | ) |
Production component.
在文件 RTSTypes.cpp 第 542 行定义.
◆ ProductionComponent() [3/3]
|
defaultnoexcept |
Production component.
成员函数说明
◆ advance()
| Result< void > eve::rts::ProductionComponent::advance | ( | const SimulationStep & | step | ) |
◆ cancel()
| Result< void > eve::rts::ProductionComponent::cancel | ( | std::string_view | taskId, |
| std::string_view | reason = "cancelled" |
||
| ) |
Cancel a non-terminal task through the canonical queue.
在文件 RTSTypes.cpp 第 598 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 taskId.
◆ enqueue() [1/2]
| Result< std::string > eve::rts::ProductionComponent::enqueue | ( | production::ProductionRequest | request | ) |
Enqueue a fully validated canonical request, including a pinned definition handle.
在文件 RTSTypes.cpp 第 562 行定义.
引用了 request.
◆ enqueue() [2/2]
| Result< std::string > eve::rts::ProductionComponent::enqueue | ( | std::string_view | owner, |
| std::string_view | kind, | ||
| std::string_view | product, | ||
| Duration | duration, | ||
| int | priority = 0 |
||
| ) |
Enqueue a production task with an injected simulation duration.
在文件 RTSTypes.cpp 第 552 行定义.
引用了 duration, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, kind , 以及 priority.
◆ find()
| OptionalRef< const production::ProductionTask > eve::rts::ProductionComponent::find | ( | std::string_view | taskId | ) |
◆ operator=() [1/2]
| ProductionComponent & eve::rts::ProductionComponent::operator= | ( | const ProductionComponent & | other | ) |
Operator =.
在文件 RTSTypes.cpp 第 544 行定义.
◆ operator=() [2/2]
|
defaultnoexcept |
Operator =.
◆ pause()
| Result< void > eve::rts::ProductionComponent::pause | ( | std::string_view | taskId | ) |
Pause a queued or running task through the canonical queue.
在文件 RTSTypes.cpp 第 584 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 taskId.
◆ readyToSettle()
| std::vector< production::ProductionTask > eve::rts::ProductionComponent::readyToSettle | ( | std::string_view | kind | ) | const |
Copy work-complete tasks of one kind that await domain settlement.
在文件 RTSTypes.cpp 第 605 行定义.
引用了 index, kind , 以及 eve::production::ReadyToSettle.
◆ restore()
| Result< void > eve::rts::ProductionComponent::restore | ( | std::string_view | json | ) |
Transactionally restore the canonical production queue.
在文件 RTSTypes.cpp 第 630 行定义.
引用了 eve::Applied, eve::production::WorkQueue::restore(), eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::rts::RTS::restoreState().
◆ resume()
| Result< void > eve::rts::ProductionComponent::resume | ( | std::string_view | taskId | ) |
Resume a paused task through the canonical queue.
在文件 RTSTypes.cpp 第 591 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 taskId.
◆ settle()
| Result< void > eve::rts::ProductionComponent::settle | ( | std::string_view | taskId, |
| production::ProductionSettlementReceipt | receipt | ||
| ) |
Commit one domain settlement with an idempotency receipt.
在文件 RTSTypes.cpp 第 616 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 taskId.
◆ snapshot()
| Result< std::string > eve::rts::ProductionComponent::snapshot | ( | ) | const |
Serialize the canonical production queue for persistence/replay.
在文件 RTSTypes.cpp 第 623 行定义.
引用了 eve::Diagnostic::error(), eve::Failed , 以及 eve::Result< T >::failure().
被这些函数引用 eve::rts::ProductionComponent::Impl::Impl() , 以及 eve::rts::ProductionComponent::Impl::operator=().
◆ taskAt()
| OptionalRef< const production::ProductionTask > eve::rts::ProductionComponent::taskAt | ( | int | index | ) |
◆ taskCount()
|
noexcept |
友元及相关函数文档
◆ RTSProductionActionAdapter
|
friend |
在文件 RTSTypes.h 第 482 行定义.
该类的文档由以下文件生成:
- src/modules/rts/RTSTypes.h
- src/modules/rts/RTSTypes.cpp