libxspf  1.2.0
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
XspfXmlFormatter Class Referenceabstract

#include <XspfXmlFormatter.h>

Inheritance diagram for XspfXmlFormatter:
Inheritance graph
[legend]

Public Member Functions

void setOutput (std::basic_ostringstream< XML_Char > &output)
 
void writeStart (XML_Char const *ns, XML_Char const *localName, XML_Char const *const *atts, XML_Char const *const *nsRegs=NULL)
 
void writeEnd (XML_Char const *ns, XML_Char const *localName)
 
void writeHomeStart (XML_Char const *localName, XML_Char const *const *atts, XML_Char const *const *nsRegs=NULL)
 
void writeHomeEnd (XML_Char const *localName)
 
virtual void writeBody (XML_Char const *text)=0
 
virtual void writeBody (int number)=0
 
void writeCharacterData (XML_Char const *data)
 

Static Public Attributes

static XML_Char const *const namespaceKey
 Namespace key pointer.
 

Protected Member Functions

 XspfXmlFormatter ()
 
 XspfXmlFormatter (XspfXmlFormatter const &source)
 
XspfXmlFormatteroperator= (XspfXmlFormatter const &source)
 
virtual ~XspfXmlFormatter ()
 
virtual void writeXmlDeclaration ()
 
virtual void writeStart (XML_Char const *name, XML_Char const *const *atts)=0
 
virtual void writeEnd (XML_Char const *name)=0
 
std::basic_ostringstream< XML_Char > *& getOutput ()
 

Friends

class XspfWriter
 

Detailed Description

Outputs XML.

Definition at line 90 of file XspfXmlFormatter.h.

Constructor & Destructor Documentation

◆ XspfXmlFormatter() [1/2]

XspfXmlFormatter ( )
protected

Creates a new formatter.

◆ XspfXmlFormatter() [2/2]

XspfXmlFormatter ( XspfXmlFormatter const &  source)
protected

Copy constructor.

Parameters
sourceSource to copy from

◆ ~XspfXmlFormatter()

virtual ~XspfXmlFormatter ( )
protectedvirtual

Destroys this formatter and deletes all memory associated with it.

Member Function Documentation

◆ getOutput()

std::basic_ostringstream<XML_Char>* & getOutput ( )
protected

Returns the output stream in use.

◆ operator=()

XspfXmlFormatter& operator= ( XspfXmlFormatter const &  source)
protected

Assignment operator.

Parameters
sourceSource to copy from

◆ setOutput()

void setOutput ( std::basic_ostringstream< XML_Char > &  output)

Associate the formatter with an output accumulator.

Parameters
outputOutput accumulator

◆ writeBody() [1/2]

virtual void writeBody ( XML_Char const *  text)
pure virtual

Adds element content.

Parameters
textText content

◆ writeBody() [2/2]

virtual void writeBody ( int  number)
pure virtual

Adds element content.

Parameters
numberInteger content

◆ writeCharacterData()

void writeCharacterData ( XML_Char const *  data)

Writes well-formed character data to the output accumulator.

Parameters
dataCharacter data

◆ writeEnd() [1/2]

void writeEnd ( XML_Char const *  ns,
XML_Char const *  localName 
)

Closes the tag localname from namespace ns.

Parameters
nsNamespace URI
localNameLocal element name

◆ writeEnd() [2/2]

virtual void writeEnd ( XML_Char const *  name)
protectedpure virtual

Closes the tag name.

Parameters
nameName of the tag to close

◆ writeHomeEnd()

void writeHomeEnd ( XML_Char const *  localName)

Closes the tag localname from the XSPF namespace.

Parameters
localNameLocal element name

◆ writeHomeStart()

void writeHomeStart ( XML_Char const *  localName,
XML_Char const *const *  atts,
XML_Char const *const *  nsRegs = NULL 
)

Opens the tag localname from the XSPF namespace.

Parameters
localNameLocal element name
attsNULL-terminated list of attributes (key/value pairs)
nsRegsNULL-terminated list of namespace registrations (uri/prefix pairs)

◆ writeStart() [1/2]

void writeStart ( XML_Char const *  ns,
XML_Char const *  localName,
XML_Char const *const *  atts,
XML_Char const *const *  nsRegs = NULL 
)

Opens the tag localname from namespace ns.

Parameters
nsNamespace URI
localNameLocal element name
attsNULL-terminated list of attributes (key/value pairs)
nsRegsNULL-terminated list of namespace registrations (uri/prefix pairs)

◆ writeStart() [2/2]

virtual void writeStart ( XML_Char const *  name,
XML_Char const *const *  atts 
)
protectedpure virtual

Opens the tag name and adds the attributes atts. atts is not NULL and *atts is an alternating list of attribute keys and values. Its length is uneven and the last entry is NULL.

Parameters
nameName of the tag to open
attsAlternating list of attribute key and value

◆ writeXmlDeclaration()

virtual void writeXmlDeclaration ( )
protectedvirtual

Writes the XML declaration.


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