/*************************************************************************** Argument Parser Class Header ( ArgParser.h ) ----------------------------------------- begin : 2013/05/28 copyright : (C) 2013 Solbox Inc. author : Development 1 Team - 2013/05/28 - 1st dadamin email : dev1@solbox.com version : 3.2.0 CopyRight(C) 2005 Solbox Inc. All Rights reserved. Redistribution and use in source and binary forms, with or with out modification, are not permitted in outside of Solbox Inc. ***************************************************************************/ #ifndef __ARGUMENT_PARSER_H__ #define __ARGUMENT_PARSER_H__ class CArgParser { public: CArgParser(int argc, char** argv); ~CArgParser(); bool argparseflag(vector::iterator &i, ...); bool argparsewitharg(vector::iterator &i, string *ret, ...); bool checkvalue(const char *c, string *ret = NULL); inline bool empty() { return m_args.empty(); } protected: void dashes2underscores(const char *input, char *output); bool parsewitharg(vector::iterator &i, std::string *ret, va_list ap); private: vector m_args; }; #endif // __ARGUMENT_PARSER_H__