Aufgrund eines Security Updates wird GitLab heute zwischen 14:30 und 15:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to a security update GitLab will be temporarily unavailable between 2:30 and 3 today.

Commit c684d74b authored by Fabian Schlieper's avatar Fabian Schlieper

odroid changes

parent fc7518ee
......@@ -116,6 +116,10 @@ set( ITABaseSources
if( WIN32 )
list( APPEND ITABaseHeader "include/ITAHPT.h" "include/ITAMutex.h" "include/ITATimer.h" )
list( APPEND ITABaseSources "src/ITAHPT.cpp" "src/ITAMutex.cpp" "src/ITATimer.cpp" )
else( WIN32)
add_definitions( -DUSE_SIMPLEINI )
list( APPEND ITABaseSources "src/ITAPosixRealtimeClock.cpp" "src/simpleini/SimpleIni.h" "src/simpleini/ConvertUTF.h" "src/simpleini/ConvertUTF.c" )
list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" )
endif( WIN32 )
......@@ -162,15 +166,10 @@ if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAStringUtilsPCRE.cpp" )
add_definitions( -DPCRE_STATIC )
else( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND ITABaseSources "src/ITAStringUtils.cpp" )
list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAStringUtils.cpp" )
endif( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
if( VSIMPLEINI_FOUND AND ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
message( FATAL_ERROR "ITABase old config implementation requires regular expressions. Please activate." )
endif( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" )
endif( VSIMPLEINI_FOUND AND ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
......@@ -197,6 +196,10 @@ else( NOT ITA_CORE_LIBS_BUILD_STATIC )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
if( NOT WIN32 )
add_definitions( -std=gnu++11 )
endif()
# linker
add_library( ITABase ${ITABaseHeader} ${ITABaseSources} )
target_link_libraries( ITABase ${VISTA_USE_PACKAGE_LIBRARIES} )
......
......@@ -201,6 +201,12 @@ ITA_BASE_API std::string INIFileReadString(const std::string& sINIFilename,
const std::string& sKey,
std::string sDefaultValue="");
//! Mit Kommas getrennte Liste von Strings aus INI-Datei lesen
ITA_BASE_API std::vector<std::string> INIFileReadStringList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator=',');
//! Mit Kommas getrennte Liste von int-Werten aus INI-Datei lesen und in template Enum-Typ konvertieren
template <typename TEnum>
std::vector<TEnum> INIFileReadEnumList(const std::string& sINIFilename,
......@@ -241,11 +247,7 @@ ITA_BASE_API std::vector<double> INIFileReadDoubleList(const std::string& sINIFi
const std::string& sKey,
char cSeparator=',');
//! Mit Kommas getrennte Liste von Strings aus INI-Datei lesen
ITA_BASE_API std::vector<std::string> INIFileReadStringList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator=',');
/* +-----------------------------------------------------------------------------------------+
* | |
......
......@@ -134,8 +134,7 @@ template <class T> void ITABufferedDataLogger<T>::log(const T& oLogItem) {
m_vLogItems.push_back(oLogItem);
}
template <class T> void ITABufferedDataLogger<T>::store(std::string sFilename)
{
template <class T> void ITABufferedDataLogger<T>::store(const std::string& sFilename) {
std::ofstream os(sFilename.c_str(), std::ios::out | std::ios::trunc | std::ios::binary);
if (!os.is_open())
ITA_EXCEPT1(IO_ERROR, std::string("Could not create log output file \"") + sFilename + std::string("\""));
......
......@@ -27,7 +27,13 @@
#endif
#include <string>
#ifdef WIN32
#include <windows.h>
#else
#include <stdio.h>
#include <linux/types.h>
#define __int64 int64_t
#endif
// Definition des Datentyps für Timerticks
typedef __int64 ITATimerTicks;
......
......@@ -26,7 +26,7 @@
#include <string>
#include <vector>
#include <sstream>
// Konvertierungsklasse
class ITA_BASE_API ITAConversion
......
......@@ -5,7 +5,7 @@
#include <iomanip>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <ITAStringUtils.h>
......
/*
+-----------------------------------------------------------------------+
| |
| ITAToolkit |
| |
| (c) Copyright Institut für technische Akustik (ITA) |
| Aachen university of technology (RWTH), 2005-2008 |
| |
+-----------------------------------------------------------------------+
| |
| File: ITAAtomicOps.cpp |
| Purpose: Atomare Grundfunktionen für non-blocking concurrency |
| Authors: Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de |
| |
+-----------------------------------------------------------------------+
*/
// $Id: ITAAtomicOpsGCCBuiltinsImpl.cpp 3454 2013-08-21 14:40:16Z stienen $
#include "ITAAtomicOps.h"
#include <stdint.h>
typedef union {
int32_t i32Value;
float floatValue;
} ConvI32Float;
int atomic_read_int(volatile const int* src)
{
/*
* Trick: Realisierung mittels CAS!
* Falls der Wert schon 0, dann wird er gegen 0 ausgetauscht...
* Also keine Änderung!
*/
return __sync_val_compare_and_swap( (int*) src, 0, 0 );
}
float atomic_read_float(volatile const float* src) {
/*
* Trick: Realisierung mittels CAS!
* Falls der Wert schon 0, dann wird er gegen 0 ausgetauscht...
* Also keine �nderung!
*
* Info: Auf manchen Architekturen ist InterlockedAdd(src, 0) schneller.
* Leider steht InterlockedAdd nur auf Itanium-Arch. zur Verf�gung.
*/
ConvI32Float c;
c.i32Value = __sync_val_compare_and_swap((volatile int32_t*) src, 0, 0);
return c.floatValue;
}
void* atomic_read_ptr(volatile const void** src) {
/*
* Trick: Realisierung mittels CAS!
* Falls der Wert schon 0, dann wird er gegen 0 ausgetauscht...
* Also keine Änderung!
*/
return __sync_val_compare_and_swap((void**) src, 0, 0);
}
void atomic_write_int(volatile int* dest, int value) {
__sync_lock_test_and_set(dest, value);
}
void atomic_write_float(volatile float* dest, float value) {
ConvI32Float c;
c.floatValue = value;
__sync_lock_test_and_set((volatile int32_t*) dest, c.i32Value);
}
void atomic_write_ptr(volatile void** dest, void* value) {
__sync_lock_test_and_set(dest, value);
}
bool atomic_cas_int(volatile int* dest, int expected_value, int new_value) {
return __sync_bool_compare_and_swap(dest, expected_value, new_value);
}
/*
bool atomic_cas_double(volatile double* dest, double expected_value, double new_value) {
return __sync_bool_compare_and_swap(dest, expected_value, new_value);
}
*/
bool atomic_cas_ptr(volatile void** dest, void* expected_value, void* new_value) {
return __sync_bool_compare_and_swap(dest, expected_value, new_value);
}
void atomic_read32(volatile void* src, void* dest) {
*((int32_t*) dest) = __sync_val_compare_and_swap((volatile int32_t*) src, 0, 0);
}
bool atomic_cas32(volatile void* dest, void* expected_value, void* new_value)
{
return __sync_bool_compare_and_swap( &dest, expected_value, new_value );
//return __sync_bool_compare_and_swap( (volatile int32_t*)dest, (int32_t*)expected_value, (int32_t*)new_value );
}
int atomic_inc_int(volatile int* dest) {
return __sync_fetch_and_add(dest, 1);
}
int atomic_dec_int(volatile int* dest) {
return __sync_fetch_and_sub(dest, 1);
}
/*
+-----------------------------------------------------------------------+
| |
| ITAToolkit |
| |
| (c) Copyright Institut für technische Akustik (ITA) |
| Aachen university of technology (RWTH), 2005-2008 |
| |
+-----------------------------------------------------------------------+
| |
| File: ITAAtomicOps.cpp |
| Purpose: Atomare Grundfunktionen für non-blocking concurrency |
| Authors: Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de |
| |
+-----------------------------------------------------------------------+
*/
// $Id: ITAAtomicOpsGCCBuiltinsImpl.cpp 3454 2013-08-21 14:40:16Z stienen $
#include "ITAAtomicOps.h"
#include <stdint.h>
typedef union {
int32_t i32Value;
float floatValue;
} ConvI32Float;
int atomic_read_int(volatile const int* src)
{
/*
* Trick: Realisierung mittels CAS!
* Falls der Wert schon 0, dann wird er gegen 0 ausgetauscht...
* Also keine Änderung!
*/
return __sync_val_compare_and_swap( (int*) src, 0, 0 );
}
float atomic_read_float(volatile const float* src) {
/*
* Trick: Realisierung mittels CAS!
* Falls der Wert schon 0, dann wird er gegen 0 ausgetauscht...
* Also keine �nderung!
*
* Info: Auf manchen Architekturen ist InterlockedAdd(src, 0) schneller.
* Leider steht InterlockedAdd nur auf Itanium-Arch. zur Verf�gung.
*/
ConvI32Float c;
c.i32Value = __sync_val_compare_and_swap((volatile int32_t*) src, 0, 0);
return c.floatValue;
}
void* atomic_read_ptr(volatile const void** src) {
/*
* Trick: Realisierung mittels CAS!
* Falls der Wert schon 0, dann wird er gegen 0 ausgetauscht...
* Also keine Änderung!
*/
return __sync_val_compare_and_swap((void**) src, 0, 0);
}
void atomic_write_int(volatile int* dest, int value) {
__sync_lock_test_and_set(dest, value);
}
void atomic_write_float(volatile float* dest, float value) {
ConvI32Float c;
c.floatValue = value;
__sync_lock_test_and_set((volatile int32_t*) dest, c.i32Value);
}
void atomic_write_ptr(volatile void** dest, void* value) {
__sync_lock_test_and_set(dest, value);
}
bool atomic_cas_int(volatile int* dest, int expected_value, int new_value) {
return __sync_bool_compare_and_swap(dest, expected_value, new_value);
}
/*
bool atomic_cas_double(volatile double* dest, double expected_value, double new_value) {
return __sync_bool_compare_and_swap(dest, expected_value, new_value);
}
*/
bool atomic_cas_ptr(volatile void** dest, void* expected_value, void* new_value) {
return __sync_bool_compare_and_swap(dest, expected_value, new_value);
}
void atomic_read32(volatile void* src, void* dest) {
*((int32_t*) dest) = __sync_val_compare_and_swap((volatile int32_t*) src, 0, 0);
}
bool atomic_cas32(volatile void* dest, void* expected_value, void* new_value) {
return __sync_bool_compare_and_swap((volatile int32_t*)dest, *(int32_t*)expected_value, *(int32_t*)new_value);
}
int atomic_inc_int(volatile int* dest) {
return __sync_fetch_and_add(dest, 1);
}
int atomic_dec_int(volatile int* dest) {
return __sync_fetch_and_sub(dest, 1);
}
#include "ITAAudiofileCommon.h"
#include <cstdio>
std::string toString( ITAQuantization eQuantization )
{
switch( eQuantization )
{
case ITAQuantization::ITA_INT16: return "Integer with 16-Bit";
case ITAQuantization::ITA_INT20: return "Integer with 20-Bit";
case ITAQuantization::ITA_INT24: return "Integer with 24-Bit";
case ITAQuantization::ITA_INT32: return "Integer with 32-Bit";
case ITAQuantization::ITA_FLOAT: return "Floating point with 32-Bit";
case ITAQuantization::ITA_DOUBLE: return "Floating point with 64-Bit";
default: return "Unkown";
}
}
std::string toString( ITADomain eDomain )
{
return ( eDomain == ITADomain::ITA_TIME_DOMAIN ? "Zeitbereich" : "Frequenzbereich" );
}
void print( const ITAAudiofileProperties& props )
{
printf( "%s | %0.1f Hz | %i channels | %s | length: %i Samples",
toString( props.eDomain ).c_str(),
props.dSampleRate,
props.iChannels,
toString( props.eQuantization ).c_str(),
props.iLength );
if( !props.sComment.empty() )
printf( " | Comment: \"%s\"", props.sComment.c_str() );
printf( "\n" );
}
#include "ITAAudiofileCommon.h"
#include <cstdio>
std::string toString( ITAQuantization eQuantization )
{
switch( eQuantization )
{
case ITAQuantization::ITA_INT16: return "Integer with 16-Bit";
case ITAQuantization::ITA_INT20: return "Integer with 20-Bit";
case ITAQuantization::ITA_INT24: return "Integer with 24-Bit";
case ITAQuantization::ITA_INT32: return "Integer with 32-Bit";
case ITAQuantization::ITA_FLOAT: return "Floating point with 32-Bit";
case ITAQuantization::ITA_DOUBLE: return "Floating point with 64-Bit";
default: return "Unkown";
}
}
std::string toString( ITADomain eDomain )
{
return ( eDomain == ITADomain::ITA_TIME_DOMAIN ? "time domain" : "frequency domain" );
}
void print( const ITAAudiofileProperties& props )
{
printf( "%s | %0.1f Hz | %i channels | %s | length: %i Samples",
toString( props.eDomain ).c_str(),
props.dSampleRate,
props.iChannels,
toString( props.eQuantization ).c_str(),
props.iLength );
if( !props.sComment.empty() )
printf( " | Comment: \"%s\"", props.sComment.c_str() );
printf( "\n" );
}
#include <ITAConfigUtils.h>
#include <ITAException.h>
#include <ITAFilesystemUtils.h>
#include <ITAStringUtils.h>
#include <cstdlib>
std::string sCurrentINIFile = "";
std::string sCurrentSection = "";
bool INIFileExists(const std::string& sINIFilename) {
// Nur pr�fen ob die Datei existiert
return doesFileExist(sINIFilename);
}
bool INIFileSectionExists(const std::string& sINIFilename, const std::string& sSection) {
std::vector<std::string> vsSects = INIFileGetSections(sINIFilename);
std::string s = toUppercase(sSection);
for (unsigned int i=0; i<vsSects.size(); i++)
if (toUppercase(vsSects[i]).compare(s) == 0) return true;
return false;
}
bool INIFileKeyExists(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey) {
std::vector<std::string> vsKeys = INIFileGetKeys(sINIFilename, sSection);
std::string s = toUppercase(sKey);
for (unsigned int i=0; i<vsKeys.size(); i++)
if (toUppercase(vsKeys[i]).compare(s) == 0) return true;
return false;
}
void INIFileUseFile(const std::string& sINIFilename) {
// Sicherstellen das die INI-Datei existiert
// [fwe 2008-11-07] Bugfix, baby! Das geht beim reinen Schreiben nicht: INIFileRequireINIFile(sINIFilename);
sCurrentINIFile = sINIFilename;
}
void INIFileUseSection(const std::string& sSection) {
// Sicherstellen das die Sektion existiert
// [fwe 2008-11-07] Bugfix, baby! Das geht beim reinen Schreiben nicht: INIFileRequireSection(sCurrentINIFile, sSection);
sCurrentSection = sSection;
}
bool INIFileUseSectionIfExists(const std::string& sSection) {
if (INIFileSectionExists(sSection)) {
INIFileUseSection(sSection);
return true;
}
return false;
}
void INIFileUseNothing() {
sCurrentINIFile = "";
sCurrentSection = "";
}
/* +-----------------------------------------------------------------------------------------+
* | |
* | Assertion-Funktionen: Lösen Ausnahmen aus, falls Bedingungen nicht erfüllt sind. |
* | |
* +-----------------------------------------------------------------------------------------+ */
void INIFileRequireINIFile(const std::string& sINIFilename) {
if (sINIFilename.size() == 0)
ITA_EXCEPT1(INVALID_PARAMETER, "INI file name can not be an empty string");
if (!doesPathExist(sINIFilename))
ITA_EXCEPT1(FILE_NOT_FOUND, std::string("INI file \"") + sINIFilename + std::string("\" not found"));
if (!isFile(sINIFilename))
ITA_EXCEPT1(FILE_NOT_FOUND, std::string("The path \"") + sINIFilename + std::string("\" does not point to a file"));
}
void INIFileRequireSection(const std::string& sINIFilename, const std::string& sSection) {
if (!INIFileSectionExists(sINIFilename, sSection))
ITA_EXCEPT1(IO_ERROR, std::string("INI file \"") + sINIFilename + std::string("\" is missing a [") + sSection + std::string("] section"));
}
void INIFileRequireKey(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey) {
INIFileRequireSection(sINIFilename, sSection);
if (!INIFileKeyExists(sINIFilename, sSection, sKey))
ITA_EXCEPT1(IO_ERROR, std::string("In INI file \"") + sINIFilename + std::string("\" section [") + sSection + std::string("]: Missing a \"") + sKey + std::string("\" key"));
}
void INIFileRequireNonemptyKey(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey) {
// Abgebildet �ber die explizite String-Lesefunktion (Ergebnis wegschmeissen)
INIFileReadStringExplicit(sINIFilename, sSection, sKey);
}
/* +----------------------------------------------------------------------------------------------+
* | |
* | Implizite Lese-Funktionen |
* | |
* +----------------------------------------------------------------------------------------------+ */
int INIFileReadInt(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey, int iDefaultValue) {
std::string s = INIFileReadString(sINIFilename, sSection, sKey);
return (s.empty() ? iDefaultValue : StringToInt(s));
}
unsigned int INIFileReadUInt(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey, unsigned int uiDefaultValue) {
std::string s = INIFileReadString(sINIFilename, sSection, sKey);
return (s.empty() ? uiDefaultValue : StringToUInt(s));
}
long INIFileReadLong(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey, long lDefaultValue) {
std::string s = INIFileReadString(sINIFilename, sSection, sKey);
return (s.empty() ? lDefaultValue : (long) StringToInt(s));
}
float INIFileReadFloat(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey, float fDefaultValue) {
std::string s = INIFileReadString(sINIFilename, sSection, sKey);
return (s.empty() ? fDefaultValue : StringToFloat(s));
}
double INIFileReadDouble(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey, double dDefaultValue) {
std::string s = INIFileReadString(sINIFilename, sSection, sKey);
return (s.empty() ? dDefaultValue : StringToFloat(s));
}
bool INIFileReadBool(const std::string& sINIFilename, const std::string& sSection, const std::string& sKey, bool bDefaultValue) {
std::string s = toUppercase( INIFileReadString(sINIFilename, sSection, sKey, (bDefaultValue ? "yes" : "no") ) );
int i = -1;
if (s == "TRUE") i=1;
if (s == "YES") i=1;
if (s == "ENABLED") i=1;
if (s == "JA") i=1;
if (s == "1") i=1;
if (s == "JO") i=1;
if (s == "SIGGI") i=1;
if (s == "I LIKE") i=1;
if (s == "MAG ICH") i=1;
if (s == "FREILICH") i=1;
if (s == "KLAR") i=1;
if (s == "JAWOHL") i=1;
if (s == "SELBSTVERSTÄNDLICH") i=1;
if (s == "TOP") i=1;
if (s == "FALSE") i=0;
if (s == "NO") i=0;
if (s == "DISABLED") i=0;
if (s == "NEIN") i=0;
if (s == "0") i=0;
if (s == "NÖ") i=0;
if (s == "NOPE") i=0;
if (s == "I DONT LIKE") i=0;
if (s == "MAG ICH NICHT") i=0;
if (s == "LASS DAS") i=0;
if (s == "VETO") i=1;
if (i==-1)
ITA_EXCEPT1(IO_ERROR, std::string("In INI file \"") + sINIFilename + std::string("\" section [") + sSection + std::string("] key \"") + sKey + std::string("\": Invalid value (\"" + s + "\") for a boolean key"));
return (i==1);
}
std::vector<int> INIFileReadIntList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator) {
std::vector<std::string> vin = INIFileReadStringList(sINIFilename, sSection, sKey, cSeparator);
std::vector<int> vout;
for (std::vector<std::string>::const_iterator cit = vin.begin(); cit != vin.end(); cit++)
vout.push_back(atoi((*cit).c_str()));
return vout;
}
std::vector<unsigned int> INIFileReadUIntList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator) {
std::vector<std::string> vin = INIFileReadStringList(sINIFilename, sSection, sKey, cSeparator);
std::vector<unsigned int> vout;
for (std::vector<std::string>::const_iterator cit = vin.begin(); cit != vin.end(); cit++) {
int i = atoi((*cit).c_str());
vout.push_back((i >= 0 ? (unsigned int) i : 0));
}
return vout;
}
std::vector<float> INIFileReadFloatList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator) {
std::vector<std::string> vin = INIFileReadStringList(sINIFilename, sSection, sKey, cSeparator);
std::vector<float> vout;
for (std::vector<std::string>::const_iterator cit = vin.begin(); cit != vin.end(); cit++)
vout.push_back((float) atof((*cit).c_str()));
return vout;
}
std::vector<double> INIFileReadDoubleList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator) {
std::vector<std::string> vin = INIFileReadStringList(sINIFilename, sSection, sKey, cSeparator);
std::vector<double> vout;
for (std::vector<std::string>::const_iterator cit = vin.begin(); cit != vin.end(); cit++)
vout.push_back(atof((*cit).c_str()));
return vout;
}
std::vector<std::string> INIFileReadStringList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator) {
std::string s = INIFileReadString(sINIFilename, sSection, sKey);
std::vector<std::string> v;
int a = 0;
int b = (int) s.find(cSeparator, 0);
// Kein Separator gefunden?
if (b == (int) s.npos) {
// Falls der String nicht leer ist, kommt er als einziges Element in den Vektor
std::string t = stripSpaces(s);
if (!t.empty()) v.push_back(t);
return v;
}
// Mindestens ein Separator enthalten!
do {
// Gefundenen Substring von Leerr�umen befreien und speichern
// Wichtig: Hier wird auch gespeichert, wenn der Substring leer ist
// da wir hier zwischen zwei Separatoren sind.
v.push_back(stripSpaces(s.substr(a, b-a)));
a = b+1;
} while ((b = (int) s.find(cSeparator, a)) != (int) s.npos);
// Den Rest speichern
v.push_back(stripSpaces(s.substr(a, s.length()-a)));
return v;
}
/* +-----------------------------------------------------------------------------------------+
* | |
* | Explizite Lese-Funktionen. |
* | |
* +-----------------------------------------------------------------------------------------+ */
int INIFileReadIntExplicit(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey) {
std::string s = INIFileReadStringExplicit(sINIFilename, sSection, sKey);
return StringToInt(s);
}
unsigned int INIFileReadUIntExplicit(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey) {
std::string s = INIFileReadStringExplicit(sINIFilename, sSection, sKey);
return StringToUInt(s);
}
long INIFileReadLongExplicit(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey) {
std::string s = INIFileReadStringExplicit(sINIFilename, sSection, sKey);
return (long) StringToInt(s);
}
float INIFileReadFloatExplicit(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey) {
std::string s = INIFileReadStringExplicit(sINIFilename, sSection, sKey);
return StringToFloat(s);
}