TnEHProvider
tn_api_version.h
Go to the documentation of this file.
1 
10 #include <string>
11 
12 #include "tn_export.h"
13 
14 #ifndef SCMCOMMITID
15 
16 #endif
17 
18 namespace tn
19 {
20 namespace ehp
21 {
22 static const std::string delimitor = ".";
23 
36 {
37 public:
38  APIVersion(const std::string& major, const std::string& minor, const std::string patch)
39  : m_major(major)
40  , m_minor(minor)
41  , m_patch(patch)
42  {
43  }
45  {
46  }
47 
48  APIVersion(const APIVersion&&) = delete;
49  APIVersion(APIVersion&) = delete;
50 
51  std::string getVersion() const
52  {
53  std::string version = m_major + delimitor + m_minor + delimitor + m_patch;
54 #ifdef SCMCOMMITID
55  version += delimitor + std::string(SCMCOMMITID);
56 #endif
57  return version;
58  }
59 
60 private:
61  std::string m_major;
62  std::string m_minor;
63  std::string m_patch;
64 };
65 } // namespace ehp
66 } // namespace tn
tn::ehp::APIVersion::~APIVersion
~APIVersion()
Definition: tn_api_version.h:44
tn::ehp::APIVersion::m_major
std::string m_major
Definition: tn_api_version.h:61
tn::ehp::APIVersion::m_patch
std::string m_patch
Definition: tn_api_version.h:63
tn::ehp::APIVersion::getVersion
std::string getVersion() const
Definition: tn_api_version.h:51
tn_export.h
definitions for export and import Copyright (c) 2021 Telenav, Inc All rights reserved This program is...
tn::ehp::APIVersion::APIVersion
APIVersion(APIVersion &)=delete
tn
Definition: tn_adas_message.h:15
tn::ehp::APIVersion::APIVersion
APIVersion(const APIVersion &&)=delete
tn::ehp::APIVersion
APIVersion The API versioning class. The API version is consisted by major, minor,...
Definition: tn_api_version.h:36
tn::ehp::APIVersion::APIVersion
APIVersion(const std::string &major, const std::string &minor, const std::string patch)
Definition: tn_api_version.h:38
TN_EHP_API_DECL
#define TN_EHP_API_DECL
Definition: tn_export.h:46
tn::ehp::APIVersion::m_minor
std::string m_minor
Definition: tn_api_version.h:62