AFLOW
 
Loading...
Searching...
No Matches
aurostd_argv.h
Go to the documentation of this file.
1// ***************************************************************************
2// * *
3// * Aflow STEFANO CURTAROLO - Duke University 2003-2024 *
4// * *
5// ***************************************************************************
6
7#ifndef _AUROSTD_ARGV_H_
8#define _AUROSTD_ARGV_H_
9
10#include <deque>
11#include <string>
12#include <vector>
13
14#include "aurostd_defs.h"
15#include "aurostd_xvector.h"
16
17// ***************************************************************************
18// GET WORLD
19namespace aurostd {
20 using std::deque;
21 using std::string;
22 using std::vector;
23 // ATTACH
24 string attach(const string&) __xprototype;
25 string attach(const string&, const string&) __xprototype;
26 string attach(const string&, const string&, const string&) __xprototype;
27 string attach(const string&, const string&, const string&, const string&) __xprototype;
28 string attach(const string&, const string&, const string&, const string&, const string&) __xprototype;
29 // get_arguments_from_input
30 vector<string> get_arguments_from_input(int argc, char** argv) __xprototype;
31 // get_flag without/with command list
32 bool args2flag(const vector<string>& argv, const string&) __xprototype;
33 bool args2flag(const vector<string>& argv, vector<string>&, const string&) __xprototype;
34 // args2utype of utype type
35 template <class utype> utype args2utype(const vector<string>& argv, const string&, utype) __xprototype;
36 // get_xvector get_vector/deque
37 template <class utype> xvector<utype> args2xvectorutype(const vector<string>& argv, const string&, const xvector<utype>&) __xprototype;
38 template <class utype> xvector<utype> args2xvectorutype(const vector<string>& argv, const string&, int) __xprototype;
39 template <class utype> vector<utype> args2vectorutype(const vector<string>& argv, const string&) __xprototype;
40 template <class utype> deque<utype> args2dequeutype(const deque<string>& argv, const string&) __xprototype;
41 // args2vectorstring
42 string args2string(const vector<string>& argv, const string&, const string&) __xprototype;
43 string args2string(const vector<string>& argv, vector<string>&, const string&, const string&) __xprototype;
44 // args2vectorstring
45 vector<string> args2vectorstring(const vector<string>& argv, const string&, const string&) __xprototype;
46
47 //__get_itemized_vector_string
48 bool get_itemized_vector_string_from_input(const vector<string>& argv, const string& s0, vector<string>& tokens, const string& delimiter) __xprototype;
49 bool get_itemized_vector_string_from_input(const vector<string>& argv, const string& s0, const string& s1, vector<string>& tokens, const string& delimiter) __xprototype;
50 bool get_itemized_vector_string_from_input(const vector<string>& argv, const string& s0, const string& s1, const string& s2, vector<string>& tokens, const string& delimiter) __xprototype;
51 bool get_itemized_vector_string_from_input(const vector<string>& argv, const string& s0, const string& s1, const string& s2, const string& s3, vector<string>& tokens, const string& delimiter) __xprototype;
52
53 // args2attachedflag without/with commands
54 bool args2attachedflag(const vector<string>&, const string&) __xprototype;
55 // args2attachedflag with commands
56 bool args2attachedflag(const vector<string>&, vector<string>&, const string&) __xprototype;
57 // args2attachedstring
58 string args2attachedstring(const vector<string>&, const string&, string = "") __xprototype;
59 // args2attachedint
60 // args2attacheddouble
61 // args2attachedutype
62 template <typename utype> utype args2attachedutype(const vector<string>& argv, const string&, const utype&) __xprototype;
63 string args2attachedutype(const vector<string>& argv, const string&, const string&) __xprototype;
64} // namespace aurostd
65
66#endif
67
68// ***************************************************************************
69// * *
70// * Aflow STEFANO CURTAROLO - Duke University 2003-2024 *
71// * *
72// ***************************************************************************
xvector< utype > args2xvectorutype(const vector< string > &argv, const string &s0, const xvector< utype > &def_out)
deque< utype > args2dequeutype(const deque< string > &argv, const string &s0)
__xprototype
Definition aurostd.h:175
bool get_itemized_vector_string_from_input(const vector< string > &argv, const string &s0, vector< string > &tokens, const string &delimiter)
string attach(const string &s1)
bool args2flag(const vector< string > &argv, const string &s0)
vector< string > get_arguments_from_input(int _argc, char **_argv)
string args2string(const vector< string > &argv, const string &s0, const string &s_def)
string args2attachedutype(const vector< string > &argv, const string &s0, const string &s_def)
utype args2utype(const vector< string > &argv, const string &s0, utype def_out)
vector< utype > args2vectorutype(const vector< string > &argv, const string &s0)
bool args2attachedflag(const vector< string > &argv, const string &s0)
string args2attachedstring(const vector< string > &argv, const string &s0, string s_def)
vector< string > args2vectorstring(const vector< string > &argv, const string &s0, const string &s_def)