/* KMBuilderSourcePatch.h
 *
 * Copyright (C) 2023 OpenKylin, Inc
 */

#ifndef __BUILD_SOURCE_PATCH_H__
#define __BUILD_SOURCE_PATCH_H__

#include "KMBuilderSource.h"

class KMBuilderSourcePatch : public KMBuilderSource
{
    DECLARE_DYNCREATE(KMBuilderSourcePatch);

public:
    KMBuilderSourcePatch();
    ~KMBuilderSourcePatch();

    bool ensureSource() { return false; }
    bool apply();
    virtual std::pair<std::string, bool> processNode(std::string path);

    /**
     * @brief : 需要子类实现自身的反序列化
     * @param : [in]，sourceNode，清单中的源节点
     */ 
    virtual void deserializeEx(YAML::Node& sourceNode);

private:
    class Private;
    std::shared_ptr<Private> m_ptr;
};

#endif
