21 const char BADALLOC[] = 
"Failed to allocate memory for a GeographicLib::MagneticModel";
 
   26     if ( m_pMagneticModel != 
NULL )
 
   28         delete m_pMagneticModel;
 
   29         m_pMagneticModel = 
NULL;
 
   38     if ( 
name == 
nullptr ) 
throw gcnew GeographicErr(
"name cannot be a null pointer.");
 
   39     if ( 
path == 
nullptr ) 
throw gcnew GeographicErr(
"path cannot be a null pointer.");
 
   40     if ( earth == 
nullptr ) 
throw gcnew GeographicErr(
"earth cannot be a null pointer.");
 
   53     catch ( std::bad_alloc )
 
   57     catch (
const std::exception& err )
 
   67     if ( 
name == 
nullptr ) 
throw gcnew GeographicErr(
"name cannot be a null pointer.");
 
   68     if ( 
path == 
nullptr ) 
throw gcnew GeographicErr(
"path cannot be a null pointer.");
 
   77     catch ( std::bad_alloc )
 
   81     catch (
const std::exception& err )
 
   89                 [System::Runtime::InteropServices::Out] 
double% Bx,
 
   90                 [System::Runtime::InteropServices::Out] 
double% By,
 
   91                 [System::Runtime::InteropServices::Out] 
double% Bz)
 
  102                 [System::Runtime::InteropServices::Out] 
double% Bx,
 
  103                 [System::Runtime::InteropServices::Out] 
double% By,
 
  104                 [System::Runtime::InteropServices::Out] 
double% Bz,
 
  105                 [System::Runtime::InteropServices::Out] 
double% Bxt,
 
  106                 [System::Runtime::InteropServices::Out] 
double% Byt,
 
  107                 [System::Runtime::InteropServices::Out] 
double% Bzt)
 
  109     double lx, ly, lz, lxt, lyt, lzt;
 
  126     catch ( std::bad_alloc )
 
  128         throw gcnew GeographicErr(
"Failed to allocate memory for a MagneticCircle in MagneticModel::Circle");
 
  134                             [System::Runtime::InteropServices::Out] 
double% 
H,
 
  135                             [System::Runtime::InteropServices::Out] 
double% 
F,
 
  136                             [System::Runtime::InteropServices::Out] 
double% 
D,
 
  137                             [System::Runtime::InteropServices::Out] 
double% 
I)
 
  139     double lh, lf, ld, li;
 
  149                             double Bxt, 
double Byt, 
double Bzt,
 
  150                     [System::Runtime::InteropServices::Out] 
double% 
H,
 
  151                     [System::Runtime::InteropServices::Out] 
double% 
F,
 
  152                     [System::Runtime::InteropServices::Out] 
double% 
D,
 
  153                     [System::Runtime::InteropServices::Out] 
double% 
I,
 
  154                     [System::Runtime::InteropServices::Out] 
double% Ht,
 
  155                     [System::Runtime::InteropServices::Out] 
double% Ft,
 
  156                     [System::Runtime::InteropServices::Out] 
double% Dt,
 
  157                     [System::Runtime::InteropServices::Out] 
double% It)
 
  159     double lh, lf, ld, li, lht, lft, ldt, lit;
 
  161         lh, lf, ld, li, lht, lft, ldt, lit);
 
  216 { 
return m_pMagneticModel->MinHeight(); }
 
  220 { 
return m_pMagneticModel->MaxHeight(); }
 
  230 { 
return m_pMagneticModel->MajorRadius(); }
 
  234 { 
return m_pMagneticModel->Flattening(); }