#include <SkXMLWriter.h>
|
| SkXMLWriter (bool doEscapeMarkup=true) |
|
virtual | ~SkXMLWriter () |
|
void | addS32Attribute (const char name[], int32_t value) |
|
void | addAttribute (const char name[], const char value[]) |
|
void | addAttributeLen (const char name[], const char value[], size_t length) |
|
void | addHexAttribute (const char name[], uint32_t value, int minDigits=0) |
|
void | addScalarAttribute (const char name[], SkScalar value) |
|
void | addText (const char text[], size_t length) |
|
void | endElement () |
|
void | startElement (const char elem[]) |
|
void | startElementLen (const char elem[], size_t length) |
|
void | writeDOM (const SkDOM &, const SkDOM::Node *, bool skipRoot) |
|
void | flush () |
|
virtual void | writeHeader () |
|
Definition at line 18 of file SkXMLWriter.h.
◆ SkXMLWriter()
SkXMLWriter::SkXMLWriter |
( |
bool |
doEscapeMarkup = true | ) |
|
Definition at line 13 of file SkXMLWriter.cpp.
13 : fDoEscapeMarkup(doEscapeMarkup)
14{}
◆ ~SkXMLWriter()
SkXMLWriter::~SkXMLWriter |
( |
| ) |
|
|
virtual |
◆ addAttribute()
void SkXMLWriter::addAttribute |
( |
const char |
name[], |
|
|
const char |
value[] |
|
) |
| |
Definition at line 26 of file SkXMLWriter.cpp.
26 {
28}
void addAttributeLen(const char name[], const char value[], size_t length)
DEF_SWITCHES_START aot vmservice shared library name
◆ addAttributeLen()
void SkXMLWriter::addAttributeLen |
( |
const char |
name[], |
|
|
const char |
value[], |
|
|
size_t |
length |
|
) |
| |
Definition at line 131 of file SkXMLWriter.cpp.
131 {
133
134 if (fDoEscapeMarkup) {
136 if (extra) {
141 }
142 }
144}
static size_t escape_markup(char dst[], const char src[], size_t length)
const char * data() const
const char * c_str() const
virtual void onAddAttributeLen(const char name[], const char value[], size_t length)=0
◆ addHexAttribute()
void SkXMLWriter::addHexAttribute |
( |
const char |
name[], |
|
|
uint32_t |
value, |
|
|
int |
minDigits = 0 |
|
) |
| |
Definition at line 36 of file SkXMLWriter.cpp.
36 {
38 tmp.appendHex(
value, minDigits);
40}
void addAttribute(const char name[], const char value[])
◆ addS32Attribute()
void SkXMLWriter::addS32Attribute |
( |
const char |
name[], |
|
|
int32_t |
value |
|
) |
| |
Definition at line 30 of file SkXMLWriter.cpp.
30 {
34}
void appendS32(int32_t value)
◆ addScalarAttribute()
void SkXMLWriter::addScalarAttribute |
( |
const char |
name[], |
|
|
SkScalar |
value |
|
) |
| |
Definition at line 42 of file SkXMLWriter.cpp.
42 {
46}
void appendScalar(SkScalar value)
◆ addText()
void SkXMLWriter::addText |
( |
const char |
text[], |
|
|
size_t |
length |
|
) |
| |
Definition at line 48 of file SkXMLWriter.cpp.
48 {
50 return;
51 }
52
54
55 fElems.back()->fHasText =
true;
56}
virtual void onAddText(const char text[], size_t length)=0
◆ doEnd()
void SkXMLWriter::doEnd |
( |
Elem * |
elem | ) |
|
|
protected |
◆ doStart()
bool SkXMLWriter::doStart |
( |
const char |
name[], |
|
|
size_t |
length |
|
) |
| |
|
protected |
Definition at line 62 of file SkXMLWriter.cpp.
62 {
65 if (firstChild) {
67 }
68 Elem** elem =
fElems.append();
70 return firstChild;
71}
◆ endElement()
void SkXMLWriter::endElement |
( |
| ) |
|
|
inline |
◆ flush()
void SkXMLWriter::flush |
( |
| ) |
|
◆ getEnd()
◆ getHeader()
const char * SkXMLWriter::getHeader |
( |
| ) |
|
|
protected |
Definition at line 79 of file SkXMLWriter.cpp.
79 {
80 static const char gHeader[] = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
81 return gHeader;
82}
◆ onAddAttributeLen()
virtual void SkXMLWriter::onAddAttributeLen |
( |
const char |
name[], |
|
|
const char |
value[], |
|
|
size_t |
length |
|
) |
| |
|
protectedpure virtual |
◆ onAddText()
virtual void SkXMLWriter::onAddText |
( |
const char |
text[], |
|
|
size_t |
length |
|
) |
| |
|
protectedpure virtual |
◆ onEndElement()
virtual void SkXMLWriter::onEndElement |
( |
| ) |
|
|
protectedpure virtual |
◆ onStartElementLen()
virtual void SkXMLWriter::onStartElementLen |
( |
const char |
elem[], |
|
|
size_t |
length |
|
) |
| |
|
protectedpure virtual |
◆ startElement()
void SkXMLWriter::startElement |
( |
const char |
elem[] | ) |
|
Definition at line 84 of file SkXMLWriter.cpp.
84 {
86}
void startElementLen(const char elem[], size_t length)
◆ startElementLen()
void SkXMLWriter::startElementLen |
( |
const char |
elem[], |
|
|
size_t |
length |
|
) |
| |
Definition at line 146 of file SkXMLWriter.cpp.
146 {
148}
virtual void onStartElementLen(const char elem[], size_t length)=0
◆ writeDOM()
void SkXMLWriter::writeDOM |
( |
const SkDOM & |
dom, |
|
|
const SkDOM::Node * |
node, |
|
|
bool |
skipRoot |
|
) |
| |
Definition at line 182 of file SkXMLWriter.cpp.
182 {
183 if (node) {
185 }
186}
static void write_dom(const SkDOM &dom, const SkDOM::Node *node, SkXMLWriter *w, bool skipRoot)
◆ writeHeader()
void SkXMLWriter::writeHeader |
( |
| ) |
|
|
virtual |
◆ fElems
The documentation for this class was generated from the following files: