kim-api  2.1.4-git+v2.1.3-git-3-g4c859c7f.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_SemVer.hpp
Go to the documentation of this file.
1 //
2 // CDDL HEADER START
3 //
4 // The contents of this file are subject to the terms of the Common Development
5 // and Distribution License Version 1.0 (the "License").
6 //
7 // You can obtain a copy of the license at
8 // http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 // specific language governing permissions and limitations under the License.
10 //
11 // When distributing Covered Code, include this CDDL HEADER in each file and
12 // include the License file in a prominent location with the name LICENSE.CDDL.
13 // If applicable, add the following below this CDDL HEADER, with the fields
14 // enclosed by brackets "[]" replaced with your own identifying information:
15 //
16 // Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 //
18 // CDDL HEADER END
19 //
20 
21 //
22 // Copyright (c) 2016--2019, Regents of the University of Minnesota.
23 // All rights reserved.
24 //
25 // Contributors:
26 // Ryan S. Elliott
27 //
28 
29 //
30 // Release: This file is part of the kim-api.git repository.
31 //
32 
33 
34 #ifndef KIM_SEM_VER_HPP_
35 #define KIM_SEM_VER_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
42 namespace SEM_VER
43 {
49 std::string const & GetSemVer();
50 
68 int IsLessThan(std::string const & lhs,
69  std::string const & rhs,
70  int * const isLessThan);
71 
103 int ParseSemVer(std::string const & version,
104  int * const major,
105  int * const minor,
106  int * const patch,
107  std::string * const prerelease,
108  std::string * const buildMetadata);
109 } // namespace SEM_VER
110 } // namespace KIM
111 
112 #endif // KIM_SEM_VER_HPP_
int ParseSemVer(std::string const &version, int *const major, int *const minor, int *const patch, std::string *const prerelease, std::string *const buildMetadata)
Parse Semantic Version string into its six components.
std::string const & GetSemVer()
Get the KIM API complete Semantic Version string.
int IsLessThan(std::string const &lhs, std::string const &rhs, int *const isLessThan)
Compare two Semantic Version strings.