Index: /trunk/abdev/BasicCompiler32/BasicCompiler.vcproj
===================================================================
--- /trunk/abdev/BasicCompiler32/BasicCompiler.vcproj	(revision 214)
+++ /trunk/abdev/BasicCompiler32/BasicCompiler.vcproj	(revision 215)
@@ -1243,5 +1243,5 @@
 			</Filter>
 			<Filter
-				Name="Application Classes"
+				Name="Langauge Classes"
 				>
 				<File
@@ -1278,4 +1278,8 @@
 				</File>
 				<File
+					RelativePath="..\BasicCompiler_Common\src\Namespace.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\BasicCompiler_Common\src\NamespaceSupporter.cpp"
 					>
@@ -1307,4 +1311,12 @@
 				<File
 					RelativePath="..\BasicCompiler_Common\src\Variable.cpp"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\src\BoostSerializationSupport.cpp"
 					>
 				</File>
@@ -1360,5 +1372,5 @@
 			</Filter>
 			<Filter
-				Name="Application Classes"
+				Name="Language Classes"
 				>
 				<File
@@ -1403,4 +1415,8 @@
 				</File>
 				<File
+					RelativePath="..\BasicCompiler_Common\include\Namespace.h"
+					>
+				</File>
+				<File
 					RelativePath="..\BasicCompiler_Common\include\NamespaceSupporter.h"
 					>
@@ -1440,4 +1456,20 @@
 				<File
 					RelativePath="..\BasicCompiler_Common\include\Variable.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Common Classes"
+				>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\BoostSerializationSupport.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\Hashmap.h"
+					>
+				</File>
+				<File
+					RelativePath="..\BasicCompiler_Common\include\logger.h"
 					>
 				</File>
Index: /trunk/abdev/BasicCompiler32/MakePeHdr.cpp
===================================================================
--- /trunk/abdev/BasicCompiler32/MakePeHdr.cpp	(revision 214)
+++ /trunk/abdev/BasicCompiler32/MakePeHdr.cpp	(revision 215)
@@ -206,5 +206,5 @@
 	compiler.GetMeta().GetDllProcs().Iterator_Init();
 
-/*
+
 	if( !compiler.GetMeta().WriteXml( Jenga::Common::Environment::GetAppDir() + "\\meta_test.xml" ) )
 	{
@@ -216,5 +216,5 @@
 		MessageBox(0,"XML読み込みに失敗","test",0);
 	}
-*/
+/*
 	if( !compiler.GetMeta().WriteBinaly( Jenga::Common::Environment::GetAppDir() + "\\meta_test.dat" ) )
 	{
@@ -226,4 +226,13 @@
 		MessageBox(0,"バイナリ読み込みに失敗","test",0);
 	}
+	if( !compiler.GetMeta().WriteText( Jenga::Common::Environment::GetAppDir() + "\\meta_test.dat" ) )
+	{
+		MessageBox(0,"バイナリ書き込みに失敗","test",0);
+	}
+	MetaImpl *pTempMeta = new MetaImpl();
+	if( !pTempMeta->ReadText( Jenga::Common::Environment::GetAppDir() + "\\meta_test.dat" ) )
+	{
+		MessageBox(0,"バイナリ読み込みに失敗","test",0);
+	}*/
 	compiler.GetMeta() = (*pTempMeta);
 
Index: /trunk/abdev/BasicCompiler32/stdafx.h
===================================================================
--- /trunk/abdev/BasicCompiler32/stdafx.h	(revision 214)
+++ /trunk/abdev/BasicCompiler32/stdafx.h	(revision 215)
@@ -1,3 +1,3 @@
-#pragma warning(disable : 4996)
+#pragma once
 
 #include <string>
@@ -15,11 +15,8 @@
 
 //boost libraries
+#pragma warning(push)
+#pragma warning(disable : 4996)
 #include <boost/foreach.hpp>
-
-#include <jenga/include/common/BoostSerializationSupport.h>
+#pragma warning(pop)
 
 #include "../BasicCompiler_Common/common.h"
