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 }
s
RealScalar s
Definition: level1_cplx_impl.h:126
buffer
Definition: pytypes.h:2270
Utility.hpp
Header for GeographicLib::Utility class.
stdafx.h
GEOGRAPHICLIB_VERSION_MINOR
#define GEOGRAPHICLIB_VERSION_MINOR
Definition: Config.h:5
NETGeographicLib.h
Header for NETGeographicLib::NETGeographicLib objects.
Config.h
GEOGRAPHICLIB_VERSION_STRING
#define GEOGRAPHICLIB_VERSION_STRING
Definition: Config.h:3
GEOGRAPHICLIB_VERSION_MAJOR
#define GEOGRAPHICLIB_VERSION_MAJOR
Definition: Config.h:4
GEOGRAPHICLIB_VERSION_PATCH
#define GEOGRAPHICLIB_VERSION_PATCH
Definition: Config.h:6
NETGeographicLib
Definition: Accumulator.h:13
Eigen::internal::IntPtr
std::ptrdiff_t IntPtr
Definition: Meta.h:91


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:23