Index: dam engine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.tex
===================================================================
diff -u -r338 -r347
--- dam engine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.tex (.../DAM Engine - Technical Design.tex) (revision 338)
+++ dam engine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.tex (.../DAM Engine - Technical Design.tex) (revision 347)
@@ -614,9 +614,76 @@
\chapter{Programming Interface} \label{chapterProgrammingInterface}
This is the definition of the programming interface.
The only way to communicate to the \ProgramName is through this interface.
+In the assembly Deltares.DamEngine.Interface.dll a class hass been defined: \texttt{Interface}, which provides the properties and methods which can be used to interact with the \ProgramName.
-\textbf{TO DO: Add interface description}
+\section{Initialization}
+\label{sec:Initializion}
+\texttt{
+\newline
+ /// \newline
+ /// Initializes a new instance of the class. \newline
+ /// \newline
+ /// The model input. \newline
+ public Interface(string modelInput) \newline
+ }
+\newline
+The class has to be instantiated with an (XML) string which adheres to the XSD definition of the inputfile for the \ProgramName.
+
+\section{Validation}
+\label{sec:Validation}
+\texttt{
+\newline
+ /// \newline
+ /// Validates the model. \newline
+ /// \newline
+ /// Valdiation messages in an XML string \newline
+ public string Validate() \newline
+ }
+\newline
+This will validate the model and returns the messages in an XML string which adheres to XSD definition of a message list.
+\section{Calculation}
+\label{sec:Calculation}
+\texttt{
+\newline
+ /// \newline
+ /// Performs the calculation. \newline
+ /// \newline
+ /// Errors and warnings in an XML string \newline
+ public string Run() \newline
+ }
+\newline
+This will perform the calculation of the model and returns the messages in an XML string which adheres to XSD definition of a message list.\section{Interaction}
+\label{sec:Interaction}
+
+The \ProgramName interacts with the calling application through delegates. The following delegates are used by the \ProgramName: \newline
+\texttt{
+\newline
+ /// \newline
+ /// Sends the current progress status \newline
+ /// \newline
+ /// The progress; this is a number between 0 and 1. \newline
+ public delegate void ProgressDelegate(double progress); \newline
+ \newline
+ /// \newline
+ /// Sends log message \newline
+ /// \newline
+ /// The log message. \newline
+ public delegate void SendMessageDelegate(LogMessage logMessage); \newline
+\newline
+ /// \newline
+ /// Check if an user abort is requested \newline
+ /// \newline
+ /// true if user requested an abort; else false \newline
+ public delegate bool UserAbortDelegate(); \newline
+}
+\newline
+These delegates can be assigned to the properties of Interface: \newline
+\texttt{
+ public ProgressDelegate ProgressDelegate \newline
+ public SendMessageDelegate SendMessageDelegate \newline
+ public UserAbortDelegate UserAbortDelegate \newline
+}
%------------------------------------------------------------------------------
\chapter{Literature} \label{chapterLiterature}