| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 29 matching lines...) Expand all Loading... |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 namespace DecimalPrivate { | 42 namespace DecimalPrivate { |
| 43 class SpecialValueHandler; | 43 class SpecialValueHandler; |
| 44 } | 44 } |
| 45 | 45 |
| 46 // This class represents decimal base floating point number. | 46 // This class represents decimal base floating point number. |
| 47 // | 47 // |
| 48 // FIXME: Once all C++ compiler support decimal type, we should replace this | 48 // FIXME: Once all C++ compiler support decimal type, we should replace this |
| 49 // class to compiler supported one. See below URI for current status of decimal | 49 // class to compiler supported one. See below URI for current status of decimal |
| 50 // type for C++: // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n197
7.html | 50 // type for C++: |
| 51 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1977.html |
| 51 class PLATFORM_EXPORT Decimal { | 52 class PLATFORM_EXPORT Decimal { |
| 52 USING_FAST_MALLOC(Decimal); | 53 USING_FAST_MALLOC(Decimal); |
| 53 | 54 |
| 54 public: | 55 public: |
| 55 enum Sign { | 56 enum Sign { |
| 56 Positive, | 57 Positive, |
| 57 Negative, | 58 Negative, |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 // You should not use EncodedData other than unit testing. | 61 // You should not use EncodedData other than unit testing. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 Sign getSign() const { return m_data.getSign(); } | 185 Sign getSign() const { return m_data.getSign(); } |
| 185 | 186 |
| 186 EncodedData m_data; | 187 EncodedData m_data; |
| 187 }; | 188 }; |
| 188 | 189 |
| 189 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const Decimal&); | 190 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const Decimal&); |
| 190 | 191 |
| 191 } // namespace blink | 192 } // namespace blink |
| 192 | 193 |
| 193 #endif // Decimal_h | 194 #endif // Decimal_h |
| OLD | NEW |