libxspf  1.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
XspfXmlFormatter Class Reference

#include <XspfXmlFormatter.h>

Inheritance diagram for XspfXmlFormatter:
Inheritance graph
[legend]

List of all members.

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 ( ) [protected]

Creates a new formatter.

XspfXmlFormatter ( XspfXmlFormatter const &  source) [protected]

Copy constructor.

Parameters:
sourceSource to copy from
virtual ~XspfXmlFormatter ( ) [protected, virtual]

Destroys this formatter and deletes all memory associated with it.


Member Function Documentation

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

Returns the output stream in use.

XspfXmlFormatter& operator= ( XspfXmlFormatter const &  source) [protected]

Assignment operator.

Parameters:
sourceSource to copy from
void setOutput ( std::basic_ostringstream< XML_Char > &  output)

Associate the formatter with an output accumulator.

Parameters:
outputOutput accumulator
virtual void writeBody ( XML_Char const *  text) [pure virtual]

Adds element content.

Parameters:
textText content
virtual void writeBody ( int  number) [pure virtual]

Adds element content.

Parameters:
numberInteger content
void writeCharacterData ( XML_Char const *  data)

Writes well-formed character data to the output accumulator.

Parameters:
dataCharacter data
void writeEnd ( XML_Char const *  ns,
XML_Char const *  localName 
)

Closes the tag localname from namespace ns.

Parameters:
nsNamespace URI
localNameLocal element name
virtual void writeEnd ( XML_Char const *  name) [protected, pure virtual]

Closes the tag name.

Parameters:
nameName of the tag to close
void writeHomeEnd ( XML_Char const *  localName)

Closes the tag localname from the XSPF namespace.

Parameters:
localNameLocal element name
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)
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)
virtual void writeStart ( XML_Char const *  name,
XML_Char const *const *  atts 
) [protected, pure 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
virtual void writeXmlDeclaration ( ) [protected, virtual]

Writes the XML declaration.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines