Jpp
 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  return in >> static_cast<JLocation&>(hydrophone) >> static_cast<JPosition3D&>(hydrophone);
66  }
67 
68 
69  /**
70  * Write hydrophone to output.
71  *
72  * \param out output stream
73  * \param hydrophone hydrophone
74  * \return output stream
75  */
76  friend inline std::ostream& operator<<(std::ostream& out, const JHydrophone& hydrophone)
77  {
78  return out << static_cast<const JLocation&>(hydrophone) << ' ' << static_cast<const JPosition3D&>(hydrophone);
79  }
80 
81  protected:
82  int string;
83  };
84 }
85 
86 #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 source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:36
friend std::ostream & operator<<(std::ostream &out, const JHydrophone &hydrophone)
Write hydrophone to output.
Definition: JHydrophone.hh:76