options.hpp 625B

12345678910111213141516171819202122232425262728
  1. #ifndef IS_OPTIONS_H_
  2. #include <string>
  3. #include <cstdio>
  4. namespace slrn {
  5. class Options {
  6. public:
  7. Options();
  8. int parseOptions( int argc, char** argv );
  9. void printHelp();
  10. int m_borderSize;
  11. int m_padding;
  12. int m_tolerance;
  13. std::string m_xdisplay;
  14. private:
  15. int parseInt( std::string arg, int* returnInt );
  16. int parseString( std::string arg, std::string* returnString );
  17. bool matches( std::string arg, std::string shorthand, std::string longhand );
  18. };
  19. }
  20. extern slrn::Options* options;
  21. #endif // IS_OPTIONS_H_