Advertisement
Guest User

OptionParser.cpp

a guest
Feb 17th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement