ABY Framework  1.0
Arithmetic Bool Yao Framework
 All Classes Files Functions Variables Enumerations Enumerator Macros
parse_options.h
Go to the documentation of this file.
1 
19 #ifndef UTIL_PARSE_OPTIONS_H_
20 #define UTIL_PARSE_OPTIONS_H_
21 
22 #include <string>
23 #include <stdlib.h>
24 #include <stdio.h>
25 #include <iostream>
26 #include <stdint.h>
27 #include <vector>
28 
29 enum etype {
30  T_NUM, T_STR, T_FLAG, T_DOUBLE
31 };
32 
33 typedef struct {
34  void* val;
35  etype type;
36  char opt_name;
37  std::string help_str;
38  bool required;
39  bool set;
40 } parsing_ctx;
41 
42 int32_t parse_options(int32_t* argcp, char*** argvp, parsing_ctx* options, uint32_t nops);
43 void print_usage(std::string progname, parsing_ctx* options, uint32_t nops);
44 void tokenize(const std::string& str, std::vector<uint32_t>& tokens, const std::string& delimiters = "| \t");
45 
46 #endif /* PARSE_OPTIONS_H_ */
void tokenize(const std::string &str, std::vector< uint32_t > &tokens, const std::string &delimiters="| \t")
Definition: parse_options.cpp:27
Definition: parse_options.h:33