NETGeographicLib.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
12 #include "GeographicLib/Config.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace System::Runtime::InteropServices;
17 using namespace NETGeographicLib;
18 
19 //*****************************************************************************
20 std::string StringConvert::ManagedToUnmanaged( System::String^ s )
21 {
22  System::IntPtr buffer = Marshal::StringToHGlobalAnsi(s);
23  std::string output( reinterpret_cast<const char*>(buffer.ToPointer()) );
24  Marshal::FreeHGlobal(buffer);
25  return output;
26 }
27 
28 //*****************************************************************************
29 System::String^ VersionInfo::GetString()
30 {
31  return gcnew System::String(GEOGRAPHICLIB_VERSION_STRING);
32 }
33 
34 //*****************************************************************************
35 int VersionInfo::MajorVersion()
36 {
38 }
39 
40 //*****************************************************************************
41 int VersionInfo::MinorVersion()
42 {
44 }
45 
46 //*****************************************************************************
47 int VersionInfo::Patch()
48 {
50 }
51 
52 //*****************************************************************************
53 double Utility::FractionalYear( System::String^ s )
54 {
55  return GeographicLib::Utility::fractionalyear<double>(
56  StringConvert::ManagedToUnmanaged( s ) );
57 }
Header for NETGeographicLib::NETGeographicLib objects.
Header for GeographicLib::Utility class.
#define GEOGRAPHICLIB_VERSION_PATCH
Definition: Config.h:6
#define GEOGRAPHICLIB_VERSION_MINOR
Definition: Config.h:5
std::ptrdiff_t IntPtr
Definition: Meta.h:91
#define GEOGRAPHICLIB_VERSION_STRING
Definition: Config.h:3
#define GEOGRAPHICLIB_VERSION_MAJOR
Definition: Config.h:4
RealScalar s


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:56