CARMA C++
Neighbor.h
Go to the documentation of this file.
1 
9 #ifndef CARMA_SERVICES_NEIGHBOR_H
10 #define CARMA_SERVICES_NEIGHBOR_H
11 
12 #include <string>
13 #include <iostream>
14 #include <set>
15 
16 namespace carma {
17  namespace services {
18 
24 class Neighbor {
25  public:
26 
30  Neighbor();
31 
35  virtual ~Neighbor();
36 
37  const ::std::string getName() const;
38  void setName( ::std::string name );
39 
40  const ::std::string getReference() const;
41  void setReference( ::std::string reference );
42 
43  float getDistance() const;
44  void setDistance( const float distance );
45 
46  float getAzimuth() const;
47  void setAzimuth( const float azimuth );
48 
49  float getElevation() const;
50  void setElevation( const float elevation);
51 
52  float getBrightness() const;
53  void setBrightness( const float brightness);
54 
55  bool isOptical() const;
56  void setOptical( const bool optical );
57 
58  double getMJD() const ;
59  void setMJD( const double mjd );
60 
66  bool operator<( const Neighbor & neighbor ) const;
67 
73  bool operator==( const Neighbor & neighbor ) ;
74 
75  private:
77  ::std::string name_;
78 
80  ::std::string reference_;
81 
83  float distance_;
84 
86  float azimuth_;
87 
89  float elevation_;
90 
95  float brightness_;
96 
102  bool isOptical_;
103 
105  double mjd_;
106 
107  }; // end class Neighbor
108 
109  typedef ::std::set< carma::services::Neighbor > NeighborSet ;
110 
114  ::std::ostream& operator<<(::std::ostream & os,
115  const carma::services::Neighbor & neighbor);
116 
117  } // End namespace services
118 } // End namespace carma
119 
120 
121 #endif // CARMA_SERVICES_NEIGHBOR_H
Neighbor()
Default constructor.
Data on nearest neighbor to a source.
Definition: Neighbor.h:24
virtual ~Neighbor()
Destructor.
bool operator<(const Neighbor &neighbor) const
Compares distance member values.
std::ostream & operator<<(std::ostream &os, const carma::services::Angle &angle)
Define the &lt;&lt; operator to allow, e.g.
bool operator==(const Neighbor &neighbor)
Compare two Neighbors.