00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #ifndef _HeliosphericEarthEquatorial_h
00077 #define _HeliosphericEarthEquatorial_h
00078
00079 #include "BaseSRF.h"
00080 #include "Coord.h"
00081 #include "Exception.h"
00082
00083 namespace srm
00084 {
00091 class EXPORT_SRM_CPP_DLL SRF_HeliosphericEarthEquatorial: public BaseSRF_3D
00092 {
00093 public:
00097 static SRF_HeliosphericEarthEquatorial* create( SRM_ORM_Code orm,
00098 SRM_RT_Code rt );
00099
00103 static SRF_HeliosphericEarthEquatorial* create( SRM_SRF_Parameters_Info srf_params )
00104 {
00105 return create( srf_params.value.srf_template.orm_code, srf_params.rt_code );
00106 }
00107
00110 Coord3D* createCoordinate3D(SRM_Long_Float coord_comp1,
00111 SRM_Long_Float coord_comp2,
00112 SRM_Long_Float coord_comp3 );
00113
00116 virtual bool isA( SRF_ClassType type ) const;
00117
00118
00121 virtual SRF_ClassType getClassType() const
00122 {
00123 return BaseSRF::SRF_TYP_HEEQ;
00124 }
00125
00129 bool isEqual( const SRF_HeliosphericEarthEquatorial &srf ) const;
00130
00134 bool operator==( const SRF_HeliosphericEarthEquatorial &rhs ) const;
00135
00139 SRF_HeliosphericEarthEquatorial* makeCopy() const;
00140
00144 const char* toString();
00145
00146 protected:
00147 SRF_HeliosphericEarthEquatorial( void *impl ) : BaseSRF_3D(impl) {}
00148 SRF_HeliosphericEarthEquatorial &operator =( const SRF_HeliosphericEarthEquatorial & ) { return *this; }
00149 virtual ~SRF_HeliosphericEarthEquatorial() {}
00150 };
00151
00152
00153 inline bool SRF_HeliosphericEarthEquatorial::isA( SRF_ClassType type ) const
00154 {
00155 if (type == BaseSRF::SRF_TYP_HEEQ)
00156 return true;
00157 else
00158 return BaseSRF_3D::isA(type);
00159 };
00160
00161
00163 typedef SRF_HeliosphericEarthEquatorial SRF_HEEQ;
00164
00165
00170 class EXPORT_SRM_CPP_DLL Coord3D_HeliosphericEarthEquatorial: public Coord3D
00171 {
00172 public:
00175 Coord3D_HeliosphericEarthEquatorial( SRF_HeliosphericEarthEquatorial *srf,
00176 SRM_Long_Float longitude = 0.0,
00177 SRM_Long_Float latitude = 0.0,
00178 SRM_Long_Float radius = 0.0 )
00179 : Coord3D(srf)
00180 {
00181 setComponentValues(longitude, latitude, radius);
00182 }
00183
00186 Coord3D_HeliosphericEarthEquatorial( const Coord3D_HeliosphericEarthEquatorial &coord )
00187 : Coord3D(coord._srf)
00188 {
00189 setComponentValues( coord._values[0], coord._values[1], coord._values[2] );
00190 }
00191
00197 void copyTo( Coord3D_HeliosphericEarthEquatorial &coord ) const
00198 {
00199 if (coord._srf != _srf)
00200 throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00201
00202 coord._values[0] = _values[0];
00203 coord._values[1] = _values[1];
00204 coord._values[2] = _values[2];
00205 }
00206
00210 bool isEqual( const Coord3D_HeliosphericEarthEquatorial &coord ) const
00211 {
00212 return (_srf == coord._srf &&
00213 _values[0] == coord._values[0] &&
00214 _values[1] == coord._values[1] &&
00215 _values[2] == coord._values[2] );
00216 }
00217
00220 void setComponentValues( SRM_Long_Float longitude, SRM_Long_Float latitude, SRM_Long_Float radius )
00221 {
00222 _values[0] = longitude;
00223 _values[1] = latitude;
00224 _values[2] = radius;
00225 }
00226
00229 SRM_Long_Float get_longitude() const
00230 {
00231 return _values[0];
00232 }
00233
00236 SRM_Long_Float get_latitude() const
00237 {
00238 return _values[1];
00239 }
00240
00243 SRM_Long_Float get_radius() const
00244 {
00245 return _values[2];
00246 }
00247
00250 void set_longitude( SRM_Long_Float value )
00251 {
00252 _values[0] = value;
00253 }
00254
00257 void set_latitude( SRM_Long_Float value )
00258 {
00259 _values[1] = value;
00260 }
00261
00264 void set_radius( SRM_Long_Float value )
00265 {
00266 _values[2] = value;
00267 }
00268
00271 virtual bool isA( Coord_ClassType type ) const;
00272
00275 virtual Coord_ClassType getClassType() const
00276 {
00277 return Coord::COORD_TYP_HEEQ;
00278 }
00279
00282 bool operator==( const Coord3D_HeliosphericEarthEquatorial &rhs ) const;
00283
00289 bool isCompatibleWith( const Coord3D_HeliosphericEarthEquatorial &rhs ) const
00290 {
00291 return ((*(SRF_HeliosphericEarthEquatorial*)(this->_srf)) == (*(SRF_HeliosphericEarthEquatorial*)(rhs._srf)));
00292 }
00293
00298 Coord3D_HeliosphericEarthEquatorial &operator= ( const Coord3D_HeliosphericEarthEquatorial &rhs )
00299 {
00300 if((*(SRF_HeliosphericEarthEquatorial*)(this->_srf)) == (*(SRF_HeliosphericEarthEquatorial*)(rhs._srf)))
00301 {
00302 _values[0] = rhs._values[0];
00303 _values[1] = rhs._values[1];
00304 _values[2] = rhs._values[2];
00305 }
00306 else
00307 throw Exception(SRM_STATCOD_INVALID_TARGET_COORDINATE,
00308 "Coord3D_HeliosphericEarthEquatorial op=: incompatible rhs coordinate");
00309
00310 return *this;
00311 }
00312 };
00313
00314
00315 inline bool Coord3D_HeliosphericEarthEquatorial::isA( Coord_ClassType type ) const
00316 {
00317 if (type == Coord::COORD_TYP_HEEQ)
00318 return true;
00319 else
00320 return Coord3D::isA(type);
00321 };
00322
00323
00325 typedef Coord3D_HeliosphericEarthEquatorial Coord3D_HEEQ;
00326
00327 }
00328
00329 #endif // _HeliosphericEarthEquatorial_h