Audacity  2.2.0
AutoSaveFile Class Referencefinal

a class wrapping reading and writing of arbitrary data in text or binary format to a file. More...

#include <AutoRecovery.h>

Inheritance diagram for AutoSaveFile:
XMLWriter

Public Member Functions

 AutoSaveFile (size_t allocSize=1024 *1024)
 
virtual ~AutoSaveFile ()
 
void StartTag (const wxString &name) override
 
void EndTag (const wxString &name) override
 
void WriteAttr (const wxString &name, const wxString &value) override
 
void WriteAttr (const wxString &name, const wxChar *value) override
 
void WriteAttr (const wxString &name, int value) override
 
void WriteAttr (const wxString &name, bool value) override
 
void WriteAttr (const wxString &name, long value) override
 
void WriteAttr (const wxString &name, long long value) override
 
void WriteAttr (const wxString &name, size_t value) override
 
void WriteAttr (const wxString &name, float value, int digits=-1) override
 
void WriteAttr (const wxString &name, double value, int digits=-1) override
 
void WriteData (const wxString &value) override
 
void Write (const wxString &data) override
 
void WriteSubTree (const AutoSaveFile &value)
 
bool Write (wxFFile &file) const
 
bool Append (wxFFile &file) const
 
bool IsEmpty () const
 
bool Decode (const wxString &fileName)
 
- Public Member Functions inherited from XMLWriter
 XMLWriter ()
 
virtual ~XMLWriter ()
 
virtual void WriteSubTree (const wxString &value)
 
wxString XMLEsc (const wxString &s)
 

Private Member Functions

void WriteName (const wxString &name)
 
void CheckSpace (wxMemoryOutputStream &buf)
 

Private Attributes

wxMemoryOutputStream mBuffer
 
wxMemoryOutputStream mDict
 
NameMap mNames
 
size_t mAllocSize
 

Additional Inherited Members

- Protected Attributes inherited from XMLWriter
bool mInTag
 
int mDepth
 
wxArrayString mTagstack
 
wxArrayInt mHasKids
 

Detailed Description

a class wrapping reading and writing of arbitrary data in text or binary format to a file.

Constructor & Destructor Documentation

AutoSaveFile::AutoSaveFile ( size_t  allocSize = 1024 * 1024)

References mAllocSize.

AutoSaveFile::~AutoSaveFile ( )
virtual

Member Function Documentation

bool AutoSaveFile::Append ( wxFFile &  file) const

References mBuffer, and mDict.

Referenced by AudacityProject::OnAudioIONewBlockFiles(), and Write().

void AutoSaveFile::CheckSpace ( wxMemoryOutputStream &  buf)
private

References mAllocSize.

Referenced by WriteName().

bool AutoSaveFile::Decode ( const wxString &  fileName)
void AutoSaveFile::EndTag ( const wxString &  name)
overridevirtual

Reimplemented from XMLWriter.

References FT_EndTag, mBuffer, and WriteName().

Referenced by AudioIO::FillBuffers().

bool AutoSaveFile::IsEmpty ( ) const

References mBuffer.

Referenced by AudioIO::FillBuffers().

void AutoSaveFile::StartTag ( const wxString &  name)
overridevirtual

Reimplemented from XMLWriter.

References FT_StartTag, mBuffer, and WriteName().

Referenced by AudioIO::FillBuffers().

void AutoSaveFile::Write ( const wxString &  data)
overridevirtual

Implements XMLWriter.

References FT_Raw, and mBuffer.

Referenced by AudacityProject::AutoSave().

bool AutoSaveFile::Write ( wxFFile &  file) const

References Append(), and AutoSaveIdent.

void AutoSaveFile::WriteAttr ( const wxString &  name,
const wxString &  value 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_String, mBuffer, and WriteName().

Referenced by AudioIO::FillBuffers(), and WriteAttr().

void AutoSaveFile::WriteAttr ( const wxString &  name,
const wxChar *  value 
)
overridevirtual

Reimplemented from XMLWriter.

References WriteAttr().

void AutoSaveFile::WriteAttr ( const wxString &  name,
int  value 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_Int, mBuffer, and WriteName().

void AutoSaveFile::WriteAttr ( const wxString &  name,
bool  value 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_Bool, mBuffer, and WriteName().

void AutoSaveFile::WriteAttr ( const wxString &  name,
long  value 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_Long, mBuffer, and WriteName().

void AutoSaveFile::WriteAttr ( const wxString &  name,
long long  value 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_LongLong, mBuffer, and WriteName().

void AutoSaveFile::WriteAttr ( const wxString &  name,
size_t  value 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_SizeT, mBuffer, and WriteName().

void AutoSaveFile::WriteAttr ( const wxString &  name,
float  value,
int  digits = -1 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_Float, mBuffer, and WriteName().

void AutoSaveFile::WriteAttr ( const wxString &  name,
double  value,
int  digits = -1 
)
overridevirtual

Reimplemented from XMLWriter.

References FT_Double, mBuffer, and WriteName().

void AutoSaveFile::WriteData ( const wxString &  value)
overridevirtual

Reimplemented from XMLWriter.

References FT_Data, and mBuffer.

void AutoSaveFile::WriteName ( const wxString &  name)
private

References CheckSpace(), FT_Name, mBuffer, mDict, mNames, and name.

Referenced by EndTag(), StartTag(), and WriteAttr().

void AutoSaveFile::WriteSubTree ( const AutoSaveFile value)

References FT_Pop, FT_Push, mBuffer, and mDict.

Referenced by AudioIO::FillBuffers().

Member Data Documentation

size_t AutoSaveFile::mAllocSize
private

Referenced by AutoSaveFile(), and CheckSpace().

wxMemoryOutputStream AutoSaveFile::mBuffer
private
wxMemoryOutputStream AutoSaveFile::mDict
private

Referenced by Append(), WriteName(), and WriteSubTree().

NameMap AutoSaveFile::mNames
private

Referenced by WriteName().


The documentation for this class was generated from the following files: