aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/last_getopt_easy_setup.h
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /library/cpp/getopt/small/last_getopt_easy_setup.h
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt/small/last_getopt_easy_setup.h')
-rw-r--r--library/cpp/getopt/small/last_getopt_easy_setup.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/getopt/small/last_getopt_easy_setup.h b/library/cpp/getopt/small/last_getopt_easy_setup.h
index 60dddda225..8baa889a87 100644
--- a/library/cpp/getopt/small/last_getopt_easy_setup.h
+++ b/library/cpp/getopt/small/last_getopt_easy_setup.h
@@ -1,8 +1,8 @@
-#pragma once
-
-#include "last_getopt_opts.h"
-
-namespace NLastGetopt {
+#pragma once
+
+#include "last_getopt_opts.h"
+
+namespace NLastGetopt {
/**
* Wrapper for TOpts class to make the life a bit easier.
* Usual usage:
@@ -21,25 +21,25 @@ namespace NLastGetopt {
TEasySetup(const TStringBuf& optstring = TStringBuf());
TEasySetup& operator()(char shortName, const char* longName, const char* help, bool required = false);
TEasySetup& operator()(char shortName, const char* longName, const char* argName, const char* help, bool required = false);
-
+
template <class TpFunc>
TEasySetup& operator()(char shortName, const char* longName, TpFunc handler, const char* help, bool required = false) {
AdjustParam(longName, help, nullptr, handler, required).AddShortName(shortName);
return *this;
}
-
+
TEasySetup& operator()(const char* longName, const char* help, bool required = false);
TEasySetup& operator()(const char* longName, const char* argName, const char* help, bool required = false);
-
+
template <class TpFunc>
TEasySetup& operator()(const char* longName, TpFunc handler, const char* help, bool required = false) {
AdjustParam(longName, help, nullptr, handler, required);
return *this;
}
-
+
private:
TOpt& AdjustParam(const char* longName, const char* help, const char* argName, bool required);
-
+
template <class TpFunc>
TOpt& AdjustParam(const char* longName, const char* help, const char* argName, TpFunc handler, bool required) {
TOpt& o = AdjustParam(longName, help, argName, required);
@@ -47,5 +47,5 @@ namespace NLastGetopt {
return o;
}
};
-
-}
+
+}