DATRW++ library: seismic data I/O with multiple formats
libdatrwxxinfo.cc
Go to the documentation of this file.
1 /*! \file libdatrwxxinfo.cc
2  * \brief present all online help to the user
3  *
4  * ----------------------------------------------------------------------------
5  *
6  * \author Thomas Forbriger
7  * \date 07/09/2011
8  *
9  * present all online help to the user
10  *
11  * Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach)
12  *
13  * ----
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27  * ----
28  *
29  * REVISIONS and CHANGES
30  * - 07/09/2011 V1.0 Thomas Forbriger
31  * - 29/11/2011 V1.1 remove dependency to libtfxx
32  * - 24/01/2012 V1.2 increase granularity of receivable texts
33  * - 23/07/2017 V1.3 report library version
34  * - 27/02/2019 V1.4 do no call online help for format "all"
35  *
36  * ============================================================================
37  */
38 #define LIBDATRWXXINFO_VERSION \
39  "LIBDATRWXXINFO V1.4 present all online help to the user"
40 
41 #include <iostream>
42 #include <string>
43 #include <datrwxx/formats.h>
44 #include <datrwxx/formatmodifier.h>
45 #include <datrwxx/aalibdatrwxx.h>
46 
47 using std::cout;
48 using std::cerr;
49 using std::endl;
50 
51 int main(int iargc, char* argv[])
52 {
53  cout << "This is libdatrwxxinfo" << endl;
54  cout << LIBDATRWXXINFO_VERSION << endl;
55  cout << datrw::libversion << endl;
56  cout << endl;
57  if (iargc>1)
58  {
59  if (argv[1]==std::string("all"))
60  {
62  cout << endl;
64  }
65  else if (argv[1]==std::string("formats"))
66  {
68  cout << endl;
70  }
71  else
72  {
73  datrw::online_help(argv[1], cout);
74  }
75  }
76  else
77  {
78  cout << "The program takes one argument to control its output:" << endl;
79  cout << endl;
80  cout << "libdatrwxxinfo all\n"
81  << " print all existing online help texts" << endl;
82  cout << endl;
83  cout << "libdatrwxxinfo formats\n"
84  << " summarize supported formats" << endl;
85  cout << endl;
86  cout << "libdatrwxxinfo <format>\n"
87  << " print online help text for format <format>" << endl;
88  }
89 }
90 
91 /* ----- END OF libdatrwxxinfo.cc ----- */
provide format modifiers (prototypes)
void online_help(std::ostream &os)
Provide online help on modifiers.
int main(int iargc, char *argv[])
void online_help(const std::string &format, std::ostream &os, const bool &modifierhelp)
Definition: formats.cc:120
libdatrwxx version string (prototypes)
const char *const libversion
Version string.
Definition: aalibdatrwxx.cc:18
#define LIBDATRWXXINFO_VERSION
void supported_data_types(std::ostream &os)
Definition: formats.cc:290
common description of formats (prototypes)