Commit | Line | Data |
---|---|---|
d44e3c4f | 1 | /****************************************************************************** |
2 | * Copyright (c) 2000-2016 Ericsson Telecom AB | |
3 | * All rights reserved. This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | * | |
8 | * Contributors: | |
9 | * | |
10 | * Balasko, Jeno | |
11 | * | |
12 | ******************************************************************************/ | |
970ed795 EL |
13 | #ifndef _MODULE_VERSION_H |
14 | #define _MODULE_VERSION_H | |
15 | ||
16 | #undef new | |
17 | #include <new> | |
18 | #include <string> | |
19 | #include "dbgnew.hh" | |
20 | ||
21 | class ModuleVersion { | |
22 | public: | |
23 | ModuleVersion() {} | |
24 | ||
25 | ModuleVersion(const char* const p_productNumber, | |
26 | unsigned int p_suffix, unsigned int p_release, | |
27 | unsigned int p_patch, unsigned int p_build, | |
28 | const char* const p_extra) | |
29 | : productNumber(p_productNumber ? p_productNumber : ""), | |
30 | suffix(p_suffix), | |
31 | release(p_release), | |
32 | patch(p_patch), | |
33 | build(p_build), | |
34 | extra(p_extra ? p_extra : "") { | |
35 | // Do nothing | |
36 | } | |
37 | ||
38 | bool hasProductNumber() const { return !productNumber.empty(); } | |
39 | std::string toString() const; | |
40 | ||
41 | bool operator<(const ModuleVersion& other) const; | |
42 | ||
43 | private: | |
44 | std::string productNumber; | |
45 | unsigned int suffix; | |
46 | unsigned int release; | |
47 | unsigned int patch; | |
48 | unsigned int build; | |
49 | std::string extra; | |
50 | }; | |
51 | ||
52 | #endif |