-
-#include <Class.h>
-#include <Compiler.h>
-#include <NamespaceSupporter.h>
Index: /trunk/abdev/BasicCompiler_Common/Enum.cpp
===================================================================
--- /trunk/abdev/BasicCompiler_Common/Enum.cpp	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/Enum.cpp	(revision 215)
@@ -1,5 +1,3 @@
 #include "stdafx.h"
-
-#include <jenga/include/common/logger.h>
 
 #include <jenga/include/smoothie/Smoothie.h>
Index: /trunk/abdev/BasicCompiler_Common/Enum.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/Enum.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/Enum.h	(revision 215)
@@ -1,5 +1,5 @@
 #pragma once
 
-#include <jenga/include/smoothie/Namespace.h>
+#include <Namespace.h>
 
 class CEnumMember{
Index: /trunk/abdev/BasicCompiler_Common/include/BoostSerializationSupport.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/BoostSerializationSupport.h	(revision 215)
+++ /trunk/abdev/BasicCompiler_Common/include/BoostSerializationSupport.h	(revision 215)
@@ -0,0 +1,38 @@
+#pragma once
+
+#include <vector>
+#include <string>
+#include <fstream>
+#include <sstream>
+
+#include <boost/serialization/serialization.hpp>
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/export.hpp>
+
+namespace Jenga{
+namespace Common{
+
+using namespace std;
+
+template<class T_xml_schema> class BoostSerializationSupport{
+	virtual const char *RootTagName() const = 0;
+
+	void echo( const char *msg ) const;
+
+public:
+	bool ReadXml( istream& ifs, bool isShowExceptionMessage = true );
+	bool WriteXml( ostream& ofs, bool isShowExceptionMessage = true ) const;
+	bool ReadXml( const string &xmlFilePath, bool isShowExceptionMessage = true );
+	bool WriteXml( const string &xmlFilePath, bool isShowExceptionMessage = true ) const;
+
+	bool ReadBinaly( const string &filePath, bool isShowExceptionMessage = true );
+	bool WriteBinaly( const string &filePath, bool isShowExceptionMessage = true ) const;
+
+	bool ReadText( const string &filePath, bool isShowExceptionMessage = true );
+	bool WriteText( const string &filePath, bool isShowExceptionMessage = true ) const;
+
+	bool ReadXmlFromString( const string &xmlBuffer );
+};
+
+
+}}
Index: /trunk/abdev/BasicCompiler_Common/include/Hashmap.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Hashmap.h	(revision 215)
+++ /trunk/abdev/BasicCompiler_Common/include/Hashmap.h	(revision 215)
@@ -0,0 +1,231 @@
+#pragma once
+
+#include <vector>
+
+#include <memory.h>
+
+#include <jenga/include/common/Exception.h>
+
+#include <BoostSerializationSupport.h>
+#include <logger.h>
+
+
+namespace Jenga{
+namespace Common{
+
+
+#define MAX_HASHMAP 65535
+template<class T> class Hashmap
+{
+	T* hashArray[MAX_HASHMAP];
+
+public:
+	virtual int GetHash( const char *keyName ) const
+	{
+		int key;
+		for(key=0;*keyName!='\0';keyName++){
+			key=((key<<8)+ *keyName )%MAX_HASHMAP;
+		}
+		return key;
+	}
+
+	Hashmap()
+		: isIteratorReady( false )
+	{
+		memset( hashArray, 0, MAX_HASHMAP*sizeof(T*) );
+	}
+	~Hashmap()
+	{
+		Clear();
+	}
+	void Clear()
+	{
+		for( int i=0; i<MAX_HASHMAP; i++ )
+		{
+			T* temp = hashArray[i];
+			if( temp )
+			{
+				delete temp;
+			}
+		}
+		memset( hashArray, 0, MAX_HASHMAP*sizeof(T*) );
+	}
+
+	bool Put( T* value )
+	{
+		int key = GetHash( value->GetKeyName().c_str() );
+
+		if(hashArray[key]){
+			T *temp = hashArray[key];
+			while( true ){
+				if( temp->IsDuplication( value ) )
+				{
+					// 重複している
+					return false;
+				}
+
+				if( temp->GetChainNext() == NULL )
+				{
+					break;
+				}
+				temp = temp->GetChainNext();
+			}
+			temp->SetChainNext( value );
+		}
+		else{
+			hashArray[key] = value;
+		}
+
+		return true;
+	}
+
+	T* GetHashArrayElement( const char *keyName )
+	{
+		return hashArray[GetHash(keyName)];
+	}
+
+	bool IsExist( const std::string &keyName ) const
+	{
+		int key = GetHash( keyName.c_str() );
+
+		if(hashArray[key]){
+			T *temp = hashArray[key];
+			while( true ){
+				if( temp->IsDuplication( keyName ) )
+				{
+					// 重複している
+					return true;
+				}
+
+				if( temp->GetChainNext() == NULL )
+				{
+					break;
+				}
+				temp = temp->GetChainNext();
+			}
+		}
+
+		return false;
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// イテレータ
+	/////////////////////////////////////////////////////////////////
+private:
+	mutable std::vector<T*> iterator_Objects;
+	mutable int iterator_CurrentNext;
+	mutable bool isIteratorReady;
+public:
+	void Iterator_Init() const
+	{
+		iterator_Objects.clear();
+		iterator_CurrentNext = 0;
+
+		for( int i=0; i<MAX_HASHMAP; i++ ){
+			if( hashArray[i] ){
+				T* temp = hashArray[i];
+				while( temp )
+				{
+					iterator_Objects.push_back( temp );
+
+					temp = (T*)temp->GetChainNext();
+				}
+			}
+		}
+
+		isIteratorReady = true;
+	}
+	void Iterator_Reset() const
+	{
+		if( !isIteratorReady )
+		{
+			Jenga::Throw( "イテレータの準備ができていない" );
+		}
+		iterator_CurrentNext = 0;
+	}
+	bool Iterator_HasNext() const
+	{
+		return ( iterator_CurrentNext < (int)iterator_Objects.size() );
+	}
+	T *Iterator_GetNext() const
+	{
+		return iterator_Objects[iterator_CurrentNext++];
+	}
+	int Iterator_GetMaxCount() const
+	{
+		return (int)iterator_Objects.size();
+	}
+
+
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	BOOST_SERIALIZATION_SPLIT_MEMBER();
+	template<class Archive> void load(Archive& ar, const unsigned int version)
+	{
+		std::vector<T *> objects;
+		ar & BOOST_SERIALIZATION_NVP( objects );
+
+		// 読み込み後の処理
+		Clear();
+		BOOST_FOREACH( T *object, objects )
+		{
+			Put( object );
+		}
+		Iterator_Init();
+	}
+	template<class Archive> void save(Archive& ar, const unsigned int version) const
+	{
+		// 保存準備
+		std::vector<T *> objects;
+		objects.clear();
+		Iterator_Reset();
+		while( Iterator_HasNext() )
+		{
+			objects.push_back( Iterator_GetNext() );
+		}
+
+		ar & BOOST_SERIALIZATION_NVP( objects );
+	}
+};
+
+template<class T> class ObjectInHashmap
+{
+	T *pNextObject;
+public:
+
+	ObjectInHashmap()
+		: pNextObject( NULL )
+	{
+	}
+	~ObjectInHashmap()
+	{
+		if( pNextObject )
+		{
+			delete pNextObject;
+		}
+	}
+
+	virtual const std::string &GetKeyName() const = 0;
+	virtual bool IsDuplication( const T *value ) const
+	{
+		return ( GetKeyName() == value->GetName() );
+	}
+	virtual bool IsDuplication( const std::string &keyName ) const
+	{
+		return ( GetKeyName() == keyName );
+	}
+
+	T *GetChainNext()
+	{
+		return pNextObject;
+	}
+	void SetChainNext( T *pNextObject )
+	{
+		this->pNextObject = pNextObject;
+	}
+};
+
+
+}}
Index: /trunk/abdev/BasicCompiler_Common/include/MetaImpl.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/MetaImpl.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/MetaImpl.h	(revision 215)
@@ -1,5 +1,5 @@
 #pragma once
 
-#include <jenga/include/common/BoostSerializationSupport.h>
+#include <BoostSerializationSupport.h>
 
 #include <option.h>
@@ -153,26 +153,3 @@
 		return procPointers;
 	}
-
-	bool AutoWrite( const std::string &filePath )
-	{
-		std::ofstream ofs( filePath.c_str() );
-
-		bool isSuccessful = false;
-		try{
-			boost::archive::xml_oarchive oa(ofs);
-
-			// ファイルから読込
-			oa << boost::serialization::make_nvp( RootTagName(), *this );
-
-			isSuccessful = true;
-		}
-		catch(...){
-			// 失敗
-		}
-
-		// 入力を閉じる
-		ofs.close();
-
-		return isSuccessful;
-	}
 };
