aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xml
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2016-07-19 05:14:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-19 05:14:41 -0700
commitfd75dd4086971783053facde4ec6abee55afb780 (patch)
treeb4101b9db1d5b74d72a6b9441aced0b802f2e5b5 /src/xml
parent5139e501c5ac3a511e35c78395c907a176113451 (diff)
Delete SkXMLPullParser
Unused & not being built. R=reed@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163463002 Review-Url: https://codereview.chromium.org/2163463002
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/SkXMLPullParser.cpp137
1 files changed, 0 insertions, 137 deletions
diff --git a/src/xml/SkXMLPullParser.cpp b/src/xml/SkXMLPullParser.cpp
deleted file mode 100644
index 3e831a12ee..0000000000
--- a/src/xml/SkXMLPullParser.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "SkXMLParser.h"
-#include "SkStream.h"
-
-static void reset(SkXMLPullParser::Curr* curr)
-{
- curr->fEventType = SkXMLPullParser::ERROR;
- curr->fName = "";
- curr->fAttrInfoCount = 0;
- curr->fIsWhitespace = false;
-}
-
-SkXMLPullParser::SkXMLPullParser() : fStream(nullptr)
-{
- fCurr.fEventType = ERROR;
- fDepth = -1;
-}
-
-SkXMLPullParser::SkXMLPullParser(SkStream* stream) : fStream(nullptr)
-{
- fCurr.fEventType = ERROR;
- fDepth = 0;
-
- this->setStream(stream);
-}
-
-SkXMLPullParser::~SkXMLPullParser()
-{
- this->setStream(nullptr);
-}
-
-SkStream* SkXMLPullParser::setStream(SkStream* stream)
-{
- if (fStream && !stream)
- this->onExit();
-
- SkRefCnt_SafeAssign(fStream, stream);
-
- if (fStream)
- {
- fCurr.fEventType = START_DOCUMENT;
- this->onInit();
- }
- else
- {
- fCurr.fEventType = ERROR;
- }
- fDepth = 0;
-
- return fStream;
-}
-
-SkXMLPullParser::EventType SkXMLPullParser::nextToken()
-{
- switch (fCurr.fEventType) {
- case ERROR:
- case END_DOCUMENT:
- break;
- case END_TAG:
- fDepth -= 1;
- // fall through
- default:
- reset(&fCurr);
- fCurr.fEventType = this->onNextToken();
- break;
- }
-
- switch (fCurr.fEventType) {
- case START_TAG:
- fDepth += 1;
- break;
- default:
- break;
- }
-
- return fCurr.fEventType;
-}
-
-const char* SkXMLPullParser::getName()
-{
- switch (fCurr.fEventType) {
- case START_TAG:
- case END_TAG:
- return fCurr.fName;
- default:
- return nullptr;
- }
-}
-
-const char* SkXMLPullParser::getText()
-{
- switch (fCurr.fEventType) {
- case TEXT:
- case IGNORABLE_WHITESPACE:
- return fCurr.fName;
- default:
- return nullptr;
- }
-}
-
-bool SkXMLPullParser::isWhitespace()
-{
- switch (fCurr.fEventType) {
- case IGNORABLE_WHITESPACE:
- return true;
- case TEXT:
- case CDSECT:
- return fCurr.fIsWhitespace;
- default:
- return false; // unknown/illegal
- }
-}
-
-int SkXMLPullParser::getAttributeCount()
-{
- return fCurr.fAttrInfoCount;
-}
-
-void SkXMLPullParser::getAttributeInfo(int index, AttrInfo* info)
-{
- SkASSERT((unsigned)index < (unsigned)fCurr.fAttrInfoCount);
-
- if (info)
- *info = fCurr.fAttrInfos[index];
-}
-
-bool SkXMLPullParser::onEntityReplacement(const char name[],
- SkString* replacement)
-{
- // TODO: std 5 entities here
- return false;
-}