Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Stigsen
committed
Jul 30, 2010
1 parent
1ef5859
commit 35f2b0f
Showing
13 changed files
with
215 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "Macro.h" | ||
#include "plistHandler.h" | ||
|
||
void eMacroCmd::SaveTo(PListArray& arr) const { | ||
PListDict dict = arr.InsertNewDict(arr.GetSize()); | ||
|
||
dict.wxSetString("command", m_cmd); | ||
|
||
if (m_argNames.empty()) return; | ||
PListArray args = dict.NewArray("arguments"); | ||
for (size_t i = 0; i < m_argNames.size(); ++i) { | ||
const wxString& name = m_argNames[i]; | ||
const wxVariant& arg = m_args[i]; | ||
PListArray a = args.InsertNewArray(args.GetSize()); | ||
|
||
a.AddString(name); | ||
if (arg.GetType() == wxT("bool")) a.AddBool(arg.GetBool()); | ||
else if (arg.GetType() == wxT("long")) a.AddInt(arg.GetLong()); | ||
else if (arg.GetType() == wxT("string")) a.AddString(arg.GetString()); | ||
else wxASSERT(false); | ||
} | ||
} | ||
|
||
void eMacro::SaveTo(PListDict& dict) const { | ||
PListArray cmdArray = dict.NewArray("e_commands"); | ||
|
||
for (boost::ptr_vector<eMacroCmd>::const_iterator p = m_cmds.begin(); p != m_cmds.end(); ++p) { | ||
p->SaveTo(cmdArray); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.