1
//////////////////////////////////////////////////////////////////////////////
2
//////////////////////////////////////////////////////////////////////////////
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : externaltoolsdata.cpp
7
// -------------------------------------------------------------------------
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
23
//////////////////////////////////////////////////////////////////////////////
24
//////////////////////////////////////////////////////////////////////////////
26
#include "externaltoolsdata.h"
35
void ToolInfo::DeSerialize(Archive& arch)
37
arch.Read(wxT("m_id"), m_id);
38
arch.Read(wxT("m_path"), m_path);
39
arch.Read(wxT("m_arguments"), m_arguments);
40
arch.Read(wxT("m_wd"), m_wd);
41
arch.Read(wxT("m_name"), m_name);
42
arch.Read(wxT("m_icon16"), m_icon16);
43
arch.Read(wxT("m_icon24"), m_icon24);
45
m_captureOutput = false;
46
arch.Read(wxT("m_captureOutput"), m_captureOutput);
48
m_saveAllFiles = false;
49
arch.Read(wxT("m_saveAllFiles"), m_saveAllFiles);
52
void ToolInfo::Serialize(Archive& arch)
54
arch.Write(wxT("m_id"), m_id);
55
arch.Write(wxT("m_path"), m_path);
56
arch.Write(wxT("m_arguments"), m_arguments);
57
arch.Write(wxT("m_wd"), m_wd);
58
arch.Write(wxT("m_name"), m_name);
59
arch.Write(wxT("m_icon16"), m_icon16);
60
arch.Write(wxT("m_icon24"), m_icon24);
61
arch.Write(wxT("m_captureOutput"), m_captureOutput);
62
arch.Write(wxT("m_saveAllFiles"), m_saveAllFiles);
65
//----------------------------------------------------------------
67
//----------------------------------------------------------------
68
ExternalToolsData::ExternalToolsData()
72
ExternalToolsData::~ExternalToolsData()
76
const std::vector<ToolInfo>& ExternalToolsData::GetTools() const
81
void ExternalToolsData::SetTools(const std::vector<ToolInfo>& tools)
86
void ExternalToolsData::DeSerialize(Archive& arch)
88
// first we serialize the list of IDs
90
arch.Read(wxT("toolsCount"), count);
92
// now loop over the toolsinfo and serialize them
94
for (size_t i=0; i<count; i++) {
96
arch.Read(wxString::Format(wxT("Tool_%d"), i), &info);
97
m_tools.push_back(info);
101
void ExternalToolsData::Serialize(Archive& arch)
103
size_t count = m_tools.size();
104
arch.Write(wxT("toolsCount"), count);
106
// now loop over the toolsinfo and serialize them
107
for (size_t i=0; i<m_tools.size(); i++) {
108
arch.Write(wxString::Format(wxT("Tool_%d"), i), &m_tools.at(i));
1
//////////////////////////////////////////////////////////////////////////////
2
//////////////////////////////////////////////////////////////////////////////
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : externaltoolsdata.cpp
7
// -------------------------------------------------------------------------
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
23
//////////////////////////////////////////////////////////////////////////////
24
//////////////////////////////////////////////////////////////////////////////
26
#include "externaltoolsdata.h"
35
void ToolInfo::DeSerialize(Archive& arch)
37
arch.Read(wxT("m_id"), m_id);
38
arch.Read(wxT("m_path"), m_path);
39
arch.Read(wxT("m_arguments"), m_arguments);
40
arch.Read(wxT("m_wd"), m_wd);
41
arch.Read(wxT("m_name"), m_name);
42
arch.Read(wxT("m_icon16"), m_icon16);
43
arch.Read(wxT("m_icon24"), m_icon24);
45
m_captureOutput = false;
46
arch.Read(wxT("m_captureOutput"), m_captureOutput);
48
m_saveAllFiles = false;
49
arch.Read(wxT("m_saveAllFiles"), m_saveAllFiles);
52
void ToolInfo::Serialize(Archive& arch)
54
arch.Write(wxT("m_id"), m_id);
55
arch.Write(wxT("m_path"), m_path);
56
arch.Write(wxT("m_arguments"), m_arguments);
57
arch.Write(wxT("m_wd"), m_wd);
58
arch.Write(wxT("m_name"), m_name);
59
arch.Write(wxT("m_icon16"), m_icon16);
60
arch.Write(wxT("m_icon24"), m_icon24);
61
arch.Write(wxT("m_captureOutput"), m_captureOutput);
62
arch.Write(wxT("m_saveAllFiles"), m_saveAllFiles);
65
//----------------------------------------------------------------
67
//----------------------------------------------------------------
68
ExternalToolsData::ExternalToolsData()
72
ExternalToolsData::~ExternalToolsData()
76
const std::vector<ToolInfo>& ExternalToolsData::GetTools() const
81
void ExternalToolsData::SetTools(const std::vector<ToolInfo>& tools)
86
void ExternalToolsData::DeSerialize(Archive& arch)
88
// first we serialize the list of IDs
90
arch.Read(wxT("toolsCount"), count);
92
// now loop over the toolsinfo and serialize them
94
for (size_t i=0; i<count; i++) {
96
arch.Read(wxString::Format(wxT("Tool_%lu"), i), &info);
97
m_tools.push_back(info);
101
void ExternalToolsData::Serialize(Archive& arch)
103
size_t count = m_tools.size();
104
arch.Write(wxT("toolsCount"), count);
106
// now loop over the toolsinfo and serialize them
107
for (size_t i=0; i<m_tools.size(); i++) {
108
arch.Write(wxString::Format(wxT("Tool_%lu"), i), &m_tools.at(i));