mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
39 lines
909 B
C++
39 lines
909 B
C++
/************************************
|
|
* file enc : ascii
|
|
* author : wuyanyi09@gmail.com
|
|
************************************/
|
|
|
|
#ifndef CPPCOMMON_ARGV_FUNCTS_H
|
|
#define CPPCOMMON_ARGV_FUNCTS_H
|
|
|
|
#include <set>
|
|
#include <sstream>
|
|
#include "str_functs.h"
|
|
#include "map_functs.h"
|
|
#include "vec_functs.h"
|
|
|
|
namespace CPPCOMMON
|
|
{
|
|
using namespace std;
|
|
bool getArgvMap(int argc, const char* const* argv, map<string, string>& mpss);
|
|
class ArgvContext
|
|
{
|
|
public :
|
|
ArgvContext(int argc, const char* const * argv);
|
|
~ArgvContext();
|
|
public:
|
|
string toString();
|
|
string operator [](uint i);
|
|
string operator [](const string& key);
|
|
public:
|
|
bool isKeyExist(const string& key);
|
|
private:
|
|
vector<string> _args;
|
|
map<string, string> _mpss;
|
|
set<string> _sset;
|
|
|
|
};
|
|
}
|
|
|
|
#endif
|