Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/ElemHideBase.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Rebased, addressed comments, changed StringMap::find() return value Created Feb. 18, 2016, 4:02 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #pragma once
2
3 #include <cstddef>
4
5 #include "ActiveFilter.h"
6
7 struct ElemHideBaseData
8 {
9 String::size_type mDomainsEnd;
10 String::size_type mSelectorStart;
11
12 bool HasDomains() const
13 {
14 return mDomainsEnd != 0;
15 }
16
17 DependentString GetDomainsSource(String& text) const
18 {
19 return DependentString(text, 0, mDomainsEnd);
20 }
21
22 const DependentString GetDomainsSource(const String& text) const
23 {
24 return DependentString(text, 0, mDomainsEnd);
25 }
26
27 DependentString GetSelector(String& text) const
28 {
29 return DependentString(text, mSelectorStart);
30 }
31
32 const DependentString GetSelector(const String& text) const
33 {
34 return DependentString(text, mSelectorStart);
35 }
36 };
37
38 struct ElemHideData;
39
40 class ElemHideBase : public ActiveFilter, protected ElemHideBaseData
41 {
42 public:
43 ElemHideBase(const String& text, const ElemHideBaseData& data);
44 static Type Parse(DependentString& text, ElemHideData& data);
45
46 EMSCRIPTEN_KEEPALIVE const DependentString GetSelector() const
47 {
48 return ElemHideBaseData::GetSelector(mText);
49 }
50
51 EMSCRIPTEN_KEEPALIVE OwnedString GetSelectorDomain() const;
52 };
OLDNEW

Powered by Google App Engine
This is Rietveld