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

Delta Between Two Patch Sets: include/AdblockPlus/FilterEngine.h

Issue 10213003: Make JsEngine::Evaluate() return a wrapper for v8::Value to accessdifferent variable types easily (Closed)
Left Patch Set: Unbitrotted patch Created April 16, 2013, 3:30 p.m.
Right Patch Set: Addressed review comments Created April 17, 2013, 7:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « include/AdblockPlus.h ('k') | include/AdblockPlus/JsEngine.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #ifndef ADBLOCKPLUS_FILTER_ENGINE_H 1 #ifndef ADBLOCKPLUS_FILTER_ENGINE_H
2 #define ADBLOCKPLUS_FILTER_ENGINE_H 2 #define ADBLOCKPLUS_FILTER_ENGINE_H
3 3
4 #include <vector> 4 #include <vector>
5 #include <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 #include <AdblockPlus/JsValue.h> 7 #include <AdblockPlus/JsValue.h>
8 8
9 #include "tr1_memory.h" 9 #include "tr1_memory.h"
10 10
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 std::string GetProperty(const std::string& name, const std::string& defaultV alue) const; 23 std::string GetProperty(const std::string& name, const std::string& defaultV alue) const;
24 int64_t GetProperty(const std::string& name, int64_t defaultValue) const; 24 int64_t GetProperty(const std::string& name, int64_t defaultValue) const;
25 bool GetProperty(const std::string& name, bool defaultValue) const; 25 bool GetProperty(const std::string& name, bool defaultValue) const;
26 inline std::string GetProperty(const std::string& name, const char* defaultV alue) const 26 inline std::string GetProperty(const std::string& name, const char* defaultV alue) const
27 { 27 {
28 return GetProperty(name, std::string(defaultValue)); 28 return GetProperty(name, std::string(defaultValue));
29 } 29 }
30 inline int64_t GetProperty(const std::string& name, int defaultValue) const 30 inline int64_t GetProperty(const std::string& name, int defaultValue) const
31 { 31 {
32 return GetProperty(name, (int64_t)defaultValue); 32 return GetProperty(name, static_cast<int64_t>(defaultValue));
33 } 33 }
34 34
35 #if FILTER_ENGINE_STUBS 35 #if FILTER_ENGINE_STUBS
36 void SetProperty(const std::string& name, const std::string& value); 36 void SetProperty(const std::string& name, const std::string& value);
37 void SetProperty(const std::string& name, int64_t value); 37 void SetProperty(const std::string& name, int64_t value);
38 void SetProperty(const std::string& name, bool value); 38 void SetProperty(const std::string& name, bool value);
39 inline void SetProperty(const std::string& name, const char* value) 39 inline void SetProperty(const std::string& name, const char* value)
40 { 40 {
41 SetProperty(name, std::string(value)); 41 SetProperty(name, std::string(value));
42 } 42 }
43 inline void SetProperty(const std::string& name, int value) 43 inline void SetProperty(const std::string& name, int value)
44 { 44 {
45 SetProperty(name, (int64_t)value); 45 SetProperty(name, static_cast<int64_t>(value));
46 } 46 }
47 #endif 47 #endif
48 48
49 protected: 49 protected:
50 #if FILTER_ENGINE_STUBS 50 #if FILTER_ENGINE_STUBS
51 JsObject(FilterEngine& filterEngine); 51 JsObject(FilterEngine& filterEngine);
52 52
53 FilterEngine& filterEngine; 53 FilterEngine& filterEngine;
54 std::map<std::string, std::string> stringProperties; 54 std::map<std::string, std::string> stringProperties;
55 std::map<std::string, int64_t> intProperties; 55 std::map<std::string, int64_t> intProperties;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 #if FILTER_ENGINE_STUBS 129 #if FILTER_ENGINE_STUBS
130 std::map<std::string, FilterPtr> knownFilters; 130 std::map<std::string, FilterPtr> knownFilters;
131 std::vector<FilterPtr> listedFilters; 131 std::vector<FilterPtr> listedFilters;
132 std::map<std::string, SubscriptionPtr> knownSubscriptions; 132 std::map<std::string, SubscriptionPtr> knownSubscriptions;
133 std::vector<SubscriptionPtr> listedSubscriptions; 133 std::vector<SubscriptionPtr> listedSubscriptions;
134 #endif 134 #endif
135 }; 135 };
136 } 136 }
137 137
138 #endif 138 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld