## 4 Description of the Developed Software
### Description of the Structure of the Source Code  
The source code of the application was developed on the basis of a central/main function that controls the other components/functions of the program (Figure 3). The basic operation of the main function is the programming of the main window and all the other windows of the GUI. In addition, the main function controls all functions of the program, which perform the required calculations, and manages the transferring of the data between them. In other words, the main function controls the insertion of the user data, calls the functions that (using the input data) calculate the intermediate and the final results, and manages their representation. The code of the main function is organized through different code \"blocks\", which perform specific operations. These \"blocks\" are summarized in Figure 12.  
The functions are separated into two main categories:  
1. The functions embedded in the main function (internal functions). These functions are used to develop the user interface push buttons, i.e., the operations performed when the user calls them (callback functions). A brief description of these functions is presented in Table 4.
2. The external functions used from the callback functions. These functions perform specific procedures, which are mainly computational. The external functions contain the program code, leading to the intermediate and final application results (Figure 3). A brief description of these functions is presented in Table 5.  
\begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt}} \hline \hline
**Function/GUI Component—Panel** & **Procedure** \\ \hline Acc1\_Callback/[Pushbutton “FILE”—Panel 1], (Figure 5) & Insertion (through the activation of a window with file selector), saving, and plotting of the accelerogram of the selected excitation in the direction 1 [2]. \\ \hline StrInpData\_Callback/[”INPUT OF THE STRUCTURAL DATA\"—Panel 1], (Figure 5) & Creates and activates a GUI window for the insertion of the structural data (this window activates a second window for the checking of the imported data using the function ChStrDat Callback activated by the push button “IMPORT and SHOW DATA\"). \\ \hline SePar\_Callback/[\"CALCULATIONS\"—Panel 2], (Figure 8) & Calculates (using the external function “SEISMIC\_PARS”) and presents of the excitation’s acceleration, velocity and displacement spectra and the seismic parameters. \\ \hline StrPar\_Callback/[\"CALCULATIONS\"—Panel 3], (Figure 9) & Calculates and plots the excitation’s acceleration spectrum and the design elastic acceleration spectrum function “GR\_CODE\_EL\_SPECTR”). \\ \hline Results\_Callback/[”PREDICTION OF DAMAGE LEVEL”—Panel 4], (Figure 10) & Classifies the building to one of the three pre-defined DS (SDC) and its rating according to the FSRVS procedure proposed by E.P.P.O. [by calling the external functions: “TRAINID\_ANN SELECTOR”, “ANN\_CALCS” and “FSRVS\_CALCS”]. \\ \hline SavEx\_Callback/[\"SAVE \& EXIT”—Panel 4], (Figure 10) & Calls the external function “FINAL\_OUTPUT” that creates the output file which includes all input data and results. \\ \hline \hline \end{tabular}
\end{table}
Table 4: Description of the internal functions of application (built-in in the file of the main function).  
Figure 12: General description of the structure of the software application’s main function.  
Figure 13 briefly describes the interconnection between the internal (Table 4) and the external (Table 5) functions. The transmission of data between the functions starting from the data input to the final presentation of the results on the screen and the creation of the final output file are also presented.