Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp	(revision 560)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/Class.cpp	(revision 561)
@@ -185,34 +185,11 @@
 }
 
-CMember *CClass::CreateMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine )
-{
-	extern int cp;
-
-	//構文を解析
-	char VarName[VN_SIZE];
-	char initBuffer[VN_SIZE];
-	char lpszConstructParameter[VN_SIZE];
-	Subscripts subscripts;
-	Type type;
-	GetDimentionFormat(buffer,VarName,subscripts,type,initBuffer,lpszConstructParameter);
-
-	//重複チェック
-	if(this->DupliCheckAll(VarName)){
-		compiler.errorMessenger.Output(15,VarName,cp);
-	}
-
-	CMember *pMember = new CMember( accessibility, VarName, type, isConst, subscripts, initBuffer, lpszConstructParameter );
-	pMember->source_code_address = nowLine;
-	return pMember;
-}
-void CClass::AddMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine ){
-	dynamicMembers.push_back(
-		CreateMember( accessibility, isConst, isRef, buffer, nowLine )
-	);
-}
-void CClass::AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine ){
-	staticMembers.push_back(
-		CreateMember( accessibility, isConst, isRef, buffer, nowLine )
-	);
+void CClass::AddDynamicMember( Member *pMember )
+{
+	dynamicMembers.push_back( pMember );
+}
+void CClass::AddStaticMember( Member *pMember )
+{
+	staticMembers.push_back( pMember );
 }
 
@@ -247,5 +224,5 @@
 
 	// 動的メンバ
-	BOOST_FOREACH( CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( Member *pMember, dynamicMembers )
 	{
 		if( GetName() == pMember->GetName() )
@@ -256,5 +233,5 @@
 
 	// 静的メンバ
-	BOOST_FOREACH( CMember *pMember, staticMembers ){
+	BOOST_FOREACH( Member *pMember, staticMembers ){
 		if( GetName() == pMember->GetName() ){
 			return true;
@@ -265,10 +242,10 @@
 }
 
-const CMember *CClass::FindDynamicMember( const char *memberName ) const
+const Member *CClass::FindDynamicMember( const char *memberName ) const
 {
 	if( this->HasSuperClass() )
 	{
 		// 基底クラスで検索
-		const CMember *result = this->GetSuperClass().FindDynamicMember( memberName );
+		const Member *result = this->GetSuperClass().FindDynamicMember( memberName );
 		if( result )
 		{
@@ -277,5 +254,5 @@
 	}
 
-	BOOST_FOREACH( CMember *pMember, GetDynamicMembers() )
+	BOOST_FOREACH( Member *pMember, GetDynamicMembers() )
 	{
 		if( pMember->GetName() == memberName )
@@ -373,5 +350,5 @@
 	}
 
-	BOOST_FOREACH( CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( Member *pMember, dynamicMembers )
 	{
 		// メンバサイズ
@@ -479,5 +456,5 @@
 	}
 
-	BOOST_FOREACH( CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( Member *pMember, dynamicMembers )
 	{
 		// メンバサイズ
@@ -580,5 +557,5 @@
 	}
 
-	BOOST_FOREACH( CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( Member *pMember, dynamicMembers )
 	{
 		int tempAlignment = pMember->GetType().GetSize();
@@ -761,5 +738,5 @@
 
 		int i=0;
-		BOOST_FOREACH( CMember *member, objClass.GetStaticMembers() )
+		BOOST_FOREACH( Member *member, objClass.GetStaticMembers() )
 		{
 			if( pEnumInfo )
@@ -1017,5 +994,5 @@
 	std::string result;
 
-	BOOST_FOREACH( const CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( const Member *pMember, dynamicMembers )
 	{
 		if( result.size() )
@@ -1033,5 +1010,5 @@
 	std::string result;
 
-	BOOST_FOREACH( const CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( const Member *pMember, dynamicMembers )
 	{
 		if( result.size() )
@@ -1049,5 +1026,5 @@
 	std::string result;
 
-	BOOST_FOREACH( const CMember *pMember, dynamicMembers )
+	BOOST_FOREACH( const Member *pMember, dynamicMembers )
 	{
 		if( result.size() )
@@ -1070,5 +1047,5 @@
 {
 	const CClass &thisClass = *this;
-	BOOST_FOREACH( const CMember *pMember, thisClass.GetDynamicMembers() )
+	BOOST_FOREACH( const Member *pMember, thisClass.GetDynamicMembers() )
 	{
 		if( pMember->GetType().IsObject() || pMember->GetType().IsPointer() )
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTable.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTable.cpp	(revision 560)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTable.cpp	(revision 561)
@@ -131,5 +131,5 @@
 
 		// メンバを取得
-		const CMember *member = objClass.FindDynamicMember( memberName );
+		const Member *member = objClass.FindDynamicMember( memberName );
 
 		// メンバオフセットを取得
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp	(revision 560)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp	(revision 561)
@@ -224,5 +224,5 @@
 
 	bool result = true;
-	BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+	BOOST_FOREACH( Member *pMember, objClass.GetDynamicMembers() ){
 		if(pMember->GetType().IsStruct()){
 			//循環参照でないかをチェック
@@ -268,4 +268,26 @@
 }
 
+Member *LexicalAnalyzer::CreateMember( const CClass &_class, Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine )
+{
+	extern int cp;
+
+	//構文を解析
+	char VarName[VN_SIZE];
+	char initBuffer[VN_SIZE];
+	char lpszConstructParameter[VN_SIZE];
+	Subscripts subscripts;
+	Type type;
+	GetDimentionFormat(buffer,VarName,subscripts,type,initBuffer,lpszConstructParameter);
+
+	//重複チェック
+	if( _class.DupliCheckAll( VarName ) ){
+		compiler.errorMessenger.Output(15,VarName,cp);
+	}
+
+	Member *pMember = new Member( accessibility, VarName, type, isConst, subscripts, initBuffer, lpszConstructParameter );
+	pMember->source_code_address = nowLine;
+	return pMember;
+}
+
 void LexicalAnalyzer::AddMethod(CClass *pobj_c, UserProc *pUserProc, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
 	bool isVirtual, bool isOverride, const char *interfaceName, bool isAutoGeneration, int nowLine)
@@ -1160,10 +1182,14 @@
 						//静的メンバを追加
 						cp=i;	//エラー用
-						pobj_c->AddStaticMember( accessibility, isConst, false, temporary, i);
+						pobj_c->AddStaticMember(
+							LexicalAnalyzer::CreateMember( *pobj_c, accessibility, isConst, false, temporary, i )
+						);
 					}
 					else{
 						//メンバを追加
 						cp=i;	//エラー用
-						pobj_c->AddMember( accessibility, isConst, false, temporary, i );
+						pobj_c->AddDynamicMember(
+							LexicalAnalyzer::CreateMember( *pobj_c, accessibility, isConst, false, temporary, i )
+						);
 
 
