OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 template<typename Enum> const SVGEnumerationStringEntries& getStaticStringEntrie
s(); | 97 template<typename Enum> const SVGEnumerationStringEntries& getStaticStringEntrie
s(); |
98 template<typename Enum> unsigned short getMaxExposedEnumValue() | 98 template<typename Enum> unsigned short getMaxExposedEnumValue() |
99 { | 99 { |
100 return SVGEnumerationBase::valueOfLastEnum(getStaticStringEntries<Enum>()); | 100 return SVGEnumerationBase::valueOfLastEnum(getStaticStringEntries<Enum>()); |
101 } | 101 } |
102 | 102 |
103 template<typename Enum> | 103 template<typename Enum> |
104 class SVGEnumeration : public SVGEnumerationBase { | 104 class SVGEnumeration : public SVGEnumerationBase { |
105 public: | 105 public: |
106 static PassRefPtrWillBeRawPtr<SVGEnumeration<Enum> > create(Enum newValue) | 106 static PassRefPtrWillBeRawPtr<SVGEnumeration<Enum>> create(Enum newValue) |
107 { | 107 { |
108 return adoptRefWillBeNoop(new SVGEnumeration<Enum>(newValue)); | 108 return adoptRefWillBeNoop(new SVGEnumeration<Enum>(newValue)); |
109 } | 109 } |
110 | 110 |
111 virtual ~SVGEnumeration() | 111 virtual ~SVGEnumeration() |
112 { | 112 { |
113 } | 113 } |
114 | 114 |
115 virtual PassRefPtrWillBeRawPtr<SVGEnumerationBase> clone() const override | 115 virtual PassRefPtrWillBeRawPtr<SVGEnumerationBase> clone() const override |
116 { | 116 { |
(...skipping 15 matching lines...) Expand all Loading... |
132 protected: | 132 protected: |
133 explicit SVGEnumeration(Enum newValue) | 133 explicit SVGEnumeration(Enum newValue) |
134 : SVGEnumerationBase(newValue, getStaticStringEntries<Enum>(), getMaxExp
osedEnumValue<Enum>()) | 134 : SVGEnumerationBase(newValue, getStaticStringEntries<Enum>(), getMaxExp
osedEnumValue<Enum>()) |
135 { | 135 { |
136 } | 136 } |
137 }; | 137 }; |
138 | 138 |
139 } // namespace blink | 139 } // namespace blink |
140 | 140 |
141 #endif // SVGEnumeration_h | 141 #endif // SVGEnumeration_h |
OLD | NEW |