#include #include #include #include #include "__cpp.h" #include class INotify { private: public: }; CmdArg arguments = CmdArg(); CmdArgFlag *helpArg = new CmdArgFlag(); CmdArgFlag *versionArg = new CmdArgFlag(); CmdArgVal *pathArg = new CmdArgVal(); CmdArgVal *eventArg = new CmdArgVal(); void define_all_arguments() { CmdArgFlagConf *helpArgConf = new CmdArgFlagConf(); CmdArgDefault *helpArgDefault = new CmdArgDefault((char *)"-h", helpArgConf, (char *)"help", helpArg); CmdArgFlagConf *versionArgConf = new CmdArgFlagConf(); CmdArgDefault *versionArgDefault = new CmdArgDefault((char *)"-v", versionArgConf, (char *)"version", versionArg); CmdArgValConf *pathArgConf = new CmdArgValConf(); CmdArgDefault *pathArgDefault = new CmdArgDefault((char *)"-d", pathArgConf, (char *)"path", pathArg); CmdArgValConf *eventArgConf = new CmdArgValConf(); CmdArgDefault *eventArgDefault = new CmdArgDefault((char *)"-e", eventArgConf, (char *)"event", eventArg); arguments.add(helpArgDefault); arguments.add(versionArgDefault); arguments.add(pathArgDefault); arguments.add(eventArgDefault); } int main(int argc, char **argv) { define_all_arguments(); arguments.load(argc, argv); if (helpArg->isUsed()) { printf("Help\n"); } return 0; }