Jpp  18.0.1-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JHydrophone.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JHYDROPHONE__
2 #define __JDETECTOR__JHYDROPHONE__
3 
4 #include <istream>
5 #include <ostream>
6 #include <iomanip>
7 
8 #include "JDetector/JLocation.hh"
10 
11 
12 /**
13  * \file
14  *
15  * Data structure for hydrophone.
16  * \author mdejong
17  */
18 namespace JDETECTOR {}
19 namespace JPP { using namespace JDETECTOR; }
20 
21 namespace JDETECTOR {
22 
24 
25  /**
26  * Type definition of hydrophone.
27  *
28  * The position of the hydrophone is defined with respect to the position of the top of the T-bar.
29  */
30  struct JHydrophone :
31  public JLocation,
32  public JPosition3D
33  {
34  /**
35  * Default constructor.
36  */
38  JLocation (),
39  JPosition3D()
40  {}
41 
42 
43  /**
44  * Constructor.
45  *
46  * \param location location
47  * \param position position
48  */
49  JHydrophone(const JLocation location,
50  const JPosition3D& position) :
51  JLocation (location),
52  JPosition3D(position)
53  {}
54 
55 
56  /**
57  * Read hydrophone from input.
58  *
59  * \param in input stream
60  * \param hydrophone hydrophone
61  * \return input stream
62  */
63  friend inline std::istream& operator>>(std::istream& in, JHydrophone& hydrophone)
64  {
65  in >> static_cast<JLocation&> (hydrophone);
66  in >> static_cast<JPosition3D&>(hydrophone);
67 
68  return in;
69  }
70 
71 
72  /**
73  * Write hydrophone to output.
74  *
75  * \param out output stream
76  * \param hydrophone hydrophone
77  * \return output stream
78  */
79  friend inline std::ostream& operator<<(std::ostream& out, const JHydrophone& hydrophone)
80  {
81  out << static_cast<const JLocation&> (hydrophone);
82  out << ' ';
83  out << static_cast<const JPosition3D&>(hydrophone);
84 
85  return out;
86  }
87  };
88 }
89 
90 #endif
friend std::istream & operator>>(std::istream &in, JHydrophone &hydrophone)
Read hydrophone from input.
Definition: JHydrophone.hh:63
Type definition of hydrophone.
Definition: JHydrophone.hh:30
Logical location of module.
Definition: JLocation.hh:37
JHydrophone(const JLocation location, const JPosition3D &position)
Constructor.
Definition: JHydrophone.hh:49
Logical location of module.
JHydrophone()
Default constructor.
Definition: JHydrophone.hh:37
Data structure for position in three dimensions.
Definition: JPosition3D.hh:36
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
friend std::ostream & operator<<(std::ostream &out, const JHydrophone &hydrophone)
Write hydrophone to output.
Definition: JHydrophone.hh:79