Added CommandLine data accessors.

This commit is contained in:
Branimir Karadžić
2017-09-25 17:50:40 -07:00
parent d75a95aa4f
commit 0aba6a7ba7
2 changed files with 16 additions and 0 deletions

View File

@@ -60,6 +60,12 @@ namespace bx
///
bool hasArg(bool& _value, const char _short, const char* _long = NULL) const;
///
int32_t getNum() const;
///
char const* get(int32_t _idx) const;
private:
///
const char* find(int32_t _skip, const char _short, const char* _long, int32_t _numParams) const;

View File

@@ -319,4 +319,14 @@ namespace bx
return NULL;
}
int32_t CommandLine::getNum() const
{
return m_argc;
}
char const* CommandLine::get(int32_t _idx) const
{
return m_argv[_idx];
}
} // namespace bx