Index: trunk/ab5.0/jenga/src/common/SourceTemplate.cpp
===================================================================
--- trunk/ab5.0/jenga/src/common/SourceTemplate.cpp	(revision 625)
+++ trunk/ab5.0/jenga/src/common/SourceTemplate.cpp	(revision 625)
@@ -0,0 +1,39 @@
+#include "stdafx.h"
+
+using namespace Jenga::Common;
+
+void SourceTemplate::Values::Insert( const std::string &tagName, const std::string &value )
+{
+	this->insert( Values::value_type(
+		tagName,
+		value
+	) );
+}
+
+SourceTemplate::SourceTemplate( const std::string &filePath )
+{
+	Jenga::Common::File file = Jenga::Common::File( filePath );
+	source = file.Read();
+}
+std::string SourceTemplate::GetResult( const std::map<std::string,std::string> &values )
+{
+	std::string result = source;
+
+	std::map<std::string,std::string>::const_iterator it = values.begin();
+	while( it != values.end() )
+	{
+		while( true )
+		{
+			std::string::size_type index = result.find( it->first );
+			if( index == std::string::npos )
+			{
+				break;
+			}
+
+			result = result.substr( 0, index ) + it->second + result.substr( index + it->first.length() );
+		}
+		it++;
+	}
+
+	return result;
+}
