Serializer of curves into XML files.
More...
#include <EqualizationCurves.h>
Serializer of curves into XML files.
Definition at line 55 of file EqualizationCurves.h.
◆ EQCurveWriter()
◆ SaveCurves()
void EQCurveWriter::SaveCurves |
( |
const wxString & |
fileName = {} | ) |
|
Definition at line 282 of file EqualizationCurves.cpp.
283{
285 if( fileName.empty() )
286 {
287
288
289
290
291
292
294
295
296 if( !
fn.DirExists() )
297 {
298
299 if( !
fn.Mkdir(
fn.GetPath(), 511, wxPATH_MKDIR_FULL ) )
300 {
301
302 return;
303 }
304 }
305 }
306 else
308
310
311 const wxString fullPath{
fn.GetFullPath() };
312 XMLFileWriter eqFile{ fullPath,
XO(
"Error Saving Equalization Curves") };
313
314
316
317 eqFile.Commit();
318 } );
319}
R GuardedCall(const F1 &body, const F2 &handler=F2::Default(), F3 delayedHandler=DefaultDelayedHandlerAction) noexcept(noexcept(handler(std::declval< AudacityException * >())) &&noexcept(handler(nullptr)) &&noexcept(std::function< void(AudacityException *)>{std::move(delayedHandler)}))
Execute some code on any thread; catch any AudacityException; enqueue error report on the main thread...
void WriteXML(XMLWriter &xmlFile) const
Wrapper to output XML data to files.
FILES_API FilePath DataDir()
Audacity user data directory.
References FileNames::DataDir(), fn, GuardedCall(), WriteXML(), wxT(), and XO().
Referenced by EqualizationCurvesDialog::OnExport(), and EqualizationUI::ValidateUI().
◆ WriteXML()
void EQCurveWriter::WriteXML |
( |
XMLWriter & |
xmlFile | ) |
const |
|
private |
Definition at line 442 of file EqualizationCurves.cpp.
444{
445
447
448
449 int numCurves =
mCurves.size();
450 int curve;
451 for( curve = 0; curve < numCurves; curve++ )
452 {
453
456
457
458 int numPoints =
mCurves[ curve ].points.size();
459 int point;
460 for( point = 0; point < numPoints; point++ )
461 {
462
467 }
468
469
471 }
472
473
474 xmlFile.
EndTag(
wxT(
"equalizationeffect" ) );
475}
virtual void StartTag(const wxString &name)
void WriteAttr(const wxString &name, const Identifier &value)
virtual void EndTag(const wxString &name)
References wxT().
Referenced by SaveCurves().
◆ mCurves
The documentation for this class was generated from the following files: