diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-11-20 14:10:33 -0500 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-11-20 14:10:33 -0500 |
| commit | 902c8c38d261b1e73329ab4b9fefcfe11995c8b7 (patch) | |
| tree | aef3b8de4aaafa64376b74b1ba4a0aa2b2cf47cc /node | |
| parent | 14b0639181f8da7eeb42970b38b0d0701e9ddae6 (diff) | |
| download | infinitytier-902c8c38d261b1e73329ab4b9fefcfe11995c8b7.tar.gz infinitytier-902c8c38d261b1e73329ab4b9fefcfe11995c8b7.zip | |
UI basically works, almost ready for testing and packaging...
Diffstat (limited to 'node')
| -rw-r--r-- | node/Node.cpp | 5 | ||||
| -rw-r--r-- | node/Node.hpp | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index fe8cfb18..c88741a6 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -182,6 +182,11 @@ unsigned long Node::LocalClient::send(const char *command) } } +std::vector<std::string> Node::LocalClient::splitLine(const char *line) +{ + return Utils::split(line," ","\\","\""); +} + struct _NodeImpl { RuntimeEnvironment renv; diff --git a/node/Node.hpp b/node/Node.hpp index 238b5fce..2f7d43ed 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -71,6 +71,15 @@ public: unsigned long send(const char *command) throw(); + /** + * Split a line of results by space + * + * @param line Line to split + * @return Vector of fields + */ + static std::vector<std::string> splitLine(const char *line); + static inline std::vector<std::string> splitLine(const std::string &line) { return splitLine(line.c_str()); } + private: // LocalClient is not copyable LocalClient(const LocalClient&); @@ -140,7 +149,7 @@ public: /** * Get the ZeroTier version in major.minor.revision string format - * + * * @return Version in string form */ static const char *versionString() |
