Include :
- aggiornamenti e aggiunta ImportCNC.
This commit is contained in:
+9
-4
@@ -66,6 +66,11 @@ IsEmptyOrSpaces( const std::string& sName)
|
||||
{ return ( sName.empty() ||
|
||||
sName.find_first_not_of( " \t\r\n") == std::string::npos) ; }
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
IsNullOrSpace( char cChar)
|
||||
{ return ( cChar == '\0' || cChar == ' ' || cChar == '\t' || cChar == '\r' || cChar == '\n') ; }
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
IsValidName( const std::string& sName)
|
||||
@@ -88,7 +93,7 @@ FromString( const std::string& sVal, int& nVal)
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
nVal = strtol( pStart, &pStop, 10) ;
|
||||
return ( pStop != pStart && *pStop == '\0' && errno == 0) ; }
|
||||
return ( pStop != pStart && errno == 0) ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, bool& bVal)
|
||||
{ int nTmp ;
|
||||
@@ -102,7 +107,7 @@ FromString( const std::string& sVal, double& dVal)
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
dVal = strtod( pStart, &pStop) ;
|
||||
return ( pStop != pStart && *pStop == '\0' && errno == 0) ; }
|
||||
return ( pStop != pStart && errno == 0) ; }
|
||||
template <size_t size>
|
||||
bool FromString( const std::string& sVal, int (&nVal)[size])
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
@@ -114,7 +119,7 @@ bool FromString( const std::string& sVal, int (&nVal)[size])
|
||||
return false ;
|
||||
pStart = pStop + 1 ;
|
||||
}
|
||||
return ( *pStop == '\0' && errno == 0) ;
|
||||
return ( errno == 0) ;
|
||||
}
|
||||
template <size_t size>
|
||||
bool FromString( const std::string& sVal, double (&dVal)[size])
|
||||
@@ -127,7 +132,7 @@ bool FromString( const std::string& sVal, double (&dVal)[size])
|
||||
return false ;
|
||||
pStart = pStop + 1 ;
|
||||
}
|
||||
return ( *pStop == '\0' && errno == 0) ;
|
||||
return ( errno == 0) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user