Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NonInterpolableValue_h | |
| 6 #define NonInterpolableValue_h | |
| 7 | |
| 8 #include "platform/heap/Handle.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class NonInterpolableValue : public RefCountedWillBeGarbageCollectedFinalized<No nInterpolableValue> { | |
| 13 public: | |
| 14 typedef const void* Type; | |
| 15 virtual Type type() const = 0; | |
| 16 | |
| 17 virtual ~NonInterpolableValue() { } | |
| 18 | |
| 19 DEFINE_INLINE_VIRTUAL_TRACE() { } | |
| 20 }; | |
| 21 | |
| 22 #define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \ | |
|
shans
2015/05/28 05:48:14
This requires a very clear documented statement of
alancutter (OOO until 2018)
2015/06/01 07:35:29
Done.
| |
| 23 static Type staticType; \ | |
| 24 virtual Type type() const { return staticType; } | |
| 25 | |
| 26 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \ | |
| 27 NonInterpolableValue::Type T::staticType = &T::staticType; | |
| 28 | |
| 29 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \ | |
| 30 DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->type() == T::static Type, value.type() == T::staticType); | |
| 31 | |
| 32 } // namespace blink | |
| 33 | |
| 34 #endif // NonInterpolableValue_h | |
| OLD | NEW |