LAPTOP-SNT8I5JK\Boounion
2025-08-21 549decf91ef988814913cddc86f5c4e006b277e7
SourceCode/Bond/Servo/ProcessJob.h
@@ -85,6 +85,7 @@
    class CProcessJob {
    public:
        // —— 构造 / 基本设置 ——
        CProcessJob();
        explicit CProcessJob(std::string pjId);
        const std::string& id() const noexcept { return m_pjId; }
@@ -118,7 +119,7 @@
        };
        // 返回问题清单(空=通过)
        bool validate(const IResourceView& rv);
        const std::vector<ValidationIssue>& issue();
        const std::vector<ValidationIssue>& issues();
        // —— 状态机(带守卫)——
        bool queue();           // NoState -> Queued
@@ -157,6 +158,15 @@
        bool usesCarrierSlots() const noexcept { return !m_carriers.empty(); }
    public:
        // ====== 版本头常量(建议保留,便于兼容)======
        static constexpr uint32_t PJ_FILE_MAGIC = 0x504A4A31; // "PJJ1"
        static constexpr uint16_t PJ_FILE_VERSION = 0x0001;
        // ====== 流式序列化接口 ======
        void serialize(std::ostream& os) const;
        static bool deserialize(std::istream& is, CProcessJob& out, std::string* err = nullptr);
    private:
        // 内部状态转移帮助
        void markQueued();