33#include <wx/filename.h> 
   43    { JOBSET_DESTINATION_T::FOLDER,
 
   45    { JOBSET_DESTINATION_T::ARCHIVE,
 
 
   52                                      { JOBSET_DESTINATION_T::FOLDER, 
"folder" },
 
   53                                      { JOBSET_DESTINATION_T::ARCHIVE, 
"archive" }
 
   58    j = nlohmann::json{ { 
"id", f.
m_id },
 
   61                        { 
"settings", nlohmann::json::object( {} ) }
 
 
   70    j.at( 
"type" ).get_to( f.
m_type );
 
   71    j.at( 
"id" ).get_to( f.
m_id );
 
   74    nlohmann::json settings_obj = j.at( 
"settings" );
 
   78    if( f.
m_job != 
nullptr )
 
 
   87    j = nlohmann::json{ { 
"id", destination.
m_id },
 
   88                        { 
"type", destination.
m_type },
 
   89                        { 
"only", destination.
m_only },
 
   91                        { 
"settings", nlohmann::json::object( {} ) }
 
 
  101    if( j.contains( 
"id" ) )
 
  102        j.at( 
"id" ).get_to( destination.
m_id );
 
  106    j.at( 
"type" ).get_to( destination.
m_type );
 
  107    destination.
m_only = j.value( 
"only", std::vector<wxString>() );
 
  110    const nlohmann::json& settings_obj = j.at( 
"settings" );
 
 
  141    if( 
m_type == JOBSET_DESTINATION_T::FOLDER )
 
  145    else if( 
m_type == JOBSET_DESTINATION_T::ARCHIVE )
 
 
  186    if( aDescription == 
m_job->GetDefaultDescription() )
 
 
  218    m_jobs.emplace_back( 
KIID().AsString(), aType, aJob );
 
 
  237                       return destination.
m_id == aDestination->
m_id;
 
 
  254    if( aJobIdx < 
m_jobs.size() - 1 )
 
 
  285        if( destination.m_id == aDestinationStr || destination.m_description == aDestinationStr )
 
 
  309    wxASSERT( aDestination != 
nullptr );
 
  311    if( aDestination->
m_only.size() == 0 )
 
  316    std::vector<JOBSET_JOB> 
result;
 
  317    for( wxString& onlyId : aDestination->
m_only )
 
  322                                    if( job.m_id == onlyId )
 
 
  336#if !defined( __MINGW32__ ) 
wxString m_fileNameWithoutPath
 
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
Calls Store() and then writes the contents of the JSON document to a file.
 
void SetDirty(bool aFlag=true)
 
void MoveJobUp(size_t aJobIdx)
 
std::vector< JOBSET_DESTINATION > m_destinations
 
std::vector< JOBSET_JOB > GetJobsForDestination(JOBSET_DESTINATION *aDestination)
 
std::vector< JOBSET_JOB > m_jobs
 
void RemoveJob(size_t aJobIdx)
 
void AddNewJob(wxString aType, JOB *aJob)
 
void MoveJobDown(size_t aJobIdx)
 
JOBSET_DESTINATION * AddNewDestination(JOBSET_DESTINATION_T aType)
 
wxString getFileExt() const override
 
JOBSET(const wxString &aFilename)
 
void RemoveDestination(JOBSET_DESTINATION *aDestination)
 
JOBSET_DESTINATION * FindDestination(wxString &aDestinationStr)
Attempts to find a destination based on the given string Both the uuid of the destination and descrip...
 
virtual void ToJson(nlohmann::json &j) const =0
 
virtual void FromJson(const nlohmann::json &j)=0
 
static T * CreateInstance(const wxString &aName)
 
An simple container class that lets us dispatch output jobs to kifaces.
 
virtual void FromJson(const nlohmann::json &j)
 
virtual void ToJson(nlohmann::json &j) const
 
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
 
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
 
virtual bool SaveToFile(const wxString &aDirectory="", bool aForce=false)
Calls Store() and then writes the contents of the JSON document to a file.
 
wxString AsString() const
 
static const std::string KiCadJobSetFileExtension
 
static wxString ZipFileWildcard()
 
Some functions to handle hotkeys in KiCad.
 
KICOMMON_API void to_json(nlohmann::json &j, const JOBSET_DESTINATION &destination)
 
KICOMMON_API void from_json(const nlohmann::json &j, JOBSET_JOB &f)
 
NLOHMANN_JSON_SERIALIZE_ENUM(JOBSET_DESTINATION_T, { { JOBSET_DESTINATION_T::FOLDER, "folder" }, { JOBSET_DESTINATION_T::ARCHIVE, "archive" } }) KICOMMON_API void to_json(nlohmann
 
const int jobsFileSchemaVersion
 
KICOMMON_API std::map< JOBSET_DESTINATION_T, JOBSET_DESTINATION_T_INFO > JobsetDestinationTypeInfos
 
enum KICOMMON_API JOBSET_DESTINATION_T
 
std::unordered_map< wxString, std::shared_ptr< JOBSET_OUTPUT_REPORTER > > m_lastRunReporters
 
void SetDescription(const wxString &aDescription)
 
std::shared_ptr< JOBS_OUTPUT_HANDLER > m_outputHandler
 
JOBSET_DESTINATION_T m_type
 
std::vector< wxString > m_only
Transient property, not stored for now.
 
wxString GetPathInfo() const
 
bool operator==(const JOBSET_DESTINATION &rhs) const
 
wxString GetDescription() const
 
std::optional< bool > m_lastRunSuccess
 
std::shared_ptr< JOB > m_job
 
bool operator==(const JOBSET_JOB &rhs) const
 
wxString GetDescription() const
 
void SetDescription(const wxString &aDescription)
 
wxString result
Test unit parsing edge cases and error handling.
 
Definition of file extensions used in Kicad.