HyperDbg Debugger
Loading...
Searching...
No Matches
inipp Namespace Reference

Namespaces

namespace  detail
 

Classes

class  Format
 
class  Ini
 

Functions

template<typename CharT , typename T >
bool extract (const std::basic_string< CharT > &value, T &dst)
 
template<typename CharT >
bool extract (const std::basic_string< CharT > &value, std::basic_string< CharT > &dst)
 
template<typename CharT , typename T >
bool get_value (const std::map< std::basic_string< CharT >, std::basic_string< CharT > > &sec, const std::basic_string< CharT > &key, T &dst)
 
template<typename CharT , typename T >
bool get_value (const std::map< std::basic_string< CharT >, std::basic_string< CharT > > &sec, const CharT *key, T &dst)
 

Function Documentation

◆ extract() [1/2]

template<typename CharT >
bool inipp::extract ( const std::basic_string< CharT > & value,
std::basic_string< CharT > & dst )
inline
109{
110 dst = value;
111 return true;
112}

◆ extract() [2/2]

template<typename CharT , typename T >
bool inipp::extract ( const std::basic_string< CharT > & value,
T & dst )
inline
91{
92 CharT c;
93 std::basic_istringstream<CharT> is {value};
94 T result;
95 if ((is >> std::boolalpha >> result) && !(is >> c))
96 {
97 dst = result;
98 return true;
99 }
100 else
101 {
102 return false;
103 }
104}

◆ get_value() [1/2]

template<typename CharT , typename T >
bool inipp::get_value ( const std::map< std::basic_string< CharT >, std::basic_string< CharT > > & sec,
const CharT * key,
T & dst )
inline
127{
128 return get_value(sec, std::basic_string<CharT>(key), dst);
129}
bool get_value(const std::map< std::basic_string< CharT >, std::basic_string< CharT > > &sec, const std::basic_string< CharT > &key, T &dst)
Definition inipp.h:116

◆ get_value() [2/2]

template<typename CharT , typename T >
bool inipp::get_value ( const std::map< std::basic_string< CharT >, std::basic_string< CharT > > & sec,
const std::basic_string< CharT > & key,
T & dst )
inline
117{
118 const auto it = sec.find(key);
119 if (it == sec.end())
120 return false;
121 return extract(it->second, dst);
122}
bool extract(const std::basic_string< CharT > &value, T &dst)
Definition inipp.h:90