mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 11:19:19 +02:00
linux support
This commit is contained in:
25
parser.h
25
parser.h
@@ -35,12 +35,6 @@ class cParser //: public std::stringstream
|
||||
template <typename Type_>
|
||||
cParser&
|
||||
operator>>( Type_ &Right );
|
||||
template <>
|
||||
cParser&
|
||||
operator>>( std::string &Right );
|
||||
template <>
|
||||
cParser&
|
||||
operator>>( bool &Right );
|
||||
template <typename _Output>
|
||||
_Output
|
||||
getToken( bool const ToLower = true )
|
||||
@@ -50,12 +44,6 @@ class cParser //: public std::stringstream
|
||||
*this >> output;
|
||||
return output;
|
||||
};
|
||||
template <>
|
||||
bool
|
||||
getToken<bool>( bool const ToLower ) {
|
||||
|
||||
return ( getToken<std::string>() == "true" );
|
||||
}
|
||||
inline void ignoreToken()
|
||||
{
|
||||
readToken();
|
||||
@@ -109,6 +97,19 @@ class cParser //: public std::stringstream
|
||||
std::deque<std::string> tokens;
|
||||
};
|
||||
|
||||
template <> inline
|
||||
cParser&
|
||||
cParser::operator>>( std::string &Right );
|
||||
template <> inline
|
||||
cParser&
|
||||
cParser::operator>>( bool &Right );
|
||||
template <> inline
|
||||
bool
|
||||
cParser::getToken<bool>( bool const ToLower ) {
|
||||
return ( getToken<std::string>() == "true" );
|
||||
}
|
||||
|
||||
|
||||
template<typename Type_>
|
||||
cParser&
|
||||
cParser::operator>>( Type_ &Right ) {
|
||||
|
||||
Reference in New Issue
Block a user