חזור לתיקייה: actions

SearchAction

חיפוש בתיקיה
Ctrl K
לחץ כאן או הקש Ctrl K כדי לחפש בכל התיקיה

    SearchAction

    02340124

    מבוא לתכנות מערכות

    רשימות הרצאה לקריאה בשבת

    SearchAction

    הופק מתוך תקיית התואר של שקד

    uni-folder.vercel.app

    searchaction.h

    הערה (קובץ קוד)

    קובץ זה הוא קובץ קוד מסוג C.

    #pragma once
    
    #include <string>
    #include <vector>
    
    #include "Action.h"
    
    /**
     * @class SearchAction
     * A subtype of Action, it allows the user to search throw the files and folders to find a specific
     * string of text.
     */
    class SearchAction : public Action
    {
    public:
        virtual ~SearchAction() = default;
    
        /**
         * Creates the action with the necessary ingredients to search in the system.
         * @param results the results of the recursive search to be shown to the user.
         */
        SearchAction(const std::vector<std::string>& results);
    
        /**
         * @brief Executes the action
         */
        virtual void execute() const override;
    
    private:
        const std::vector<std::string> results;
    };