/src/mozilla-central/dom/svg/nsSVGDataParser.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef __NS_SVGDATAPARSER_H__ |
8 | | #define __NS_SVGDATAPARSER_H__ |
9 | | |
10 | | #include "mozilla/RangedPtr.h" |
11 | | #include "nsString.h" |
12 | | |
13 | | //////////////////////////////////////////////////////////////////////// |
14 | | // nsSVGDataParser: a simple base class for parsing values |
15 | | // for path and transform values. |
16 | | // |
17 | | class nsSVGDataParser |
18 | | { |
19 | | public: |
20 | | explicit nsSVGDataParser(const nsAString& aValue); |
21 | | |
22 | | protected: |
23 | 0 | static bool IsAlpha(char16_t aCh) { |
24 | 0 | // Exclude non-ascii characters before calling isalpha |
25 | 0 | return (aCh & 0x7f) == aCh && isalpha(aCh); |
26 | 0 | } |
27 | | |
28 | | // Returns true if there are more characters to read, false otherwise. |
29 | | bool SkipCommaWsp(); |
30 | | |
31 | | // Returns true if there are more characters to read, false otherwise. |
32 | | bool SkipWsp(); |
33 | | |
34 | | mozilla::RangedPtr<const char16_t> mIter; |
35 | | const mozilla::RangedPtr<const char16_t> mEnd; |
36 | | }; |
37 | | |
38 | | |
39 | | #endif // __NS_SVGDATAPARSER_H__ |