Jpp
17.0.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
JAcoustics
JPrintAttenuationLength.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <iomanip>
3
4
#include "
JAcoustics/JAcousticsSupportkit.hh
"
5
6
#include "
Jeep/JParser.hh
"
7
#include "
Jeep/JMessage.hh
"
8
9
10
/**
11
* \file
12
*
13
* Auxiliary program to print attenuation length.
14
* \author mdejong
15
*/
16
int
main
(
int
argc,
char
**argv)
17
{
18
using namespace
std;
19
using namespace
JPP;
20
21
double
D_m;
22
double
f_kHz;
23
int
debug
;
24
25
try
{
26
27
JParser<>
zap(
"Auxiliary program to print attenuation length."
);
28
29
zap[
'D'
] =
make_field
(D_m,
"depth [m]"
);
30
zap[
'f'
] =
make_field
(f_kHz,
"frequency [kHz]"
);
31
zap[
'd'
] =
make_field
(
debug
) = 1;
32
33
zap(argc, argv);
34
}
35
catch
(
const
exception &error) {
36
FATAL
(error.what() << endl);
37
}
38
39
cout <<
getAttenuationLength
(D_m, f_kHz) << endl;
40
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1500
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JAcousticsSupportkit.hh
Acoustics support kit.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JACOUSTICS::getAttenuationLength
static const JAttenuationLength getAttenuationLength(13.2, 38.0, 8.0)
Function object to calculate attenutation length.
debug
int debug
debug level
Definition:
JSirene.cc:66
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