Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
Jeep
getGITTags.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
Jeep/JGITTags.hh
"
7
8
#include "
Jeep/JPrint.hh
"
9
#include "
Jeep/JParser.hh
"
10
#include "
Jeep/JMessage.hh
"
11
12
13
/**
14
* \file
15
*
16
* Auxiliary program to print GIT tags.
17
* \author mdejong
18
*/
19
int
main
(
int
argc,
char
**argv)
20
{
21
using namespace
std;
22
using namespace
JPP;
23
24
JGITTags_t::key_type date;
25
int
debug
;
26
27
try
{
28
29
JParser<>
zap(
"Auxiliary program to print GIT tags."
);
30
31
zap[
'D'
] =
make_field
(date,
"start date \"YYYY-MM-DD\""
) = JGITTags_t::key_type::min();
32
zap[
'd'
] =
make_field
(
debug
) = 1;
33
34
zap(argc, argv);
35
}
36
catch
(
const
exception &error) {
37
FATAL
(error.what() << endl);
38
}
39
40
const
JGITTags_t
buffer =
getGITTags
();
41
42
for
(JGITTags_t::const_iterator i = buffer.lower_bound(date); i != buffer.end(); ++i) {
43
cout << i->first <<
' '
<< i->second << endl;
44
}
45
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
JEEP::JGITTags_t
std::map< JDate<'-'>, std::string > JGITTags_t
Type definition of dated GIT tags.
Definition:
JGITTags.hh:25
JGITTags.hh
Dates GIT tags.
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
debug
int debug
debug level
Definition:
JSirene.cc:61
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JEEP::getGITTags
const JGITTags_t & getGITTags()
Get GIT dated tags.
Definition:
JGITTags.hh:54
JParser.hh
Utility class to parse command line options.
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5