SHARE
TWEET

OptionParser.cpp

a guest Feb 17th, 2020 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "OptionParser.hpp"
  2. #include<cstdio>
  3.  
  4. OptionParser::OptionParser()
  5. {
  6.     initializeMap();
  7. }
  8.  
  9. OptionParser::~OptionParser()
  10. {
  11.     //
  12. }
  13.  
  14. void OptionParser::initializeMap()
  15. {
  16.     try
  17.     {
  18.         if(mapInitialized)
  19.             __throw_bad_function_call("initializeMap() function called twice!");
  20.     }
  21.     catch(const std::bad_function_call& e)
  22.     {
  23.         printf("%s\n",e.what());
  24.     }
  25.     catch(...)
  26.     {
  27.         printf("Unknown error occured!\n")
  28.     }
  29.     u["-1"]=128;
  30.     u["-2"]=129;
  31.     u["-3"]=130;
  32.     u["-4"]=131;
  33.     this->mapInitialized=true;
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top