Jpp
18.3.0-rc.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JSystem
JLs.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
JSystem/JFilesystem.hh
"
7
#include "
Jeep/JParser.hh
"
8
#include "
Jeep/JMessage.hh
"
9
10
11
/**
12
* \file
13
* Example program to use JSYSTEM::ls.
14
* \author mdejong
15
*/
16
int
main
(
int
argc,
char
**argv)
17
{
18
using namespace
std;
19
using namespace
JPP;
20
21
int
debug
;
22
23
try
{
24
25
JParser<>
zap(
"Example program to mimic shell ls command"
);
26
27
zap[
'd'
] =
make_field
(
debug
) = 0;
28
29
zap(argc, argv);
30
}
31
catch
(
const
exception &error) {
32
FATAL
(error.what() << endl);
33
}
34
35
string
option;
36
37
for
(
int
i
= 1;
i
!= argc; ++
i
) {
38
option +=
" "
;
39
option += argv[
i
];
40
}
41
42
ls buffer(option.c_str());
43
44
for
(ls::const_iterator
i
= buffer.begin();
i
!= buffer.end(); ++
i
) {
45
cout << *
i
<< endl;
46
}
47
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
i
then rm i
Definition:
JEvtReweightMupageParameterScan.sh:309
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JMessage.hh
General purpose messaging.
JFilesystem.hh
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5