home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / pstn.zip / zip / HPosition.cpp next >
C/C++ Source or Header  |  1995-09-07  |  3KB  |  92 lines

  1.  
  2. /*******************************************************************************
  3. * FILE NAME: HPosition.cpp                                                     *
  4. *                                                                              *
  5. * DESCRIPTION:                                                                 *
  6. *   Class implementation of the class:                                         *
  7. *     HPosition- Hydrografix Positionsklasse                                   *
  8. * ---------------------------------------------------------------------------- *
  9. * Warning: This file was generated by the VisualAge C++ Visual Builder.        *
  10. * Modifications to this source file will be lost when the part is regenerated. *
  11. *******************************************************************************/
  12. #ifndef _INOTIFEV_
  13. #include <inotifev.hpp>
  14. #endif
  15.  
  16. #ifndef _IOBSERVR_
  17. #include <iobservr.hpp>
  18. #endif
  19.  
  20. #ifndef _ISTDNTFY_
  21. #include <istdntfy.hpp>
  22. #endif
  23.  
  24. #ifndef _HPOSITION_
  25. #include "HPosition.hpp"
  26. #endif
  27.  
  28. #ifndef _IVBDEFS_
  29. #include <ivbdefs.h>
  30. #endif
  31.  
  32. #ifndef _ITRACE_
  33. #include <itrace.hpp>
  34. #endif
  35.  
  36.  
  37. #pragma export (HPosition::readyId)
  38.  
  39. const double ERD_RADIUS = 6371211.3;
  40. const double PI = 3.141592654;
  41. const double DEG2RAD = PI / 180.;
  42. const double RAD2DEG = 180. / PI;
  43.  
  44. const INotificationId HPosition::readyId = "HPosition::readyId";
  45. //------------------------------------------------------------------------------
  46. // HPosition :: HPosition
  47. //------------------------------------------------------------------------------
  48. #pragma export (HPosition::HPosition())
  49. HPosition::HPosition()
  50. {
  51.    iLongitude = 0.;
  52.    iLatitude = 0.;
  53.    iRadius = ERD_RADIUS;
  54.  
  55. }     //end constructor
  56.  
  57.  
  58. //------------------------------------------------------------------------------
  59. // HPosition :: ~HPosition
  60. //------------------------------------------------------------------------------
  61. #pragma export (HPosition::~HPosition())
  62. HPosition::~HPosition()
  63. {
  64.  
  65. }
  66.  
  67. //------------------------------------------------------------------------------
  68. // HPosition :: initializePart
  69. //------------------------------------------------------------------------------
  70. #pragma export (HPosition::initializePart())
  71. HPosition & HPosition::initializePart()
  72. {
  73.    makeConnections();
  74.    notifyObservers(INotificationEvent(readyId, *this));
  75.    return *this;
  76. }
  77.  
  78.  
  79. //------------------------------------------------------------------------------
  80. // HPosition :: makeConnections
  81. //------------------------------------------------------------------------------
  82. #pragma export (HPosition::makeConnections())
  83. Boolean HPosition::makeConnections()
  84. {
  85.    this->enableNotification();
  86.  
  87.    return true;
  88. }
  89.  
  90.  
  91. #include "HPosition.cpv"
  92.