OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class IDBKeyRange; | 34 class IDBKeyRange; |
35 class WebIDBKey; | 35 class WebIDBKey; |
36 | 36 |
37 class WebIDBKeyRange { | 37 class WebIDBKeyRange { |
38 public: | 38 public: |
39 ~WebIDBKeyRange() { reset(); } | 39 ~WebIDBKeyRange() { reset(); } |
40 | 40 |
| 41 WebIDBKeyRange() {} |
41 WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); } | 42 WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); } |
42 WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpe
n, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); } | 43 WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpe
n, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); } |
43 | 44 |
44 BLINK_EXPORT WebIDBKey lower() const; | 45 BLINK_EXPORT WebIDBKey lower() const; |
45 BLINK_EXPORT WebIDBKey upper() const; | 46 BLINK_EXPORT WebIDBKey upper() const; |
46 BLINK_EXPORT bool lowerOpen() const; | 47 BLINK_EXPORT bool lowerOpen() const; |
47 BLINK_EXPORT bool upperOpen() const; | 48 BLINK_EXPORT bool upperOpen() const; |
48 | 49 |
49 BLINK_EXPORT void assign(const WebIDBKeyRange&); | 50 BLINK_EXPORT void assign(const WebIDBKeyRange&); |
50 BLINK_EXPORT void assign(const WebIDBKey& lower, const WebIDBKey& upper, boo
l lowerOpen, bool upperOpen); | 51 BLINK_EXPORT void assign(const WebIDBKey& lower, const WebIDBKey& upper, boo
l lowerOpen, bool upperOpen); |
| 52 |
| 53 WebIDBKeyRange& operator=(const WebIDBKeyRange& e) |
| 54 { |
| 55 assign(e); |
| 56 return *this; |
| 57 } |
| 58 |
51 // FIXME: when compiling core or modules, use inline for reset. | 59 // FIXME: when compiling core or modules, use inline for reset. |
52 // when compiling WebIDBKeyRange.cpp, don't use inline to avoid redefinition. | 60 // when compiling WebIDBKeyRange.cpp, don't use inline to avoid redefinition. |
53 #if !BLINK_WEB_IMPLEMENTATION && BLINK_IMPLEMENTATION && defined(COMPONENT_BUILD
) | 61 #if !BLINK_WEB_IMPLEMENTATION && BLINK_IMPLEMENTATION && defined(COMPONENT_BUILD
) |
54 BLINK_EXPORT void reset() | 62 BLINK_EXPORT void reset() |
55 { | 63 { |
56 m_private.reset(); | 64 m_private.reset(); |
57 } | 65 } |
58 #else | 66 #else |
59 BLINK_EXPORT void reset(); | 67 BLINK_EXPORT void reset(); |
60 #endif | 68 #endif |
(...skipping 13 matching lines...) Expand all Loading... |
74 } | 82 } |
75 #endif | 83 #endif |
76 | 84 |
77 private: | 85 private: |
78 WebPrivatePtr<IDBKeyRange> m_private; | 86 WebPrivatePtr<IDBKeyRange> m_private; |
79 }; | 87 }; |
80 | 88 |
81 } // namespace blink | 89 } // namespace blink |
82 | 90 |
83 #endif // WebIDBKeyRange_h | 91 #endif // WebIDBKeyRange_h |
OLD | NEW |