Stride Reference Manual  1.0
ClusterType.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * any later version.
7  * The software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License
12  * along with the software. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2015, Willem L, Kuylen E, Stijven S & Broeckhove J
15  */
16 
22 #include <cstddef>
23 #include <string>
24 
25 namespace stride {
26 
28 enum class ClusterType {
30 };
31 
33 inline constexpr unsigned int numOfClusterTypes() { return 5U; }
34 
36 inline std::size_t toSizeType(ClusterType c) { return static_cast<std::size_t>(c); }
37 
39 std::string toString(ClusterType w);
40 
42 bool isClusterType(const std::string& s);
43 
45 ClusterType toClusterType(const std::string& s);
46 
47 }
48 
string toString(ClusterType c)
Converts a ClusterType value to corresponding name.
Definition: ClusterType.cpp:54
Time Dependent Person DataType.
Definition: NoBehaviour.h:17
std::size_t toSizeType(ClusterType c)
Cast for array access.
Definition: ClusterType.h:36
ClusterType toClusterType(const string &s)
Converts a string with name to ClusterType value.
Definition: ClusterType.cpp:64
bool isClusterType(const string &s)
Check whether string is name of a ClusterType value.
Definition: ClusterType.cpp:58
constexpr unsigned int numOfClusterTypes()
Number of Cluster types (not including Null type).
Definition: ClusterType.h:33
ClusterType
Enumerates the cluster types.
Definition: ClusterType.h:28