Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp	(revision 523)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/Delegate.cpp	(revision 525)
@@ -42,219 +42,2 @@
 	return false;
 }
-
-void Delegates::Collect( const BasicSource &source )
-{
-	int i2;
-	char temporary[VN_SIZE];
-
-	// 名前空間管理
-	NamespaceScopes &namespaceScopes = compiler.GetNamespaceSupporter().GetLivingNamespaceScopes();
-	namespaceScopes.clear();
-
-	// Importsされた名前空間の管理
-	NamespaceScopesCollection &importedNamespaces = compiler.GetNamespaceSupporter().GetImportedNamespaces();
-	importedNamespaces.clear();
-
-	for( int i=0; i<source.GetLength(); i++ )
-	{
-		if( source[i] == 1 && source[i+1] == ESC_NAMESPACE ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( source[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=source[i];
-			}
-			namespaceScopes.push_back( temporary );
-
-			continue;
-		}
-		else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){
-			if( namespaceScopes.size() <= 0 ){
-				compiler.errorMessenger.Output(12, "End Namespace", i );
-			}
-			else{
-				namespaceScopes.pop_back();
-			}
-
-			i += 2;
-			continue;
-		}
-		else if( source[i] == 1 && source[i+1] == ESC_IMPORTS ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( source[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=source[i];
-			}
-			if( !compiler.GetNamespaceSupporter().ImportsNamespace( temporary ) )
-			{
-				compiler.errorMessenger.Output(64,temporary,i );
-			}
-
-			continue;
-		}
-		else if( source[i] == 1 && source[i+1] == ESC_CLEARNAMESPACEIMPORTED ){
-			importedNamespaces.clear();
-			continue;
-		}
-
-		else if( source[i] == 1 && source[i+1] == ESC_DELEGATE )
-		{
-			int nowLine = i;
-
-			i += 2;
-			if( !( source[i] == 1 && ( source[i+1] == ESC_SUB || source[i+1] == ESC_FUNCTION ) ) )
-			{
-				compiler.errorMessenger.Output(1,NULL,i);
-				continue;
-			}
-
-			Procedure::Kind procKind = Procedure::Sub;
-			if( source[i+1] == ESC_FUNCTION )
-			{
-				procKind = Procedure::Function;
-			}
-			i += 2;
-
-			// 名前
-			char name[VN_SIZE];
-			GetIdentifierToken( name, source.GetBuffer(), i );
-
-			if( source[i] != '(' )
-			{
-				compiler.errorMessenger.Output(1,NULL,nowLine);
-				continue;
-			}
-
-			// パラメータ文字列
-			char paramStr[8192];
-			i += GetStringInPare( paramStr, source.GetBuffer() + i, true );
-
-			// 戻り値の型の文字列
-			char returnTypeName[VN_SIZE] = "";
-			if( source[i] == 1 && source[i+1] == ESC_AS )
-			{
-				i += 2;
-				GetCommandToken( returnTypeName, source.GetBuffer(), i );
-
-				if( procKind != Procedure::Function )
-				{
-					compiler.errorMessenger.Output(38,name,nowLine);
-				}
-			}
-			else
-			{
-				if( procKind == Procedure::Function )
-				{
-					compiler.errorMessenger.Output(-104,name,nowLine);
-					lstrcpy( returnTypeName, "Double" );
-				}
-			}
-
-			this->Put( new Delegate( namespaceScopes, importedNamespaces, name, procKind, paramStr, returnTypeName, nowLine ) );
-		}
-	}
-}
-
-void Delegates::GenerateSourceCode( std::string &destSource )
-{
-	destSource = "";
-
-	SourceTemplate sourceTemplate( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\templates\\delegate_class.tab" );
-
-	this->Iterator_Reset();
-	while( this->Iterator_HasNext() )
-	{
-		const Delegate &dg = *this->Iterator_GetNext();
-
-		if( !dg.isTargetObjectModule )
-		{
-			// 静的リンクライブラリの場合は飛ばす（既にインスタンスが定義済みであるため）
-			continue;
-		}
-
-		std::map<std::string,std::string> values;
-
-		if( dg.GetNamespaceScopes().size() )
-		{
-			std::string namespaceScopesCommandStr = "";
-			std::string endNamespaceScopesCommandStr = "";
-			BOOST_FOREACH( const std::string &namespaceStr, dg.GetNamespaceScopes() )
-			{
-				if( namespaceScopesCommandStr.size() )
-				{
-					namespaceScopesCommandStr += ":";
-					endNamespaceScopesCommandStr += ":";
-				}
-				namespaceScopesCommandStr += "Namespace " + namespaceStr;
-				endNamespaceScopesCommandStr += "End Namespace";
-			}
-
-			values.insert( std::map<std::string,std::string>::value_type(
-				"#namespace_begin#",
-				namespaceScopesCommandStr
-			) );
-			values.insert( std::map<std::string,std::string>::value_type(
-				"#namespace_end#",
-				endNamespaceScopesCommandStr
-			) );
-		}
-		else
-		{
-			values.insert( std::map<std::string,std::string>::value_type( "#namespace_begin#", "" ) );
-			values.insert( std::map<std::string,std::string>::value_type( "#namespace_end#", "" ) );
-		}
-
-		values.insert( std::map<std::string,std::string>::value_type( "#name#", dg.GetName() ) );
-
-		if( dg.IsFunction() )
-		{
-			values.insert( std::map<std::string,std::string>::value_type(
-				"#call_method_begin#",
-				(std::string)"Function Call(" + dg.paramStr + ") As " + dg.returnTypeName
-			) );
-
-			values.insert( std::map<std::string,std::string>::value_type(
-				"#call_method_end#",
-				"End Function"
-			) );
-
-			values.insert( std::map<std::string,std::string>::value_type( "#result#", "Call=" ) );
-		}
-		else
-		{
-			values.insert( std::map<std::string,std::string>::value_type(
-				"#call_method_begin#",
-				(std::string)"Sub Call(" + dg.paramStr + ")"
-			) );
-
-			values.insert( std::map<std::string,std::string>::value_type(
-				"#call_method_end#",
-				"End Sub"
-			) );
-
-			values.insert( std::map<std::string,std::string>::value_type( "#result#", "" ) );
-		}
-
-		values.insert( std::map<std::string,std::string>::value_type( "#params#", dg.paramStr ) );
-
-		destSource += sourceTemplate.GetResult( values );
-	}
-/*
-	std::ofstream ofs( ( Jenga::Common::Environment::GetAppDir() + "\\generated_delegate_code.log" ).c_str() );
-	ofs << destSource;
-	ofs.close();
-	*/
-}
-
-void Delegates::RefleshParameterAndReturnType()
-{
-	this->Iterator_Reset();
-	while( this->Iterator_HasNext() )
-	{
-		Delegate &dg = *this->Iterator_GetNext();
-		dg.RefleshParameterAndReturnType();
-	}
-}
