PhoenixLecture
2.0.0
Set of tools to make lectures
main.cpp
Go to the documentation of this file.
1
2
/***************************************
3
Auteur : Pierre Aubert
4
Mail : pierre.aubert@lapp.in2p3.fr
5
Licence : CeCILL-C
6
****************************************/
7
8
#include <iostream>
9
#include "
get_argument_list.h
"
10
11
12
int
main
(
int
argc,
char
** argv){
13
std::list<PString> listArg =
phoenix_getArgumentList
(argc, argv);
14
std::cout <<
"Get "
<< listArg.size() <<
" arguments"
<< std::endl;
15
std::cout <<
"Is --help exist "
<<
phoenix_isOptionExist
(listArg,
"--help"
) << std::endl;
16
std::cout <<
"Is --help or -h exist "
<<
phoenix_isOptionExist
(listArg,
"--help"
,
"-h"
) << std::endl;
17
std::cout <<
"String of all arguments '"
<<
phoenix_listArgToString
(listArg)<<
"'"
<< std::endl;
18
std::cout <<
"Get program call '"
<<
phoenix_getProgramCall
(listArg)<<
"'"
<< std::endl;
19
phoenix_rmProgramCall
(listArg);
20
std::cout <<
"Get first argument '"
<<
phoenix_getProgramCall
(listArg)<<
"'"
<< std::endl;
21
std::cout <<
"String of all arguments without program call '"
<<
phoenix_listArgToString
(listArg)<<
"'"
<< std::endl;
22
return
0;
23
}
24
25
main
int main(int argc, char **argv)
Definition:
main.cpp:228
phoenix_rmProgramCall
void phoenix_rmProgramCall(std::list< PString > &listArg)
Remove the program call from the list of argument.
Definition:
get_argument_list.cpp:90
phoenix_isOptionExist
bool phoenix_isOptionExist(const std::list< PString > &listArg, const std::list< PString > &argCheckList)
Check if one of the two passed arguments are in the list of arguments.
Definition:
get_argument_list.cpp:28
phoenix_getProgramCall
PString phoenix_getProgramCall(const std::list< PString > &listArg)
Get the program call.
Definition:
get_argument_list.cpp:82
phoenix_getArgumentList
std::list< PString > phoenix_getArgumentList(int argc, char **argv)
Convert the list of given arguments to the program into a list of string.
Definition:
get_argument_list.cpp:15
phoenix_listArgToString
PString phoenix_listArgToString(const std::list< PString > &listArg)
Convert the given list of arguement into a string.
Definition:
get_argument_list.cpp:70
get_argument_list.h
tmp_project
PhoenixPresentation
tmp_project
PhoenixBeamerCreator
tmp_project
PhoenixOptionParser
TESTS
TEST_GET_ARGUMENT_LIST
main.cpp
Generated on Mon Mar 24 2025 18:10:09 for PhoenixLecture by
1.9.1