~peter-gjoel/verifydtapn/WorkflowRefactor

« back to all changes in this revision

Viewing changes to src/Core/ArgsParser.cpp

  • Committer: Peter Gjøl Jensen
  • Date: 2015-06-14 22:28:12 UTC
  • mfrom: (324.2.2 verifydtapn)
  • Revision ID: peter.gjoel@gmail.com-20150614222812-rydepnzis7j50x6h
Merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
        return result;
391
391
}
392
392
 
 
393
unsigned long long ArgsParser::tryParseLongLong(const option& option) const {
 
394
        unsigned long long result = 0;
 
395
        try {
 
396
                result = boost::lexical_cast<unsigned long long>(option.second);
 
397
        } catch (boost::bad_lexical_cast & e) {
 
398
                std::cout << "Invalid value '" << option.second << "' for option '--"
 
399
                                << option.first << "'" << std::endl;
 
400
                exit(1);
 
401
        }
 
402
        return result;
 
403
}
 
404
 
393
405
std::vector<std::string> ArgsParser::parseIncPlaces(
394
406
                const std::string& string) const {
395
407
        std::vector<std::string> vec;
432
444
                        tryParseInt(*map.find(WORKFLOW)));
433
445
        
434
446
        assert(map.find(STRONG_WORKFLOW_BOUND) != map.end());
435
 
        unsigned int workflowBound = tryParseInt(*map.find(STRONG_WORKFLOW_BOUND));
 
447
        unsigned long long workflowBound = tryParseLongLong(*map.find(STRONG_WORKFLOW_BOUND));
436
448
 
437
449
        
438
450
        assert(map.find(GCD) != map.end());