skia2/include/xml/SkBML_WXMLParser.h
djsollen 0b17d6cb34 Cleanup public includes directory.
This CL updates various files in the includes directory to ensure that (1) they do
not depend on headers in /src and (2) that they minimize their dependence on external
headers.

To ensure that we don't regress this behavior a new build target has been added to
build a single cpp file that contains all* public includes and is compiled with
only those directories in the include path.

* The exception is those includes that depend on OS specific headers

BUG=skia:2941
NOTRY=true

Review URL: https://codereview.chromium.org/721903002
2014-11-13 12:52:35 -08:00

47 lines
1.2 KiB
C++

/*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkBML_WXMLParser_DEFINED
#define SkBML_WXMLParser_DEFINED
#include "SkString.h"
#include "SkXMLParser.h"
class SkStream;
class SkWStream;
class BML_WXMLParser : public SkXMLParser {
public:
BML_WXMLParser(SkWStream& writer);
virtual ~BML_WXMLParser();
static void Write(SkStream& s, const char filename[]);
/** @cond UNIT_TEST */
SkDEBUGCODE(static void UnitTest();)
/** @endcond */
private:
virtual bool onAddAttribute(const char name[], const char value[]);
virtual bool onEndElement(const char name[]);
virtual bool onStartElement(const char name[]);
BML_WXMLParser& operator=(const BML_WXMLParser& src);
#ifdef SK_DEBUG
int fElemsCount, fElemsReused;
int fAttrsCount, fNamesReused, fValuesReused;
#endif
SkWStream& fWriter;
char* fElems[256];
char* fAttrNames[256];
char* fAttrValues[256];
// important that these are U8, so we get automatic wrap-around
uint8_t fNextElem, fNextAttrName, fNextAttrValue;
};
#endif // SkBML_WXMLParser_DEFINED