KiCad PCB EDA Suite
Loading...
Searching...
No Matches
job_unknown.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <jobs/job_unknown.h>
21
22JOB_UNKNOWN::JOB_UNKNOWN( const std::string& aType, const nlohmann::json& aSettings ) :
23 JOB( aType, false ),
24 m_settings( aSettings )
25{
26}
27
28
29void JOB_UNKNOWN::FromJson( const nlohmann::json& j )
30{
31 m_settings = j;
32}
33
34
35void JOB_UNKNOWN::ToJson( nlohmann::json& j ) const
36{
37 j = m_settings;
38}
39
40
42{
43 return wxString::Format( wxT( "Unsupported job type '%s'" ), GetType() );
44}
void ToJson(nlohmann::json &j) const override
JOB_UNKNOWN(const std::string &aType, const nlohmann::json &aSettings)
wxString GetDefaultDescription() const override
nlohmann::json m_settings
Definition job_unknown.h:40
void FromJson(const nlohmann::json &j) override
JOB(const std::string &aType, bool aOutputIsDirectory)
Definition job.cpp:26
const std::string & GetType() const
Definition job.h:195