Index: branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
===================================================================
--- branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 774)
+++ branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 803)
@@ -46,8 +46,6 @@
 
 	// 関数・メソッド
-	meta.GetUserProcs().Iterator_Reset();
-	while( meta.GetUserProcs().Iterator_HasNext() )
-	{
-		UserProc *pUserProc = meta.GetUserProcs().Iterator_GetNext();
+	foreach (auto pUserProc, meta.GetUserProcs())
+	{
 		if( pUserProc->IsExternal() )
 		{
@@ -65,8 +63,6 @@
 
 	// DLL関数
-	meta.GetDllProcs().Iterator_Reset();
-	while( meta.GetDllProcs().Iterator_HasNext() )
-	{
-		DllProc *pDllProc = meta.GetDllProcs().Iterator_GetNext();
+	foreach (auto pDllProc, meta.GetDllProcs())
+	{
 		if( pDllProc->IsExternal() )
 		{
@@ -81,8 +77,6 @@
 
 	// クラス
-	meta.GetClasses().Iterator_Reset();
-	while( meta.GetClasses().Iterator_HasNext() )
-	{
-		CClass *pClass = meta.GetClasses().Iterator_GetNext();
+	foreach (auto pClass, meta.GetClasses())
+	{
 		if( pClass->IsExternal() )
 		{
@@ -132,8 +126,6 @@
 
 	// グローバル定数
-	meta.GetGlobalConsts().Iterator_Reset();
-	while( meta.GetGlobalConsts().Iterator_HasNext() )
-	{
-		CConst *pConst = meta.GetGlobalConsts().Iterator_GetNext();
+	foreach (auto pConst, meta.GetGlobalConsts())
+	{
 		if( pConst->IsExternal() )
 		{
@@ -148,8 +140,6 @@
 
 	// グローバル定数マクロ
-	meta.GetGlobalConstMacros().Iterator_Reset();
-	while( meta.GetGlobalConstMacros().Iterator_HasNext() )
-	{
-		ConstMacro *pConstMacro = meta.GetGlobalConstMacros().Iterator_GetNext();
+	foreach (auto pConstMacro, meta.GetGlobalConstMacros())
+	{
 		if( pConstMacro->IsExternal() )
 		{
@@ -200,8 +190,6 @@
 
 	// デリゲート
-	meta.GetDelegates().Iterator_Reset();
-	while( meta.GetDelegates().Iterator_HasNext() )
-	{
-		Delegate *pDelegate = meta.GetDelegates().Iterator_GetNext();
+	foreach (auto pDelegate, meta.GetDelegates())
+	{
 		if( pDelegate->IsExternal() )
 		{
@@ -218,15 +206,14 @@
 const ::Delegate &Meta::ToDelegate( const CClass &_class )
 {
-	const ::Delegate *dg = this->GetDelegates().GetHashArrayElement( _class.GetName().c_str() );
-	while( dg )
-	{
-		if( dg->IsEqualSymbol( _class.GetNamespaceScopes(), _class.GetName() ) ){
+	auto dg = this->GetDelegates().GetHashArrayElement(_class.GetName());
+	foreach (auto t, dg)
+	{
+		if( t->IsEqualSymbol( _class.GetNamespaceScopes(), _class.GetName() ) ){
 			//名前空間とクラス名が一致した
-			return *dg;
-		}
-		dg = dg->GetChainNext();
-	}
-
-	throw;
+			return *t;
+		}
+	}
+
+	throw std::runtime_error("Meta::ToDelegate");
 }
 
@@ -256,27 +243,18 @@
 {
 	// 関数・メソッド
-	this->GetUserProcs().Iterator_Init();
-	this->GetUserProcs().Iterator_Reset();
-	while( this->GetUserProcs().Iterator_HasNext() )
-	{
-		UserProc *pUserProc = this->GetUserProcs().Iterator_GetNext();
+	foreach (auto pUserProc, this->GetUserProcs())
+	{
 		pUserProc->Resolve( resolver, resolveErrors );
 	}
 
 	// DLL関数
-	this->GetDllProcs().Iterator_Init();
-	this->GetDllProcs().Iterator_Reset();
-	while( this->GetDllProcs().Iterator_HasNext() )
-	{
-		DllProc *pDllProc = this->GetDllProcs().Iterator_GetNext();
+	foreach (auto pDllProc, this->GetDllProcs())
+	{
 		pDllProc->Resolve( resolver, resolveErrors );
 	}
 
 	// クラス
-	this->GetClasses().Iterator_Init();
-	this->GetClasses().Iterator_Reset();
-	while( this->GetClasses().Iterator_HasNext() )
-	{
-		CClass *pClass = this->GetClasses().Iterator_GetNext();
+	foreach (auto pClass, this->GetClasses())
+	{
 		pClass->Resolve( resolver, resolveErrors );
 	}
@@ -289,18 +267,12 @@
 
 	// グローバル定数
-	this->GetGlobalConsts().Iterator_Init();
-	this->GetGlobalConsts().Iterator_Reset();
-	while( this->GetGlobalConsts().Iterator_HasNext() )
-	{
-		CConst *pConst = this->GetGlobalConsts().Iterator_GetNext();
+	foreach (auto pConst, this->GetGlobalConsts())
+	{
 		pConst->Resolve( resolver, resolveErrors );
 	}
 
 	// グローバル定数マクロ
-	this->GetGlobalConstMacros().Iterator_Init();
-	this->GetGlobalConstMacros().Iterator_Reset();
-	while( this->GetGlobalConstMacros().Iterator_HasNext() )
-	{
-		ConstMacro *pConstMacro = this->GetGlobalConstMacros().Iterator_GetNext();
+	foreach (auto pConstMacro, this->GetGlobalConstMacros())
+	{
 		pConstMacro->Resolve( resolver, resolveErrors );
 	}
@@ -325,9 +297,6 @@
 
 	// デリゲート
-	this->GetDelegates().Iterator_Init();
-	this->GetDelegates().Iterator_Reset();
-	while( this->GetDelegates().Iterator_HasNext() )
-	{
-		Delegate *pDelegate = this->GetDelegates().Iterator_GetNext();
+	foreach (auto pDelegate, this->GetDelegates())
+	{
 		pDelegate->Resolve( resolver, resolveErrors );
 	}
