nim_duilib/tool_kits/shared/cmd_line.h

30 lines
626 B
C
Raw Normal View History

2019-04-19 17:19:57 +08:00
#ifndef SHARED_CMD_LINE_H_
#define SHARED_CMD_LINE_H_
#include <string>
#include <map>
namespace shared
{
class CommandLine
{
public:
CommandLine(const std::wstring &cmd);
~CommandLine();
bool Get(const std::wstring &key, std::wstring &value);
bool IsExist(const std::wstring &key);
std::map<std::wstring, std::wstring> GetMap(void);
protected:
// <20>򵥽<EFBFBD>cmd<6D><64>'/'<27>ָ<D6B8><EEA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'/'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
static bool Parse(const std::wstring &cmd, std::map<std::wstring, std::wstring> &param_map);
protected:
std::wstring cmd_;
std::map<std::wstring, std::wstring> map_;
};
}//namespace shared
#endif //SHARED_CMD_LINE_H_