Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp	(revision 632)
@@ -1,3 +1,99 @@
 #include "stdafx.h"
+
+
+CClass::CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name )
+	: ClassPrototype( namespaceScopes, name )
+	, importedNamespaces( importedNamespaces )
+	, classType( Class )
+	, pSuperClass( NULL )
+	, blittableType( Type() )
+	, isReady( false )
+	, fixedAlignment( 0 )
+	, ConstructorMemberSubIndex( -1 )
+	, DestructorMemberSubIndex( -1 )
+	, vtblNum( 0 )
+	, vtbl_offset( -1 )
+	, comVtblOffset( 0 )
+	, isCompilingConstructor( false )
+	, isCompilingDestructor( false )
+	, cacheSize( 0 )
+{
+}
+
+CClass::CClass( const NamespaceScopes &namespaceScopes,
+	const NamespaceScopesCollection &importedNamespaces,
+	const std::string &name,
+	ClassType classType,
+	const GenericTypes &formalGenericTypes,
+	const Types &superClassActualTypeParameters,
+	int ConstructorMemberSubIndex,
+	int DestructorMemberSubIndex,
+	int vtblNum,
+	int fixedAlignment )
+	: ClassPrototype( namespaceScopes, name )
+	, importedNamespaces( importedNamespaces )
+	, classType( classType )
+	, formalGenericTypes( formalGenericTypes )
+	, pSuperClass( NULL )
+	, superClassActualTypeParameters( superClassActualTypeParameters )
+	, blittableType( Type() )
+	, isReady( false )
+	, ConstructorMemberSubIndex( ConstructorMemberSubIndex )
+	, DestructorMemberSubIndex( DestructorMemberSubIndex )
+	, vtblNum( vtblNum )
+	, fixedAlignment( fixedAlignment )
+	, vtbl_offset( -1 )
+	, comVtblOffset( 0 )
+	, isCompilingConstructor( false )
+	, isCompilingDestructor( false )
+	, cacheSize( 0 )
+{
+}
+
+CClass::CClass()
+	: ClassPrototype()
+	, importedNamespaces()
+	, classType()
+	, pSuperClass( NULL )
+	, blittableType( Type() )
+	, isReady( false )
+	, fixedAlignment( 0 )
+	, ConstructorMemberSubIndex( -1 )
+	, DestructorMemberSubIndex( -1 )
+	, vtblNum( 0 )
+	, vtbl_offset( -1 )
+	, comVtblOffset( 0 )
+	, isCompilingConstructor( false )
+	, isCompilingDestructor( false )
+	, cacheSize( 0 )
+{
+}
+
+CClass::~CClass()
+{
+	// 動的メンバ
+	BOOST_FOREACH( Member *member, dynamicMembers )
+	{
+		delete member;
+	}
+
+	// 静的メンバ
+	BOOST_FOREACH( Member *member, staticMembers )
+	{
+		delete member;
+	}
+
+	// インターフェイス
+	BOOST_FOREACH( ::Interface *pInterface, interfaces )
+	{
+		delete pInterface;
+	}
+
+	// テンプレート展開済みのクラス
+	BOOST_FOREACH( ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses )
+	{
+		delete pExpandedTemplateClass;
+	}
+}
 
 void CClass::Using() const
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Member.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Member.cpp	(revision 632)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Member.cpp	(revision 632)
@@ -0,0 +1,41 @@
+#include "stdafx.h"
+
+
+Member::Member( Prototype::Accessibility accessibility, const std::string &name, const Type &newType, bool isConst, const Subscripts &subscripts, const std::string &initializeExpression, const std::string &constructParameter )
+	: MemberPrototype( accessibility )
+	, name( name )
+	, type( newType )
+	, isConst( isConst )
+	, subscripts( subscripts )
+	, initializeExpression( initializeExpression )
+	, constructParameter( constructParameter )
+{
+}
+
+Member::Member( const Member &member )
+	: MemberPrototype( member.GetAccessibility() )
+	, name( member.GetName() )
+	, type( member.GetType() )
+	, isConst( member.IsConst() )
+	, subscripts( member.GetSubscripts() )
+	, source_code_address( member.source_code_address )
+{
+}
+
+Member::Member( const Member &member, const Type &actualType )
+	: MemberPrototype( member.GetAccessibility() )
+	, name( member.GetName() )
+	, type( actualType )
+	, isConst( member.IsConst() )
+	, subscripts( member.GetSubscripts() )
+	, source_code_address( member.source_code_address )
+{
+}
+
+Member::Member()
+{
+}
+
+Member::~Member()
+{
+}
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 632)
@@ -186,8 +186,10 @@
 
 	// TypeDefも見る
