Ceetron Result Calculator Framework
CRCUtils.h
1 //##################################################################################################
2 //
3 // Ceetron Result Calculator Framework
4 //
5 // --------------------------------------------------------------------------------------------
6 // Copyright (C) 2019, Ceetron AS
7 //##################################################################################################
8 #pragma once
9 
10 #include "CRCResultType.h"
11 
12 #include <string>
13 #include <sstream>
14 #include <cctype>
15 
16 
17 //==================================================================================================
18 //
19 //
20 //
21 //==================================================================================================
22 class CRCUtils
23 {
24 public:
25  inline static std::string compilerInfoString();
26 
27  inline static std::string resultTypeToString(CRCResultType resultType);
28 
29  template<typename T>
30  static std::string toStdString(const T& value);
31 
32  inline static std::string toLower(const std::string& str);
33 };
34 
35 #include "CRCUtils.inl"
36 
static std::string resultTypeToString(CRCResultType resultType)
Convert the result type to a std::string.
Definition: CRCUtils.inl:50
CRCResultType
The result types supported by this framework.
Definition: CRCResultType.h:12
static std::string toStdString(const T &value)
Convert the given value to a std::string.
Definition: CRCUtils.inl:68
CRC utilities.
Definition: CRCUtils.h:22
static std::string toLower(const std::string &str)
Convert a std::string to lower case.
Definition: CRCUtils.inl:78
static std::string compilerInfoString()
Returns a string identifying the current compiler.
Definition: CRCUtils.inl:19