Sync with 5.4.1
[deliverable/titan.core.git] / common / ModuleVersion.hh
CommitLineData
970ed795 1///////////////////////////////////////////////////////////////////////////////
3abe9331 2// Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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#ifndef _MODULE_VERSION_H
9#define _MODULE_VERSION_H
10
11#undef new
12#include <new>
13#include <string>
14#include "dbgnew.hh"
15
16class ModuleVersion {
17 public:
18 ModuleVersion() {}
19
20 ModuleVersion(const char* const p_productNumber,
21 unsigned int p_suffix, unsigned int p_release,
22 unsigned int p_patch, unsigned int p_build,
23 const char* const p_extra)
24 : productNumber(p_productNumber ? p_productNumber : ""),
25 suffix(p_suffix),
26 release(p_release),
27 patch(p_patch),
28 build(p_build),
29 extra(p_extra ? p_extra : "") {
30 // Do nothing
31 }
32
33 bool hasProductNumber() const { return !productNumber.empty(); }
34 std::string toString() const;
35
36 bool operator<(const ModuleVersion& other) const;
37
38 private:
39 std::string productNumber;
40 unsigned int suffix;
41 unsigned int release;
42 unsigned int patch;
43 unsigned int build;
44 std::string extra;
45};
46
47#endif
This page took 0.029359 seconds and 5 git commands to generate.