-	int index = this->GetTypeDefs().GetIndex( symbol );
-	if( index != -1 ){
-		Type type = this->GetTypeDefs()[index].GetBaseType();
-		if( type.IsObject() ){
+	const TypeDef *pTypeDef = this->GetTypeDefs().Find( symbol );
+	if( pTypeDef )
+	{
+		Type type = pTypeDef->GetBaseType();
+		if( type.IsObject() )
+		{
 			return &type.GetClass();
 		}
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp	(revision 632)
@@ -1,3 +1,40 @@
 #include "stdafx.h"
+
+Parameter::Parameter( const std::string &varName, const Type &type, bool isRef, const std::string initValue )
+	: Type( type )
+	, varName( varName )
+	, isRef( isRef )
+	, isArray( false )
+	, initValue( initValue )
+{
+}
+
+Parameter::Parameter( const Parameter &param, const Type &type )
+	: Type( type )
+	, varName( param.varName )
+	, isRef( param.isRef )
+	, isArray( param.isArray )
+	, subscripts( param.subscripts )
+	, initValue( param.initValue )
+{
+}
+
+Parameter::Parameter( const Parameter &param )
+	: Type( param )
+	, varName( param.varName )
+	, isRef( param.isRef )
+	, isArray( param.isArray )
+	, subscripts( param.subscripts )
+	, initValue( param.initValue )
+{
+}
+
+Parameter::Parameter()
+{
+}
+
+Parameter::~Parameter()
+{
+}
 
 bool Parameter::Equals( const Parameter &param, bool isContravariant ) const
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp	(revision 632)
@@ -1,3 +1,58 @@
 #include "stdafx.h"
+
+int id_base = 0;
+
+UserProc::UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport )
+	: Procedure( namespaceScopes, name, kind, isCdecl )
+	, importedNamespaces( importedNamespaces )
+	, pParentClass( NULL )
+	, pInterface( NULL )
+	, pMethod( NULL )
+	, isMacro( isMacro )
+	, secondParmNum( 0 )
+	, realSecondParmNum( 1 )
+	, isExport( isExport )
+	, isSystem( false )
+	, isAutoGeneration( false )
+	, isCompiled( false )
+	, beginOpAddress( 0 )
+	, endOpAddress( 0 )
+	, id( id_base ++ )
+{
+}
+
+UserProc::UserProc( const UserProc &userProc, const CClass *pParentClass )
+	: Procedure( userProc )
+	, _paramStr( userProc._paramStr )
+	, importedNamespaces( userProc.importedNamespaces )
+	, pParentClass( pParentClass )
+	, pInterface( NULL )
+	, pMethod( NULL )
+	, isMacro( userProc.isMacro )
+	, secondParmNum( userProc.secondParmNum )
+	, realParams( userProc.realParams )
+	, realSecondParmNum( userProc.realSecondParmNum )
+	, isExport( userProc.isExport )
+	, isSystem( userProc.isSystem )
+	, isAutoGeneration( userProc.isAutoGeneration )
+	, isCompiled( false )
+	, beginOpAddress( 0 )
+	, endOpAddress( 0 )
+	, localVars( Variables() )
+	, id( id_base ++ )
+	, nativeCode( NativeCode() )
+{
+}
+
+UserProc::UserProc()
+{
+}
+
+UserProc::~UserProc()
+{
+	BOOST_FOREACH( Parameter *pParam, realParams ){
+		delete pParam;
+	}
+}
 
 bool UserProc::IsEqualForOverride( const Types &actualTypeParametersForThisProc, const UserProc *pUserProc ) const
@@ -54,5 +109,6 @@
 const NamespaceScopes &UserProc::GetNamespaceScopes() const
 {
-	if( HasParentClass() ){
+	if( HasParentClass() )
+	{
 		return GetParentClassPtr()->GetNamespaceScopes();
 	}
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp	(revision 632)
@@ -5,5 +5,5 @@
 const NamespaceSupporter *Symbol::namespaceSupporter = NULL;
 
-char *calcNames[255] = {
+char *calcNames[256] = {
 	"xor",
 };
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Template.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Template.cpp	(revision 632)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Template.cpp	(revision 632)
@@ -0,0 +1,9 @@
+#include "stdafx.h"
+
+ExpandedTemplateClass::~ExpandedTemplateClass()
+{
+	if( pClass )
+	{
+		delete pClass;
+	}
+}
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp	(revision 632)
@@ -384,4 +384,10 @@
 	return false;
 }
+
+bool Type::IsValueType() const
+{
+	return ( IsWhole() || IsReal() );
+}
+
 bool Type::IsProcPtr() const
 {
@@ -550,4 +556,23 @@
 }
 
+bool Types::IsEquals( const Types &types ) const
+{
+	if( this->size() != types.size() )
+	{
+		// アイテム数が違う
+		return false;
+	}
+
+	const Types &thisTypes = *this;
+	for( int i=0; i<static_cast<int>(this->size()); i++ )
+	{
+		if( !thisTypes[i].Equals( types[i] ) )
+		{
+			return false;
+		}
+	}
+
+	return true;
+}
 
 void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc )
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp	(revision 623)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp	(revision 632)
@@ -17,11 +17,14 @@
 }
 
-int TypeDefCollection::GetIndex( const Symbol &symbol ) const{
-	int max = (int)(*this).size();
-	for( int i=0; i<max; i++ ){
-		if( (*this)[i].IsEqualSymbol( symbol ) ){
-			return i;
+const TypeDef *TypeDefCollection::Find( const Symbol &symbol ) const
+{
+	const TypeDefCollection &typeDefs = *this;
+	BOOST_FOREACH( const TypeDef &typeDef, typeDefs )
+	{
+		if( typeDef.IsEqualSymbol( symbol ) )
+		{
+			return &typeDef;
 		}
 	}
-	return -1;
+	return NULL;
 }
