﻿<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="design.xslt"?>
<design manifest="BuildScriptDesign.1.xml" version="1.0">
	<def>Support compiling source code files in foundry</def>
	<text>
	BuildScript module accepts manifest, retrieves all the source code files, and compile the module. This module consists two processes:1.commandlineHandler 2.buildScriptProcessor. 
	</text>
	
	<architecture>
		<activities>
			<diagram>
				<ref>BuiltScriptBehavior_Activity.gif</ref>
			</diagram>
			<def>Activity Diagram for BuildScript Module</def>
			<text>The activity diagram for this module is simple. When the manifest name and directory is taken, the module creats a BSProcessor oject.
			In the BSProcess object, it references to all the manifest the origional one refered to recursively. If the program reaches the botton level manifest, which doesn't refer to any other manifest, it compiles the source file from lower to highter level.
			After the compile job is done, the program starts compile the test driver for the target module.			
			</text>
		</activities>		
		<structure>
			<diagram>
				<ref>Structure.gif</ref>				
			</diagram>
			<def>BuildScript Structure Chart</def>
			<text>
			This module starts from BSCommandHandler class. The main function takes the arguments from the command line, chack the validity, and set up the necessary configuration.
			After calling BSCommandHandler::invokebuild(), the BSProcessor object retrieves and compiles the cource rcursively.
			</text>
		</structure>
		<classes>
			<diagram>
				<ref>BuildScropt_Logical_Phical.gif</ref>
			</diagram>
			<def>BuildScript Class Diagram</def>
			<text>
			There two classes in this module. The BSCommandHandler class is in charge of retrieve arguments from command line.
			The BSProcess class is responsible for compiling source code files.				
			</text>			
			<class ref="BuildSciptCommandLineHandler.1.xml">
				<def>BSCommandHandler.cs</def>
				<text>
					The class takes the path of target manifest and other reguments from command line or retrieves the configuration from config file. It calls BSProcessor class with proper configuration. 
				</text>
			</class>
			<class ref="BuildScriptProcessor.1.xml">
				<def>BSProcessor.cs</def>
				<text>
				The class accepts manifest name, retrieves all the cource code and compile them.
				</text>
			</class>
			<class ref="StorRef.1.xml">
				<def>StorRef.cs</def>
				<text>
				This class accepts a manifest name, remove the prepended file names in its refered files and all its sub level manifests.
				Store all file refered by one manifest in one directory named by it's manifest name.
				</text>
			</class>

		</classes>
	</architecture>	
	<CriticalIssues>
		
	</CriticalIssues>
</design>
