#include <XspfXmlFormatter.h>
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) | |
XspfXmlFormatter & | operator= (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 |
Definition at line 90 of file XspfXmlFormatter.h.
XspfXmlFormatter | ( | ) | [protected] |
Creates a new formatter.
XspfXmlFormatter | ( | XspfXmlFormatter const & | source | ) | [protected] |
Copy constructor.
source | Source to copy from |
virtual ~XspfXmlFormatter | ( | ) | [protected, virtual] |
Destroys this formatter and deletes all memory associated with it.
std::basic_ostringstream<XML_Char>* & getOutput | ( | ) | [protected] |
Returns the output stream in use.
XspfXmlFormatter& operator= | ( | XspfXmlFormatter const & | source | ) | [protected] |
Assignment operator.
source | Source to copy from |
void setOutput | ( | std::basic_ostringstream< XML_Char > & | output | ) |
Associate the formatter with an output accumulator.
output | Output accumulator |
virtual void writeBody | ( | int | number | ) | [pure virtual] |
Adds element content.
number | Integer content |
virtual void writeBody | ( | XML_Char const * | text | ) | [pure virtual] |
Adds element content.
text | Text content |
void writeCharacterData | ( | XML_Char const * | data | ) |
Writes well-formed character data to the output accumulator.
data | Character data |
virtual void writeEnd | ( | XML_Char const * | name | ) | [protected, pure virtual] |
Closes the tag name
.
name | Name of the tag to close |
void writeEnd | ( | XML_Char const * | ns, | |
XML_Char const * | localName | |||
) |
Closes the tag localname
from namespace ns
.
ns | Namespace URI | |
localName | Local element name |
void writeHomeEnd | ( | XML_Char const * | localName | ) |
Closes the tag localname
from the XSPF namespace.
localName | Local 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.
localName | Local element name | |
atts | NULL-terminated list of attributes (key/value pairs) | |
nsRegs | NULL-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
.
name | Name of the tag to open | |
atts | Alternating list of attribute key and value |
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
.
ns | Namespace URI | |
localName | Local element name | |
atts | NULL-terminated list of attributes (key/value pairs) | |
nsRegs | NULL-terminated list of namespace registrations (uri/prefix pairs) |
virtual void writeXmlDeclaration | ( | ) | [protected, virtual] |
Writes the XML declaration.