last_getopt_handlers.h 814 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "last_getopt_support.h"
  3. #include <util/string/split.h>
  4. #include <util/system/compiler.h>
  5. namespace NLastGetopt {
  6. /// Handler to split option value by delimiter into a target container.
  7. template <class Container>
  8. struct TOptSplitHandler;
  9. /// Handler to split option value by delimiter into a target container and allow ranges.
  10. template <class Container>
  11. struct TOptRangeSplitHandler;
  12. /// Handler to parse key-value pairs (default delimiter is '=') and apply user-supplied handler to each pair
  13. template <class TpFunc>
  14. struct TOptKVHandler;
  15. [[noreturn]] void PrintUsageAndExit(const TOptsParser* parser);
  16. [[noreturn]] void PrintVersionAndExit(const TOptsParser* parser);
  17. [[noreturn]] void PrintShortVersionAndExit(const TString& appName);
  18. }