MCPcopy Create free account
hub / github.com/ariccio/altWinDirStat / GetWriter

Method GetWriter

Reference code/osImageTool/OSImageTool.cpp:248–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248OsImageWriter* COSImageToolApp::GetWriter(const ComboBoxControl& cb)
249{
250 string str;
251 int sel;
252 if (cb.GetSelection(sel))
253 {
254 debug("dstsel= %d\n", sel);
255 if (sel==m_sdcards.size())
256 return new XDAOsImageWriter();
257 else
258 return new SdOsImageWriter(m_sdcards[sel]);
259 }
260
261 if (cb.GetText(str))
262 {
263 OsImageWriter* pwriter= FileOsImageWriter::GetFileWriter(str);
264 if (pwriter==NULL)
265 g_err.Set(stringformat("don't know how to write destinationfile %s", str.c_str()));
266 return pwriter;
267 }
268 g_err.Set("no target selected");
269 return NULL;
270}
271
272OsImageReader* COSImageToolApp::GetReader(const ComboBoxControl& cb)
273{

Callers

nothing calls this directly

Calls 6

debugFunction · 0.85
stringformatFunction · 0.85
GetSelectionMethod · 0.45
sizeMethod · 0.45
GetTextMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected