diff options
| author | NoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com> | 2014-06-16 03:32:09 -0700 |
|---|---|---|
| committer | NoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com> | 2014-06-16 03:32:09 -0700 |
| commit | 8fc42a21fc8ff4528c59e206b24d974982332964 (patch) | |
| tree | a0d9934ca8675afe4bbe5594f2b9694867eb73b6 /src/common | |
| parent | 81cf5650c4c2576c74317b40a6ca57d07645a6f3 (diff) | |
| parent | 9853ba8e0636ba6f1043bb4f52caff19fe54c8ac (diff) | |
| download | monzero-core-8fc42a21fc8ff4528c59e206b24d974982332964.tar.gz monzero-core-8fc42a21fc8ff4528c59e206b24d974982332964.tar.xz monzero-core-8fc42a21fc8ff4528c59e206b24d974982332964.zip | |
Merge branch 'master' of https://github.com/monero-project/bitmonero
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/command_line.cpp | 12 | ||||
| -rw-r--r-- | src/common/command_line.h | 3 | ||||
| -rw-r--r-- | src/common/pod-class.h | 6 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp index 0b90345d9..d507f36a7 100644 --- a/src/common/command_line.cpp +++ b/src/common/command_line.cpp @@ -3,9 +3,21 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "command_line.h" +#include "string_tools.h" namespace command_line { + std::string input_line(const std::string& prompt) + { + std::cout << prompt; + + std::string buf; + std::getline(std::cin, buf); + + return epee::string_tools::trim(buf); + + } + const arg_descriptor<bool> arg_help = {"help", "Produce help message"}; const arg_descriptor<bool> arg_version = {"version", "Output version information"}; const arg_descriptor<std::string> arg_data_dir = {"data-dir", "Specify data directory"}; diff --git a/src/common/command_line.h b/src/common/command_line.h index 860653772..a6f78569c 100644 --- a/src/common/command_line.h +++ b/src/common/command_line.h @@ -14,6 +14,9 @@ namespace command_line { + + std::string input_line(const std::string& prompt); + template<typename T, bool required = false> struct arg_descriptor; diff --git a/src/common/pod-class.h b/src/common/pod-class.h index c07edb208..10d680484 100644 --- a/src/common/pod-class.h +++ b/src/common/pod-class.h @@ -4,8 +4,14 @@ #pragma once +// FIXME: Why is this ifdef needed? Hopefully making it struct won't break things. + +/* #if defined(_MSC_VER) #define POD_CLASS struct #else #define POD_CLASS class #endif +*/ + +#define POD_CLASS struct |
