Skip to content
Snippets Groups Projects
Commit d71df77e authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Initfile parser - small changes

parent 9cb97640
No related branches found
No related tags found
No related merge requests found
...@@ -122,7 +122,8 @@ namespace AMDiS { ...@@ -122,7 +122,8 @@ namespace AMDiS {
template< typename T > template< typename T >
inline void convert(const std::string valStr, T& value , inline void convert(const std::string valStr, T& value ,
typename boost::enable_if< boost::is_pod< T > >::type* p = NULL , typename boost::enable_if< boost::is_pod< T > >::type* p = NULL ,
typename boost::disable_if< boost::is_enum< T > >::type* p2 = NULL ) { typename boost::disable_if< boost::is_enum< T > >::type* p2 = NULL )
{
using boost::lexical_cast; using boost::lexical_cast;
try { try {
...@@ -134,7 +135,8 @@ namespace AMDiS { ...@@ -134,7 +135,8 @@ namespace AMDiS {
template< typename T > template< typename T >
inline void convert(const std::string valStr, T& value, inline void convert(const std::string valStr, T& value,
typename boost::enable_if< boost::is_enum< T > >::type* p = NULL) { typename boost::enable_if< boost::is_enum< T > >::type* p = NULL)
{
unsigned int swap= 0; unsigned int swap= 0;
try { try {
...@@ -243,6 +245,10 @@ struct Initfile : public std::map< std::string, std::string > { ...@@ -243,6 +245,10 @@ struct Initfile : public std::map< std::string, std::string > {
* @param in: filename string * @param in: filename string
*/ */
static void init(std::string in); static void init(std::string in);
static void init(int print, string filename, const char *flags = NULL) {
WARNING("Parameters::init(int,std::string,const char*) is depreciated. Use Parameters::init(std::string) instead!\n");
init(filename);
}
/** Static get routine for getting parameter-values from init-file initialized in init()-method. /** Static get routine for getting parameter-values from init-file initialized in init()-method.
* Cast the value to the desired type using std::stringstream. * Cast the value to the desired type using std::stringstream.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment