mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
update cppcommon for remove unused headerfiles
This commit is contained in:
parent
de294427cc
commit
d5b9bb21dd
@ -85,11 +85,6 @@ namespace CPPCOMMON
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint ArgvContext::getSize() const
|
|
||||||
{
|
|
||||||
return _args.size();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -99,6 +94,15 @@ using namespace CPPCOMMON;
|
|||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
//map<string,string> argvMap;
|
||||||
|
//getArgvMap(argc, argv, argvMap);
|
||||||
|
//PRINT_MAPSS(argvMap);
|
||||||
|
ArgvContext arg(argc, argv);
|
||||||
|
cout<<arg.toString()<<endl;
|
||||||
|
cout<<arg[1]<<endl;
|
||||||
|
cout<<arg["--hehe"]<<endl;
|
||||||
|
cout<<pairToString<int,double>(pair<int, double>(1,1.2))<<endl;
|
||||||
|
cout<<arg.isKeyExist("-help")<<endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ namespace CPPCOMMON
|
|||||||
bool getArgvMap(int argc, const char* const* argv, map<string, string>& mpss);
|
bool getArgvMap(int argc, const char* const* argv, map<string, string>& mpss);
|
||||||
class ArgvContext
|
class ArgvContext
|
||||||
{
|
{
|
||||||
public:
|
public :
|
||||||
ArgvContext(int argc, const char* const * argv);
|
ArgvContext(int argc, const char* const * argv);
|
||||||
~ArgvContext();
|
~ArgvContext();
|
||||||
public:
|
public:
|
||||||
@ -27,7 +27,6 @@ namespace CPPCOMMON
|
|||||||
string operator [](const string& key);
|
string operator [](const string& key);
|
||||||
public:
|
public:
|
||||||
bool isKeyExist(const string& key);
|
bool isKeyExist(const string& key);
|
||||||
uint getSize() const;
|
|
||||||
private:
|
private:
|
||||||
vector<string> _args;
|
vector<string> _args;
|
||||||
map<string, string> _mpss;
|
map<string, string> _mpss;
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <iconv.h>
|
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user