Audacity  3.2.0
Public Member Functions | Private Attributes | List of all members
XMLTagHandler Class Referenceabstract

This class is an interface which should be implemented by classes which wish to be able to load and save themselves using XML files. More...

#include <XMLTagHandler.h>

Inheritance diagram for XMLTagHandler:
[legend]
Collaboration diagram for XMLTagHandler:
[legend]

Public Member Functions

 XMLTagHandler ()
 
virtual ~XMLTagHandler ()
 
virtual bool HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0
 
virtual void HandleXMLEndTag (const std::string_view &WXUNUSED(tag))
 
virtual void HandleXMLContent (const std::string_view &WXUNUSED(content))
 
virtual XMLTagHandlerHandleXMLChild (const std::string_view &tag)=0
 
bool ReadXMLTag (const char *tag, const char **attrs)
 
void ReadXMLEndTag (const char *tag)
 
void ReadXMLContent (const char *s, int len)
 
XMLTagHandlerReadXMLChild (const char *tag)
 

Private Attributes

AttributesList mCurrentTagAttributes
 

Detailed Description

This class is an interface which should be implemented by classes which wish to be able to load and save themselves using XML files.

Definition at line 42 of file XMLTagHandler.h.

Constructor & Destructor Documentation

◆ XMLTagHandler()

XMLTagHandler::XMLTagHandler ( )
inline

Definition at line 44 of file XMLTagHandler.h.

44 {};

◆ ~XMLTagHandler()

virtual XMLTagHandler::~XMLTagHandler ( )
inlinevirtual

Definition at line 45 of file XMLTagHandler.h.

45 {};

Member Function Documentation

◆ HandleXMLChild()

virtual XMLTagHandler* XMLTagHandler::HandleXMLChild ( const std::string_view &  tag)
pure virtual

Implemented in WaveTrack, WaveClip, UpdateDataParser, TimeTrack, Tags, Sequence, ProjectFileIO, NoteTrack, LabelTrack, AUPImportFileHandle, FFmpegPresets, VSTEffect, EffectEqualization, CommandManager, and Envelope.

Referenced by ReadXMLChild().

Here is the caller graph for this function:

◆ HandleXMLContent()

virtual void XMLTagHandler::HandleXMLContent ( const std::string_view &  WXUNUSEDcontent)
inlinevirtual

Definition at line 64 of file XMLTagHandler.h.

64 {}

Referenced by ReadXMLContent().

Here is the caller graph for this function:

◆ HandleXMLEndTag()

virtual void XMLTagHandler::HandleXMLEndTag ( const std::string_view &  WXUNUSEDtag)
inlinevirtual

Definition at line 59 of file XMLTagHandler.h.

59 {}

Referenced by AUPImportFileHandle::HandleXMLEndTag(), and ReadXMLEndTag().

Here is the caller graph for this function:

◆ HandleXMLTag()

virtual bool XMLTagHandler::HandleXMLTag ( const std::string_view &  tag,
const AttributesList attrs 
)
pure virtual

Implemented in WaveTrack, WaveClip, UpdateDataParser, TimeTrack, Tags, Sequence, ProjectFileIO, NoteTrack, LabelTrack, AUPImportFileHandle, FFmpegPresets, VSTEffect, EffectEqualization, CommandManager, Envelope, and EnvPoint.

Referenced by AUPImportFileHandle::HandleXMLTag(), and ReadXMLTag().

Here is the caller graph for this function:

◆ ReadXMLChild()

XMLTagHandler * XMLTagHandler::ReadXMLChild ( const char *  tag)

Definition at line 118 of file XMLTagHandler.cpp.

119 {
120  return HandleXMLChild(tag);
121 }

References HandleXMLChild().

Here is the call graph for this function:

◆ ReadXMLContent()

void XMLTagHandler::ReadXMLContent ( const char *  s,
int  len 
)

Definition at line 113 of file XMLTagHandler.cpp.

114 {
115  HandleXMLContent(std::string_view(s, len));
116 }

References HandleXMLContent().

Here is the call graph for this function:

◆ ReadXMLEndTag()

void XMLTagHandler::ReadXMLEndTag ( const char *  tag)

Definition at line 108 of file XMLTagHandler.cpp.

109 {
110  HandleXMLEndTag(tag);
111 }

References HandleXMLEndTag().

Here is the call graph for this function:

◆ ReadXMLTag()

bool XMLTagHandler::ReadXMLTag ( const char *  tag,
const char **  attrs 
)

Definition at line 91 of file XMLTagHandler.cpp.

92 {
93  mCurrentTagAttributes.clear();
94 
95  while (*attrs) {
96  const char* name = *attrs++;
97  const char* value = *attrs++;
98 
99  mCurrentTagAttributes.emplace_back(
100  std::string_view(name), XMLAttributeValueView(std::string_view(value)));
101  }
102 
103  bool result = HandleXMLTag(tag, mCurrentTagAttributes);
104 
105  return result;
106 }

References HandleXMLTag(), mCurrentTagAttributes, and name.

Here is the call graph for this function:

Member Data Documentation

◆ mCurrentTagAttributes

AttributesList XMLTagHandler::mCurrentTagAttributes
private

Definition at line 81 of file XMLTagHandler.h.

Referenced by ReadXMLTag().


The documentation for this class was generated from the following files:
XMLTagHandler::mCurrentTagAttributes
AttributesList mCurrentTagAttributes
Definition: XMLTagHandler.h:81
XMLTagHandler::HandleXMLEndTag
virtual void HandleXMLEndTag(const std::string_view &WXUNUSED(tag))
Definition: XMLTagHandler.h:59
name
const TranslatableString name
Definition: Distortion.cpp:98
XMLAttributeValueView
A view into an attribute value. The class does not take the ownership of the data.
Definition: XMLAttributeValueView.h:44
XMLTagHandler::HandleXMLContent
virtual void HandleXMLContent(const std::string_view &WXUNUSED(content))
Definition: XMLTagHandler.h:64
XMLTagHandler::HandleXMLChild
virtual XMLTagHandler * HandleXMLChild(const std::string_view &tag)=0
XMLTagHandler::HandleXMLTag
virtual bool HandleXMLTag(const std::string_view &tag, const AttributesList &attrs)=0