OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2016 Google Inc. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 #ifndef SkSVGAttributeParser_DEFINED | |
9 #define SkSVGAttributeParser_DEFINED | |
10 | |
11 #include "SkSVGTypes.h" | |
12 | |
13 class SkSVGAttributeParser : public SkNoncopyable { | |
14 public: | |
15 SkSVGAttributeParser(const char[]); | |
16 | |
17 bool parseColor(SkSVGColor*); | |
18 bool parseNumber(SkSVGNumber*); | |
19 bool parseLength(SkSVGLength*); | |
20 | |
21 private: | |
22 // Stack-only | |
23 void* operator new(size_t) = delete; | |
24 void* operator new(size_t, void*) = delete; | |
25 | |
26 template <typename F> | |
27 bool advanceWhile(F func); | |
28 | |
29 bool parseWSAtom(); | |
30 bool parseEOSAtom(); | |
31 bool parseSepAtom(); | |
32 bool parseStringAtom(const char*); | |
33 bool parseScalarAtom(SkScalar*); | |
34 bool parseHexAtom(uint32_t*); | |
35 bool parseLengthUnitAtom(SkSVGLength::Unit*); | |
36 bool parseNamedColorAtom(SkColor*); | |
37 bool parseHexColorAtom(SkColor*); | |
38 | |
robertphillips
2016/08/02 22:25:56
fCurPos ?
// The current position in the input st
f(malita)
2016/08/03 16:50:51
Done.
| |
39 const char* fChr; | |
40 | |
robertphillips
2016/08/02 22:25:56
everyone else uses a typedef here
f(malita)
2016/08/03 16:50:51
I thought 'using' is preferred since c++11, but no
| |
41 using INHERITED = SkNoncopyable; | |
42 }; | |
43 | |
44 #endif // SkSVGAttributeParser_DEFINED | |
OLD | NEW |