Index: BasicCompiler_Common/Enum.cpp
===================================================================
--- BasicCompiler_Common/Enum.cpp	(revision 88)
+++ BasicCompiler_Common/Enum.cpp	(revision 92)
@@ -147,8 +147,14 @@
 		parent=ppobj_EnumParent[i];
 
-		sprintf(buffer+length,"Class %s\n",parent->TypeName);
+		sprintf(buffer+length,"Class Enum %s\n",parent->TypeName);
 		length+=lstrlen(buffer+length);
 		lstrcpy(buffer+length,"\tInherits EnumBase\n");
 		length+=lstrlen(buffer+length);
+		sprintf(buffer+length,"\tSub %s(value As Long,lpszName As LPSTR)\n",parent->TypeName);
+		length+=lstrlen(buffer+length);
+		lstrcpy(buffer+length,"\t\tEnumBase(value,lpszName)\n");
+		length+=lstrlen(buffer+length);
+		lstrcpy(buffer+length,"\tEnd Sub\n");
+		length+=lstrlen(buffer+length);
 		lstrcpy(buffer+length,"Public\n");
 		length+=lstrlen(buffer+length);
@@ -156,20 +162,9 @@
 		length+=lstrlen(buffer+length);
 		if(parent->iEnumMemberNum){
-			sprintf(buffer+length,"\t\tEnumBase(%d)\n",
-				parent->ppobj_EnumMember[0]->m_value);
-			length+=lstrlen(buffer+length);
-		}
-		lstrcpy(buffer+length,"\tEnd Sub\n");
-		length+=lstrlen(buffer+length);
-		sprintf(buffer+length,"\tSub %s(ByRef e As %s)\n",parent->TypeName,parent->TypeName);
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\t\tEnumBase(e.m_Value)\n");
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\tEnd Sub\n");
-		length+=lstrlen(buffer+length);
-		sprintf(buffer+length,"\tSub %s(value As Long)\n",parent->TypeName);
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\t\tEnumBase(value)\n");
-		length+=lstrlen(buffer+length);
+			sprintf(buffer+length,"\t\tEnumBase(%d,\"%s\")\n",
+				parent->ppobj_EnumMember[0]->m_value,
+				parent->ppobj_EnumMember[0]->m_name);
+			length+=lstrlen(buffer+length);
+		}
 		lstrcpy(buffer+length,"\tEnd Sub\n");
 		length+=lstrlen(buffer+length);
@@ -183,14 +178,16 @@
 			member=parent->ppobj_EnumMember[i2];
 
-			sprintf(buffer+length,"\tStatic %s As %s(%d)\n",
+			sprintf(buffer+length,"\tStatic %s As %s(%d,\"%s\")\n",
 				member->m_name,
 				parent->TypeName,
-				member->m_value);
-			length+=lstrlen(buffer+length);
-		}
-
+				member->m_value,
+				member->m_name);
+			length+=lstrlen(buffer+length);
+		}
+
+		/*
 		sprintf(buffer+length,"\tOverride Function ToString() As String\n",parent->TypeName);
 		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\t\tSelect Case m_Value\n");
+		lstrcpy(buffer+length,"\t\tSelect Case value\n");
 		length+=lstrlen(buffer+length);
 		for(i2=0;i2<parent->iEnumMemberNum;i2++){
@@ -208,4 +205,5 @@
 		length+=lstrlen(buffer+length);
 
+		
 		sprintf(buffer+length,"\tSub Operator= (ByRef value As %s)\n",parent->TypeName);
 		length+=lstrlen(buffer+length);
@@ -215,5 +213,5 @@
 		length+=lstrlen(buffer+length);
 
-		/*sprintf(buffer+length,"\tSub Operator= (ByRef value As String)\n",parent->TypeName);
+		sprintf(buffer+length,"\tSub Operator= (ByRef value As String)\n",parent->TypeName);
 		length+=lstrlen(buffer+length);
 		lstrcpy(buffer+length,"\t\tSelect Case value\n");
@@ -231,19 +229,12 @@
 		length+=lstrlen(buffer+length);
 		lstrcpy(buffer+length,"\tEnd Sub\n");
+		length+=lstrlen(buffer+length);
+
+		sprintf(buffer+length,"\tSub Operator= (value As Long)\n",parent->TypeName);
+		length+=lstrlen(buffer+length);
+		lstrcpy(buffer+length,"\t\tm_Value=value\n");
+		length+=lstrlen(buffer+length);
+		lstrcpy(buffer+length,"\tEnd Sub\n");
 		length+=lstrlen(buffer+length);*/
-
-		sprintf(buffer+length,"\tSub Operator= (value As Long)\n",parent->TypeName);
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\t\tm_Value=value\n");
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\tEnd Sub\n");
-		length+=lstrlen(buffer+length);
-
-		sprintf(buffer+length,"\tFunction Operator== (ByRef e As %s) As Boolean\n",parent->TypeName);
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\t\tReturn ( e.m_Value = m_Value )\n");
-		length+=lstrlen(buffer+length);
-		lstrcpy(buffer+length,"\tEnd Function\n");
-		length+=lstrlen(buffer+length);
 
 		lstrcpy(buffer+length,"End Class\n");
@@ -258,4 +249,7 @@
 	}
 
+	// ログを生成
+	Smoothie::Logger::PutFile( "enum_generated.log", buffer );
+
 	return buffer;
 }
