/[Sims3RigEditor]/trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h
ViewVC logotype

Diff of /trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h	2010/07/31 09:33:11	12
+++ trunk/gr2lib_cpp/gr2lib_rigeditor_frm.h	2010/08/01 02:15:12	14
@@ -16,7 +16,7 @@
 
 using namespace gr2lib::core;
 using namespace gr2lib::core::coretypes::implementation;
-
+using namespace gr2lib::core::apiversion;
 using namespace System;
 using namespace System::ComponentModel;
 using namespace System::Collections;
@@ -209,6 +209,7 @@
 #pragma endregion
 #pragma region MarshalToMananaged
 	ArtToolInfo^ _ArtToolInfo;
+	ExporterInfo^ _ExporterInfo;
 
 #pragma region ManagedNativeParsing
 	array<Object^>^ ConvertToManaged()
@@ -217,17 +218,20 @@
 
 		// Art Tool info
 		ret.Add(ArtToolInfo_ToManaged(_grn_file->GrannyFileInfo->ArtToolInfo));
-
+		// Exporter Info
+		ret.Add(ExporterInfo_ToManaged(_grn_file->GrannyFileInfo->ExporterInfo));
 		return ret.ToArray();
 	}
 	void ConvertToNative()
 	{
 		// Art Tool info
 		ArtToolInfo_ToNative();
+		// Exporter Info
+		ExporterInfo_ToNative();
 	}
 #pragma endregion
 
-#pragma region ArtToolInfo
+#pragma region ArtToolInfo_ToManaged
 	ArtToolInfo^ ArtToolInfo_ToManaged(granny_art_tool_info* toolinfo)
 	{
 		_ArtToolInfo = gcnew ArtToolInfo();
@@ -260,10 +264,25 @@
 		return _ArtToolInfo;
 	}
 #pragma endregion
+#pragma region ExporterInfo_ToManaged
+	ExporterInfo^ ExporterInfo_ToManaged(granny_exporter_info* toolinfo)
+	{
+		_ExporterInfo = gcnew ExporterInfo();
+		// Tool Name
+		_ExporterInfo->ExporterName = gcnew String(reinterpret_cast<const char*>(toolinfo->ExporterName));
+		_ExporterInfo->Version = gcnew versiontype(
+			toolinfo->ExporterMajorRevision,
+			toolinfo->ExporterMinorRevision,
+			toolinfo->ExporterCustomization,
+			toolinfo->ExporterBuildNumber);
+		//_ExporterInfo->ExtendedData = new IntPtr(toolinfo->ExtendedData.Object);
+		return _ExporterInfo;
+	}
+#pragma endregion
 
 #pragma region MarshalToNative
 
-#pragma region ArtToolInfo
+#pragma region ArtToolInfo_ToNative
 	void ArtToolInfo_ToNative()
 	{
 
@@ -291,7 +310,17 @@
 
 	}
 #pragma endregion
-
+#pragma region ExporterInfo_ToNative
+	void ExporterInfo_ToNative()
+	{
+		_grn_file->GrannyFileInfo->ExporterInfo->ExporterName = (char*)Marshal::StringToHGlobalAnsi(_ExporterInfo->ExporterName).ToPointer();
+		_grn_file->GrannyFileInfo->ExporterInfo->ExporterMajorRevision = _ExporterInfo->Version->major;
+		_grn_file->GrannyFileInfo->ExporterInfo->ExporterMinorRevision = _ExporterInfo->Version->minor;
+		_grn_file->GrannyFileInfo->ExporterInfo->ExporterCustomization = _ExporterInfo->Version->customization;
+		_grn_file->GrannyFileInfo->ExporterInfo->ExporterBuildNumber = _ExporterInfo->Version->build;
+		//_grn_file->GrannyFileInfo->ExporterInfo->ExtendedData
+	}
+#pragma endregion
 #pragma endregion
 
 #pragma endregion

 

  ViewVC Help
Powered by ViewVC 1.1.22