Index: /trunk/abdev/BasicCompiler_Common/include/Namespace.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Namespace.h	(revision 215)
+++ /trunk/abdev/BasicCompiler_Common/include/Namespace.h	(revision 215)
@@ -0,0 +1,124 @@
+#pragma once
+
+#include <vector>
+#include <string>
+#include <boost/foreach.hpp>
+
+#include <BoostSerializationSupport.h>
+
+using namespace std;
+
+class NamespaceScopes : public vector<string>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		ar & boost::serialization::make_nvp("vector_string", boost::serialization::base_object<vector<string>>(*this));
+	}
+
+
+public:
+	NamespaceScopes(){}
+	NamespaceScopes( const string &namespaceStr );
+	~NamespaceScopes(){}
+
+	string ToString() const
+	{
+		string namespaceStr;
+		const vector<string> &me = *this;
+
+		bool isFirst = true;
+		BOOST_FOREACH( const string &itemStr, me ){
+			if( isFirst ){
+				isFirst = false;
+			}
+			else{
+				namespaceStr += ".";
+			}
+
+			namespaceStr += itemStr;
+		}
+		return namespaceStr;
+	}
+
+	// 等しいかをチェック
+	bool IsEqual( const string &name ) const
+	{
+		if( ToString() == name ){
+			return true;
+		}
+		return false;
+	}
+
+	// 等しいかをチェック
+	bool IsEqual( const NamespaceScopes &namespaceScopes ) const
+	{
+		if( ToString() == namespaceScopes.ToString() ){
+			return true;
+		}
+		return false;
+	}
+
+	// 所属しているかをチェック
+	// 例:
+	// baseNamespaceScopes =  "Discoversoft"
+	// entryNamespaceScopes = "Discoversoft.ActiveBasic"
+	// この場合、entryNamespaceScopes は baseNamespaceScopes に所属している。
+	static bool IsBelong( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes )
+	{
+		if( baseNamespaceScopes.size() > entryNamespaceScopes.size() ){
+			return false;
+		}
+
+		for( int i=0; i<(int)baseNamespaceScopes.size(); i++ ){
+			if( baseNamespaceScopes[i] != entryNamespaceScopes[i] ){
+				return false;
+			}
+		}
+		return true;
+	}
+};
+
+class NamespaceScopesCollection : public vector<NamespaceScopes>
+{
+	// XMLシリアライズ用
+private:
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		ar & boost::serialization::make_nvp("vector_NamespaceScopes", boost::serialization::base_object<vector<NamespaceScopes>>(*this));
+	}
+
+public:
+	bool IsExist( const NamespaceScopes &namespaceScopes ) const
+	{
+		const NamespaceScopesCollection &namespaceScopesCollection = *this;
+		BOOST_FOREACH( const NamespaceScopes &tempNamespaceScopes, namespaceScopesCollection ){
+			if( tempNamespaceScopes.IsEqual( namespaceScopes ) ){
+				return true;
+			}
+		}
+		return false;
+	}
+	bool IsExist( const string &namespaceStr ) const
+	{
+		return IsExist( NamespaceScopes( namespaceStr ) );
+	}
+
+	bool IsImported( const NamespaceScopes &namespaceScopes ) const
+	{
+		const NamespaceScopesCollection &namespaceScopesCollection = *this;
+		BOOST_FOREACH( const NamespaceScopes &tempNamespaceScopes, namespaceScopesCollection )
+		{
+			if( namespaceScopes.IsEqual( tempNamespaceScopes ) )
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+
+	void SplitNamespace( const char *fullName, char *namespaceStr, char *simpleName ) const;
+};
Index: /trunk/abdev/BasicCompiler_Common/include/NamespaceSupporter.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/NamespaceSupporter.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/NamespaceSupporter.h	(revision 215)
@@ -1,5 +1,5 @@
 #pragma once
 
-#include <jenga/include/smoothie/Namespace.h>
+#include <Namespace.h>
 
 class NamespaceSupporter
Index: /trunk/abdev/BasicCompiler_Common/include/Procedure.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Procedure.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/Procedure.h	(revision 215)
@@ -1,7 +1,7 @@
 #pragma once
 
-#include <jenga/include/common/Hashmap.h>
 #include <jenga/include/smoothie/Source.h>
 
+#include <Hashmap.h>
 #include <option.h>
 #include <Program.h>
Index: /trunk/abdev/BasicCompiler_Common/include/Program.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Program.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/Program.h	(revision 215)
@@ -1,5 +1,5 @@
 #pragma once
 
-#include <jenga/include/common/logger.h>
+#include <logger.h>
 
 class Program
Index: /trunk/abdev/BasicCompiler_Common/include/Prototype.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Prototype.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/Prototype.h	(revision 215)
@@ -4,5 +4,5 @@
 #include <vector>
 
-#include <jenga/include/common/BoostSerializationSupport.h>
+#include <BoostSerializationSupport.h>
 
 #include <Symbol.h>
Index: /trunk/abdev/BasicCompiler_Common/include/Symbol.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Symbol.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/Symbol.h	(revision 215)
@@ -4,8 +4,8 @@
 #include <string>
 
-#include <jenga/include/common/BoostSerializationSupport.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
 
-#include <jenga/include/smoothie/Namespace.h>
-#include <jenga/include/smoothie/LexicalAnalysis.h>
+#include <BoostSerializationSupport.h>
+#include <Namespace.h>
 
 using namespace std;
Index: /trunk/abdev/BasicCompiler_Common/include/Type.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/Type.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/Type.h	(revision 215)
@@ -7,5 +7,5 @@
 
 #include <jenga/include/common/Exception.h>
-#include <jenga/include/common/BoostSerializationSupport.h>
+#include <BoostSerializationSupport.h>
 #include <jenga/include/smoothie/BasicFixed.h>
 
Index: /trunk/abdev/BasicCompiler_Common/include/TypeDef.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/TypeDef.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/TypeDef.h	(revision 215)
@@ -4,6 +4,5 @@
 #include <string>
 
-#include <jenga/include/smoothie/Namespace.h>
-
+#include <Namespace.h>
 #include <Type.h>
 #include <Symbol.h>
Index: /trunk/abdev/BasicCompiler_Common/include/logger.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/logger.h	(revision 215)
+++ /trunk/abdev/BasicCompiler_Common/include/logger.h	(revision 215)
@@ -0,0 +1,133 @@
+#pragma once
+
+#include <iomanip>
+#include <ios>//streamsize
+#include <streambuf>//basic_streambuf
+#include <string>//char_traits, basic_string
+#include <tchar.h>//char_traits, basic_string
+#include <sstream>
+#include <fstream>
+
+#include <tchar.h>
+#include <stdarg.h>
+
+#include <jenga/include/common/Environment.h>
+#include <BoostSerializationSupport.h>
+
+#define STDX_DSTREAM_BUFFERING
+
+
+using namespace std;
+
+namespace Jenga{
+namespace Common{
+
+
+class LoggerSetting : public BoostSerializationSupport<LoggerSetting>
+{
+public:
+	int stopStep;
+
+	LoggerSetting()
+		: stopStep( -1 )
+	{
+	}
+
+	// XMLシリアライズ用
+private:
+	virtual const char *RootTagName() const
+	{
+		return "loggerSetting";
+	}
+	friend class boost::serialization::access;
+	template<class Archive> void serialize(Archive& ar, const unsigned int version)
+	{
+		ar & BOOST_SERIALIZATION_NVP( stopStep );
+	}
+};
+
+
+// VC++ で STLport だと using std::char_traits; みたいなのが必要かも
+template <typename Ch_T, typename Tr_T = std::char_traits<Ch_T> >
+class basic_dbg_streambuf: public std::basic_stringbuf<Ch_T, Tr_T>
+{
+protected:
+	std::string saveFilePath;
+	int count;
+	LoggerSetting setting;
+
+public:
+	basic_dbg_streambuf( const std::string &saveFilePath, bool isOptionEnabled )
+		: saveFilePath( saveFilePath )
+		, count( 0 )
+	{
+#ifndef STDX_DSTREAM_BUFFERING
+		setbuf(0,0);
+#endif
+
+		if( isOptionEnabled )
+		{
+			// 設定ファイルを読み込む
+			char temporary[MAX_PATH];
+			char temp2[MAX_PATH];
+			char temp3[MAX_PATH];
+			_splitpath(saveFilePath.c_str(),temporary,temp2,temp3,NULL);
+			setting.ReadXml( (string)temporary + temp2 + temp3 + ".setting.xml", false );
+		}
+	}
+
+	virtual ~basic_dbg_streambuf()
+	{
+		sync();
+	}
+
+protected:
+	int sync(void)
+	{
+		dbg_out(str().c_str());
+		pbump(static_cast<int>(pbase() - pptr()));
+		return 0;
+	}
+
+	void dbg_out(const Ch_T*);
+};
+
+template <>
+inline void basic_dbg_streambuf<char>::dbg_out(const char *str)
+{
+	ofstream ofs( ( saveFilePath ).c_str(), ios_base::app );
+	ofs << "[" << (count++) << "] " << str ;
+	ofs.close();
+
+	if( (count-1) == setting.stopStep )
+	{
+		DebugBreak();
+	}
+}
+
+template <typename Ch_T, typename Tr_T = std::char_traits<Ch_T> >
+class basic_dbg_ostream: public std::basic_ostream<Ch_T, Tr_T>
+{
+public:
+	basic_dbg_ostream( const string &saveFilePath, bool isOptionEnabled )
+		: std::basic_ostream<Ch_T, Tr_T>(new basic_dbg_streambuf<Ch_T, Tr_T>(saveFilePath,isOptionEnabled))
+	{
+		ofstream ofs( ( saveFilePath ).c_str(), ios_base::trunc );
+		ofs.close();
+	}
+
+
+	virtual ~basic_dbg_ostream()
+	{
+		// flush(); // 不要らしい．http://www.tietew.jp/cppll/archive/607
+		delete rdbuf();
+	}
+};
+
+
+typedef basic_dbg_ostream<_TCHAR>  Logger;
+
+
+}}
+
+BOOST_CLASS_IMPLEMENTATION(Jenga::Common::LoggerSetting, boost::serialization::object_serializable);
Index: /trunk/abdev/BasicCompiler_Common/include/option.h
===================================================================
--- /trunk/abdev/BasicCompiler_Common/include/option.h	(revision 214)
+++ /trunk/abdev/BasicCompiler_Common/include/option.h	(revision 215)
@@ -26,5 +26,5 @@
 	#define USE_TRACE
 #else
-	#define USE_TRACE
+	//#define USE_TRACE
 #endif
 
Index: /trunk/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
===================================================================
--- /trunk/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp	(revision 215)
+++ /trunk/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp	(revision 215)
@@ -0,0 +1,304 @@
+#include "stdafx.h"
+
+#include <boost/archive/xml_oarchive.hpp>
+#include <boost/archive/xml_iarchive.hpp>
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+#include <boost/archive/binary_oarchive.hpp>
+#include <boost/archive/binary_iarchive.hpp>
+#include <boost/serialization/string.hpp>
+#include <boost/serialization/access.hpp>
+#include <boost/serialization/level.hpp>
+#include <boost/serialization/vector.hpp>
+#include <boost/serialization/map.hpp>
+#include <boost/serialization/version.hpp>
+#include <boost/serialization/is_abstract.hpp>
+
+#include <BoostSerializationSupport.h>
+
+#include <MetaImpl.h>
+#include <logger.h>
+
+#include <windows.h>
+
+using namespace Jenga::Common;
+
+template<class T_xml_schema> void BoostSerializationSupport<T_xml_schema>::echo( const char *msg ) const
+{
+	MessageBox( NULL, msg, "XMLシリアライズの例外", MB_OK );
+}
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::ReadXml( istream& ifs, bool isShowExceptionMessage )
+{
+	bool isSuccessful = false;
+
+	try{
+		boost::archive::xml_iarchive ia(ifs);
+
+		// ファイルから読込
+		ia >> boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch( boost::archive::archive_exception e )
+	{
+		if( isShowExceptionMessage )
+		{
+			echo( e.what() );
+		}
+	}
+	catch(...){
+		if( isShowExceptionMessage )
+		{
+			echo( "archive_exception以外の不明な例外" );
+		}
+	}
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::WriteXml( ostream& ofs, bool isShowExceptionMessage ) const
+{
+	bool isSuccessful = false;
+
+	try{
+		boost::archive::xml_oarchive oa(ofs);
+
+		// ファイルに書き出し
+		oa << boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch( boost::archive::archive_exception e )
+	{
+		if( isShowExceptionMessage )
+		{
+			echo( e.what() );
+		}
+	}
+	catch(...){
+		if( isShowExceptionMessage )
+		{
+			echo( "archive_exception以外の不明な例外" );
+		}
+	}
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::ReadXml( const string &xmlFilePath, bool isShowExceptionMessage )
+{
+	// 入力アーカイブの作成
+	std::ifstream ifs( xmlFilePath.c_str() );
+	
+	bool result = ReadXml(ifs,isShowExceptionMessage);
+
+	// 入力を閉じる
+	ifs.close();
+
+	return result;
+}
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::WriteXml( const string &xmlFilePath, bool isShowExceptionMessage ) const
+{
+	// 出力アーカイブの作成
+	std::ofstream ofs( xmlFilePath.c_str() );
+
+	bool result = WriteXml(ofs,isShowExceptionMessage);
+
+	// 出力を閉じる
+	ofs.close();
+
+	return result;
+}
+
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::ReadBinaly( const string &filePath, bool isShowExceptionMessage )
+{
+	// 入力アーカイブの作成
+	std::ifstream ifs( filePath.c_str() );
+
+	bool isSuccessful = false;
+	try{
+		boost::archive::binary_iarchive ia(ifs);
+
+		// ファイルから読込
+		ia >> boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch( boost::archive::archive_exception e )
+	{
+		if( isShowExceptionMessage )
+		{
+			echo( e.what() );
+		}
+	}
+	catch(...){
+		if( isShowExceptionMessage )
+		{
+			echo( "archive_exception以外の不明な例外" );
+		}
+	}
+
+	// 入力を閉じる
+	ifs.close();
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::WriteBinaly( const string &filePath, bool isShowExceptionMessage ) const
+{
+	// 出力アーカイブの作成
+	std::ofstream ofs( filePath.c_str() );
+
+	bool isSuccessful = false;
+	try{
+		boost::archive::binary_oarchive oa(ofs);
+
+		// ファイルに書き出し
+		oa << boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch( boost::archive::archive_exception e )
+	{
+		if( isShowExceptionMessage )
+		{
+			echo( e.what() );
+		}
+	}
+	catch(...){
+		if( isShowExceptionMessage )
+		{
+			echo( "archive_exception以外の不明な例外" );
+		}
+	}
+
+	// 出力を閉じる
+	ofs.close();
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::ReadText( const string &filePath, bool isShowExceptionMessage )
+{
+	// 入力アーカイブの作成
+	std::ifstream ifs( filePath.c_str() );
+
+	bool isSuccessful = false;
+	try{
+		boost::archive::text_iarchive ia(ifs);
+
+		// ファイルから読込
+		ia >> boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch( boost::archive::archive_exception e )
+	{
+		if( isShowExceptionMessage )
+		{
+			echo( e.what() );
+		}
+	}
+	catch(...){
+		if( isShowExceptionMessage )
+		{
+			echo( "archive_exception以外の不明な例外" );
+		}
+	}
+
+	// 入力を閉じる
+	ifs.close();
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::WriteText( const string &filePath, bool isShowExceptionMessage ) const
+{
+	// 出力アーカイブの作成
+	std::ofstream ofs( filePath.c_str() );
+
+	bool isSuccessful = false;
+	try{
+		boost::archive::text_oarchive oa(ofs);
+
+		// ファイルに書き出し
+		oa << boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch( boost::archive::archive_exception e )
+	{
+		if( isShowExceptionMessage )
+		{
+			echo( e.what() );
+		}
+	}
+	catch(...){
+		if( isShowExceptionMessage )
+		{
+			echo( "archive_exception以外の不明な例外" );
+		}
+	}
+
+	// 出力を閉じる
+	ofs.close();
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+
+template<class T_xml_schema> bool BoostSerializationSupport<T_xml_schema>::ReadXmlFromString( const string &xmlBuffer )
+{
+	bool isSuccessful = false;
+
+	// 入力アーカイブの作成
+	std::istringstream iss( xmlBuffer );
+
+	try{
+		boost::archive::xml_iarchive ia(iss);
+
+		// 文字列ストリームから読込
+		ia >> boost::serialization::make_nvp( RootTagName(), *(T_xml_schema *)this );
+
+		isSuccessful = true;
+	}
+	catch(...){
+		// 失敗
+	}
+
+	if( !isSuccessful )
+	{
+		return false;
+	}
+
+	return true;
+}
+
+
+template class Jenga::Common::BoostSerializationSupport<MetaImpl>;
+template class Jenga::Common::BoostSerializationSupport<LoggerSetting>;
Index: /trunk/abdev/BasicCompiler_Common/src/Namespace.cpp
===================================================================
--- /trunk/abdev/BasicCompiler_Common/src/Namespace.cpp	(revision 215)
+++ /trunk/abdev/BasicCompiler_Common/src/Namespace.cpp	(revision 215)
@@ -0,0 +1,57 @@
+#include "stdafx.h"
+
+#include <jenga/include/smoothie/BasicFixed.h>
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/Namespace.h>
+#include <jenga/include/smoothie/SmoothieException.h>
+
+
+NamespaceScopes::NamespaceScopes( const string &namespaceStr ){
+	if( namespaceStr.size() == 0 ){
+		return;
+	}
+
+	string::size_type i = 0;
+	while( true ){
+		string::size_type i2 = namespaceStr.find( '.', i );
+
+		string tempName = namespaceStr.substr( i, i2-i );
+
+		push_back( tempName );
+
+		if( i2 == string::npos ){
+			break;
+		}
+
+		i = i2 + 1;
+	}
+}
+
+void NamespaceScopesCollection::SplitNamespace( const char *fullName, char *namespaceStr, char *simpleName ) const
+{
+	NamespaceScopes namespaceScopes( fullName );
+	bool hasSimpleName = false;
+	while( namespaceScopes.size() > 0 ){
+		if( IsExist( namespaceScopes ) ){
+			break;
+		}
+		namespaceScopes.pop_back();
+
+		hasSimpleName = true;
+	}
+
+	lstrcpy( namespaceStr, namespaceScopes.ToString().c_str() );
+
+	bool hasNamespace = false;
+	if( namespaceStr[0] ){
+		hasNamespace = true;
+	}
+
+	int dotLength = 0;
+	if( hasSimpleName && hasNamespace ){
+		dotLength = 1;
+	}
+
+	lstrcpy( simpleName, fullName + lstrlen( namespaceStr ) + dotLength );
+}
+
