Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

CentralBody.cpp

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file CentralBody.cpp
00003 *  \brief Implementation of the CentralBody encapsulation object.
00004 *  \author $Author: cakinli $
00005 *  \version $Revision: 1.1.1.1 $
00006 *  \date    $Date: 2005/04/26 17:40:56 $
00007 *//////////////////////////////////////////////////////////////////////////////////////////////////
00008 /* 
00009 *
00010 */
00011 //////////////////////////////////////////////////////////////////////////////////////////////////
00012 
00013 #include "CentralBody.h"
00014 #include "Models/MagneticModel.h"
00015 namespace O_SESSAME {
00016 
00017 CentralBody::CentralBody() : m_ReferenceCount(0)
00018 {
00019 
00020 }
00021 
00022 void CentralBody::GetReference()
00023 {
00024     ++m_ReferenceCount;
00025     return;
00026 }
00027 void CentralBody::ReleaseReference()
00028 {
00029     --m_ReferenceCount;
00030     if(m_ReferenceCount <= 0)
00031     { /** \todo Check how to verify the number of references & delete the object */
00032         //delete *this;
00033     }
00034     return;
00035 }
00036 
00037 void CentralBody::SetMagneticModel(MagneticModel* _pNewMagModel) 
00038 { 
00039     m_pMagneticFieldModel = _pNewMagModel; 
00040     m_pMagneticFieldModel->SetMagFieldCoefficients(m_MagFieldCoeffs);
00041 }
00042 
00043 double CentralBody::GetAvgRotationRate()                {return m_AvgRotationRate;}
00044 
00045 double CentralBody::GetRadius()                 {return m_Radius;}
00046 
00047 CentralBody* CentralBody::operator= (CentralBody*) 
00048 {
00049     GetReference(); return this;
00050 }
00051 
00052 } // close namespace O_SESSAME
00053 
00054 // Do not change the comments below - they will be added automatically by CVS
00055 /*****************************************************************************
00056 *       $Log: CentralBody.cpp,v $
00057 *       Revision 1.1.1.1  2005/04/26 17:40:56  cakinli
00058 *       Adding OpenSESSAME to DSACSS distrib to capture fixed version.
00059 *       
00060 *       Revision 1.2  2003/06/12 17:57:41  nilspace
00061 *       Added magnetic models.
00062 *       
00063 *       Revision 1.1  2003/06/06 17:34:53  nilspace
00064 *       Moved to CentralBody directory.
00065 *       
00066 *       Revision 1.3  2003/04/27 22:04:33  nilspace
00067 *       Created the namespace O_SESSAME.
00068 *       
00069 *       Revision 1.2  2003/04/23 16:29:46  nilspace
00070 *       Updated makefile directories.
00071 *       
00072 *       Revision 1.1  2003/04/08 22:35:11  nilspace
00073 *       Initial Submission.
00074 *
00075 ******************************************************************************/

Generated on Wed Sep 5 12:54:18 2007 for DSACSS Operational Code by  doxygen 1.3.9.1