Skip to content
Snippets Groups Projects
Commit 219c5380 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Removing WINNT version preproc overwrite from almost everywhere, troubling...

Removing WINNT version preproc overwrite from almost everywhere, troubling boost or tbb. Current (haha) windows is now required to access try-lock kernel functionality.
parent 1d8dcb17
Branches
Tags
No related merge requests found
......@@ -21,10 +21,6 @@
#include <ITABaseDefinitions.h>
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#include <string>
#ifdef WIN32
#include <windows.h>
......
......@@ -21,8 +21,6 @@
#include <ITAUncopyable.h>
#define _WIN32_WINNT 0x0500
#include <windows.h>
/**
......
......@@ -31,27 +31,27 @@
class ITA_BASE_API ITAConversion
{
public:
static const int STRICT_MODE = (1 << 0); // Konvertierungen mittels Regex prfen (sauber!)
static const int THROW_EXCEPTIONS = (1 << 1); // ITAExceptios werfen wenn eine Konvertierung fehlschlgt
static const int STRICT_MODE = ( 1 << 0 ); // Konvertierungen mittels Regex prfen (sauber!)
static const int THROW_EXCEPTIONS = ( 1 << 1 ); // ITAExceptios werfen wenn eine Konvertierung fehlschlgt
static const int DEFAULT_OPTIONS = STRICT_MODE | THROW_EXCEPTIONS;
inline ITAConversion() : m_iOpts(DEFAULT_OPTIONS) {};
inline ITAConversion(int iOpts) : m_iOpts(iOpts) {};
inline ITAConversion() : m_iOpts( DEFAULT_OPTIONS ) {};
inline ITAConversion( int iOpts ) : m_iOpts( iOpts ) {};
bool StringToBool(const std::string& s, bool& b);
bool StringToInt(const std::string& s, int& i);
bool StringToUInt(const std::string& s, unsigned int& i);
bool StringToInt64(const std::string& s, int64_t& i);
bool StringToUInt64(const std::string& s, uint64_t& i);
bool StringToFloat(const std::string& s, float& f);
bool StringToDouble(const std::string& s, double& d);
bool StringToBool( const std::string& s, bool& b );
bool StringToInt( const std::string& s, int& i );
bool StringToUInt( const std::string& s, unsigned int& i );
bool StringToInt64( const std::string& s, int64_t& i );
bool StringToUInt64( const std::string& s, uint64_t& i );
bool StringToFloat( const std::string& s, float& f );
bool StringToDouble( const std::string& s, double& d );
bool StringToIntVec(const std::string& s, std::vector<int>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true);
bool StringToUIntVec(const std::string& s, std::vector<unsigned int>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true);
bool StringToFloatVec(const std::string& s, std::vector<float>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true);
bool StringToDoubleVec(const std::string& s, std::vector<double>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true);
bool StringToStringVec(const std::string& s, std::vector< std::string >& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true);
bool StringToIntVec( const std::string& s, std::vector<int>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
bool StringToUIntVec( const std::string& s, std::vector<unsigned int>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
bool StringToFloatVec( const std::string& s, std::vector<float>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
bool StringToDoubleVec( const std::string& s, std::vector<double>& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
bool StringToStringVec( const std::string& s, std::vector< std::string >& v, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
private:
int m_iOpts;
......@@ -59,87 +59,87 @@ private:
//! Eine Zeichenkette in Kleinbuchstaben konvertieren
ITA_BASE_API std::string toLowercase(const std::string& s);
ITA_BASE_API std::string toLowercase( const std::string& s );
//! Eine Zeichenkette in Grossbuchstaben konvertieren
ITA_BASE_API std::string toUppercase(const std::string& s);
ITA_BASE_API std::string toUppercase( const std::string& s );
//! bool nach std::string konvertieren
ITA_BASE_API std::string BoolToString( bool bValue );
//! int nach std::string konvertieren
ITA_BASE_API std::string IntToString(int iValue);
ITA_BASE_API std::string IntToString( int iValue );
//! unsigned int nach std::string konvertieren
ITA_BASE_API std::string UIntToString(unsigned int uiValue);
ITA_BASE_API std::string UIntToString( unsigned int uiValue );
//! long nach std::string konvertieren
ITA_BASE_API std::string LongToString(unsigned int lValue);
ITA_BASE_API std::string LongToString( unsigned int lValue );
//! 64-Bit Integer mit Vorzeichen nach std::string konvertieren
ITA_BASE_API std::string Int64ToString(int64_t i64Value);
ITA_BASE_API std::string Int64ToString( int64_t i64Value );
//! Vorzeichenlosen 64-Bit Integer nach std::string konvertieren
ITA_BASE_API std::string UInt64ToString(uint64_t ui64Value);
ITA_BASE_API std::string UInt64ToString( uint64_t ui64Value );
//! float nach std::string konvertieren
ITA_BASE_API std::string FloatToString(float fValue, int iPrecision = -1);
ITA_BASE_API std::string FloatToString( float fValue, int iPrecision = -1 );
//! double nach std::string konvertieren
ITA_BASE_API std::string DoubleToString(double dValue, int iPrecision = -1);
ITA_BASE_API std::string DoubleToString( double dValue, int iPrecision = -1 );
//! Bitmaske nach std::string konvertieren
ITA_BASE_API std::string BitmaskToString(int iMask, int iNumBits = 32);
ITA_BASE_API std::string BitmaskToString( int iMask, int iNumBits = 32 );
//! Dezibelangabe (double) nach std::string konvertieren
ITA_BASE_API std::string DecibelToString(double dDecibelValue, std::string sMinusInfinity="-inf", std::string sUnit="dB");
ITA_BASE_API std::string DecibelToString( double dDecibelValue, std::string sMinusInfinity = "-inf", std::string sUnit = "dB" );
//! std::vector<Enum_Type> nach std::string konvertieren
template <typename TEnum>
inline std::string EnumVecToString(std::vector<TEnum> veValues, std::string sSeparator = ", ")
inline std::string EnumVecToString( std::vector<TEnum> veValues, std::string sSeparator = ", " )
{
std::stringstream s;
if( !veValues.empty() )
{
s << static_cast<int>(veValues.front());
for( unsigned int i = 1; i<veValues.size(); i++ )
s << sSeparator << static_cast<int>(veValues[i]);
}
return s.str();
std::stringstream s;
if( !veValues.empty() )
{
s << static_cast< int >( veValues.front() );
for( unsigned int i = 1; i < veValues.size(); i++ )
s << sSeparator << static_cast< int >( veValues[ i ] );
}
return s.str();
};
//! std::vector<int> nach std::string konvertieren
ITA_BASE_API std::string IntVecToString(std::vector<int> viValues, std::string sSeparator=", ");
ITA_BASE_API std::string IntVecToString( std::vector<int> viValues, std::string sSeparator = ", " );
//! std::vector<unsigned int> nach std::string konvertieren
ITA_BASE_API std::string UIntVecToString(std::vector<unsigned int> vuiValues, std::string sSeparator=", ");
ITA_BASE_API std::string UIntVecToString( std::vector<unsigned int> vuiValues, std::string sSeparator = ", " );
//! std::vector<float> nach std::string konvertieren
ITA_BASE_API std::string FloatVecToString(std::vector<float> vfValues, int iPrecision = -1, std::string sSeparator=", ");
ITA_BASE_API std::string FloatVecToString( std::vector<float> vfValues, int iPrecision = -1, std::string sSeparator = ", " );
//! std::vector<double> nach std::string konvertieren
ITA_BASE_API std::string DoubleVecToString(std::vector<double> vdValues, int iPrecision = -1, std::string sSeparator=", ");
ITA_BASE_API std::string DoubleVecToString( std::vector<double> vdValues, int iPrecision = -1, std::string sSeparator = ", " );
//! std::vector<std::string> nach std::string konvertieren
ITA_BASE_API std::string StringVecToString(std::vector<std::string> vsValues, std::string sSeparator=", ");
ITA_BASE_API std::string StringVecToString( std::vector<std::string> vsValues, std::string sSeparator = ", " );
//! int-Array nach std::string konvertieren
ITA_BASE_API std::string IntArrayToString(const int* piValues, size_t count, std::string sSeparator=", ");
ITA_BASE_API std::string IntArrayToString( const int* piValues, size_t count, std::string sSeparator = ", " );
//! unsigned int-Array nach std::string konvertieren
ITA_BASE_API std::string UIntArrayToString(const unsigned int* puiValues, size_t count, std::string sSeparator=", ");
ITA_BASE_API std::string UIntArrayToString( const unsigned int* puiValues, size_t count, std::string sSeparator = ", " );
//! float-Array nach std::string konvertieren
ITA_BASE_API std::string FloatArrayToString(const float* pfValues, size_t count, int iPrecision = -1, std::string sSeparator=", ");
ITA_BASE_API std::string FloatArrayToString( const float* pfValues, size_t count, int iPrecision = -1, std::string sSeparator = ", " );
//! Komplexwertiges float-Array nach std::string konvertieren
ITA_BASE_API std::string ComplexFloatArrayToString(const float* pfValues, size_t count, int iPrecision = -1, std::string sSeparator=", ");
ITA_BASE_API std::string ComplexFloatArrayToString( const float* pfValues, size_t count, int iPrecision = -1, std::string sSeparator = ", " );
//! double-Array nach std::string konvertieren
ITA_BASE_API std::string DoubleArrayToString(const double* pdValues, size_t count, int iPrecision = -1, std::string sSeparator=", ");
ITA_BASE_API std::string DoubleArrayToString( const double* pdValues, size_t count, int iPrecision = -1, std::string sSeparator = ", " );
//! String-Array nach std::string konvertieren
ITA_BASE_API std::string StringArrayToString(const char** ppcValues, size_t count, std::string sSeparator=", ");
ITA_BASE_API std::string StringArrayToString( const char** ppcValues, size_t count, std::string sSeparator = ", " );
/* +-------------------------------------------------------------+
| |
......@@ -148,13 +148,13 @@ ITA_BASE_API std::string StringArrayToString(const char** ppcValues, size_t coun
+-------------------------------------------------------------+ */
//! std::string nach bool parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API bool StringToBool(const std::string& s);
ITA_BASE_API bool StringToBool( const std::string& s );
//! std::string nach int parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API int StringToInt(const std::string& s);
ITA_BASE_API int StringToInt( const std::string& s );
//! std::string nach unsigned int parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API unsigned int StringToUInt(const std::string& s);
ITA_BASE_API unsigned int StringToUInt( const std::string& s );
//! std::string nach int64_t parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
//ITA_BASE_API int64_t StringToInt64(const std::string& s);
......@@ -163,27 +163,27 @@ ITA_BASE_API unsigned int StringToUInt(const std::string& s);
//uint64_t StringToUInt64(const std::string& s);
//! std::string nach float parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API float StringToFloat(const std::string& s);
ITA_BASE_API float StringToFloat( const std::string& s );
//! std::string nach double parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API double StringToDouble(const std::string& s);
ITA_BASE_API double StringToDouble( const std::string& s );
//! Alle folgenden Operationen arbeiten Case-Sensitive?
//! std::string nach int-Liste parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API std::vector<int> StringToIntVec(const std::string& s, std::string sSeparatorRegex="\\s*,\\s*", bool bMatchCase=true);
ITA_BASE_API std::vector<int> StringToIntVec( const std::string& s, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
//! std::string nach unsigned int-Liste parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API std::vector<unsigned int> StringToUIntVec(const std::string& s, std::string sSeparatorRegex="\\s*,\\s*", bool bMatchCase=true);
ITA_BASE_API std::vector<unsigned int> StringToUIntVec( const std::string& s, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
//! std::string nach float-Liste parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API std::vector<float> StringToFloatVec(const std::string& s, std::string sSeparatorRegex="\\s*,\\s*", bool bMatchCase=true);
ITA_BASE_API std::vector<float> StringToFloatVec( const std::string& s, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
//! std::string nach double-Liste parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API std::vector<double> StringToDoubleVec(const std::string& s, std::string sSeparatorRegex="\\s*,\\s*", bool bMatchCase=true);
ITA_BASE_API std::vector<double> StringToDoubleVec( const std::string& s, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
//! std::string nach String-Liste parsen (Parse-Fehler werden in ITAExceptions umgesetzt)
ITA_BASE_API std::vector< std::string > StringToStringVec(const std::string& s, std::string sSeparatorRegex="\\s*,\\s*", bool bMatchCase=true);
ITA_BASE_API std::vector< std::string > StringToStringVec( const std::string& s, std::string sSeparatorRegex = "\\s*,\\s*", bool bMatchCase = true );
/* +-------------------------------------+
| |
......@@ -192,26 +192,26 @@ ITA_BASE_API std::vector< std::string > StringToStringVec(const std::string& s,
+-------------------------------------+ */
//! Einen String n-Mal aneinander hngen
ITA_BASE_API std::string nTimes(std::string s, unsigned int n);
ITA_BASE_API std::string nTimes( std::string s, unsigned int n );
//! Zeichenkette in Teile zerlegen die durch das angebenene Zeichen getrennt sind
ITA_BASE_API std::vector< std::string > splitString(const std::string& s, char cSeparator);
ITA_BASE_API std::vector< std::string > splitString( const std::string& s, char cSeparator );
//! Zeichenkette in Teile zerlegen die durch die angebenene Zeichenkette getrennt sind
ITA_BASE_API std::vector< std::string > splitString(const std::string& s, const std::string& sSeparator);
ITA_BASE_API std::vector< std::string > splitString( const std::string& s, const std::string& sSeparator );
//! Zeichenkette in Teile zerlegen die durch das angebenene Zeichen getrennt sind
ITA_BASE_API void regexSplitString(const std::string& src, std::vector< std::string >& dest, const std::string& regex, bool bMatchCase=true);
ITA_BASE_API void regexSplitString( const std::string& src, std::vector< std::string >& dest, const std::string& regex, bool bMatchCase = true );
//! Entfernt alle Leerzeichen am Anfang und Ende einer Zeichenkette
ITA_BASE_API std::string stripSpaces(const std::string& s);
ITA_BASE_API std::string stripSpaces( const std::string& s );
//! Verhltnis als dB-Angabe (Leistungs-/Energiepegel, 10*log10(...)) formattieren
ITA_BASE_API std::string ratio_to_db10_str(double r, std::string sSuffix="");
ITA_BASE_API std::string ratio_to_db10_str( double r, std::string sSuffix = "" );
//! Verhltnis als dB-Angabe (Schalldruckpegel, 20*log10(...)) formattieren
ITA_BASE_API std::string ratio_to_db20_str(double r, std::string sSuffix="");
ITA_BASE_API std::string ratio_to_db20_str( double r, std::string sSuffix = "" );
//! Einen Verstrkungsfaktor (reiner Faktor oder Dezibel) aus Zeichenkette lesen
/**
......@@ -222,14 +222,14 @@ ITA_BASE_API std::string ratio_to_db20_str(double r, std::string sSuffix="");
*
* Im Fehlerfall wird eine ITAException ausgelst.
*/
ITA_BASE_API double str_to_amp_ratio_db10(const std::string& s);
ITA_BASE_API double str_to_amp_ratio_db20(const std::string& s);
ITA_BASE_API double str_to_amp_ratio_db10( const std::string& s );
ITA_BASE_API double str_to_amp_ratio_db20( const std::string& s );
//! Zeit [s] in eine Zeichenkette konvertieren
// (Alias fr altes convertTimeToHumanReadableString in HPT)
ITA_BASE_API std::string timeToString(const double dSeconds);
ITA_BASE_API std::string timeToString( const double dSeconds );
//! Substituiert das erste Makro der Form $(MAKRONAME) mit dem Makro-Wert und liefert das Ergebnis zurck
ITA_BASE_API std::string SubstituteMacro(const std::string& sInput, const std::string& sMacroName, const std::string& sMacroValue);
ITA_BASE_API std::string SubstituteMacro( const std::string& sInput, const std::string& sMacroName, const std::string& sMacroValue );
#endif // INCLUDE_WATCHER_ITA_STRING_UTILS
......@@ -32,11 +32,6 @@
#include <Windows.h>
#endif
// Weitere Includes
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
// Vorwrtsdeklarationen
class ITATimer;
......
......@@ -27,17 +27,17 @@ class ITA_BASE_API ITAUncopyable
{
protected:
// Erlaubt fr Unterklassen: Standardkonstruktor
ITAUncopyable() {};
inline ITAUncopyable() {};
// Erlaubt fr Unterklassen: Destruktor
virtual ~ITAUncopyable() {}
virtual inline ~ITAUncopyable() {};
private:
// Verboten fr alle: Kopierkonstruktor
ITAUncopyable(const ITAUncopyable&) {}
inline ITAUncopyable( const ITAUncopyable& ) {};
// Verboten fr alle: Zuweisungsoperator
ITAUncopyable& operator=(const ITAUncopyable&);
ITAUncopyable& operator=( const ITAUncopyable& );
};
#endif // INCLUDE_WATCHER_ITA_UNCOPYABLE
#include <ITAAtomicOps.h>
#define _WIN32_WINNT 0x0500
#include <windows.h>
typedef union
......
......@@ -3,7 +3,6 @@
#include "ITACriticalSectionImpl.h"
#define _WIN32_WINNT 0x0500
#include <windows.h>
class ITACriticalSectionWin32Impl : public ITACriticalSectionImpl {
......
......@@ -12,7 +12,6 @@
#include <cmath>
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include "ITAException.h"
......
......@@ -4,7 +4,6 @@
#include <ITAException.h>
#define _WIN32_WINNT 0x0500
#include <windows.h>
ITAWinPCClock* ITAWinPCClock::m_pInstance = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment