OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_VERSION_H_ | 5 #ifndef BASE_VERSION_H_ |
6 #define BASE_VERSION_H_ | 6 #define BASE_VERSION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/base_export.h" | 12 #include "base/base_export.h" |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/gtest_prod_util.h" | |
15 | 14 |
16 // Version represents a dotted version number, like "1.2.3.4", supporting | 15 // Version represents a dotted version number, like "1.2.3.4", supporting |
17 // parsing and comparison. | 16 // parsing and comparison. |
18 class BASE_EXPORT Version { | 17 class BASE_EXPORT Version { |
19 public: | 18 public: |
20 // The only thing you can legally do to a default constructed | 19 // The only thing you can legally do to a default constructed |
21 // Version object is assign to it. | 20 // Version object is assign to it. |
22 Version(); | 21 Version(); |
23 | 22 |
24 ~Version(); | 23 ~Version(); |
(...skipping 29 matching lines...) Expand all Loading... |
54 // Return the string representation of this version. | 53 // Return the string representation of this version. |
55 const std::string GetString() const; | 54 const std::string GetString() const; |
56 | 55 |
57 const std::vector<uint16>& components() const { return components_; } | 56 const std::vector<uint16>& components() const { return components_; } |
58 | 57 |
59 private: | 58 private: |
60 std::vector<uint16> components_; | 59 std::vector<uint16> components_; |
61 }; | 60 }; |
62 | 61 |
63 #endif // BASE_VERSION_H_ | 62 #endif // BASE_VERSION_H_ |
OLD | NEW |