Jpp
15.0.1-rc.1-highQE
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
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:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JEEP::JGITTags_t
std::multimap< JDate<'-'>, std::string > JGITTags_t
Type definition of dated GIT tags.
Definition:
Jeep/JGITTags.hh:25
JDATABASE::getGITTags
std::vector< std::string > getGITTags(const TRegexp ®exp, const JGITTags_t::key_type &date)
Get selection of GIT tags.
Definition:
JDB/JGITTags.hh:34
JPrint.hh
I/O formatting auxiliaries.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
debug
int debug
debug level
Definition:
JSirene.cc:63
JGITTags.hh
Dates GIT tags.
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
Generated by
1.8.5