Initial commit
57
Readme.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
## IF.03.22 POSEPR (C)
|
||||
|
||||
[Deutsch](./Readme_de.md)
|
||||
|
||||
Further details can be found in [./html/index.html](./html/index.html).
|
||||
|
||||
# Assignment: Customer List
|
||||
|
||||
## Introduction
|
||||
|
||||
The task is to implement a customer list. We focus on administrative functions (initializing, adding customers to the list) and simple overview functions (e.g., list length, listing customers based on revenue thresholds).
|
||||
|
||||
## Data Structures
|
||||
|
||||
This section provides a brief introduction of the required data structures.
|
||||
|
||||
### CustomerList
|
||||
|
||||
The `CustomerList` can contain a maximum of __13__ entries. It is a struct with the following fields:
|
||||
|
||||
- **`length` (int):** Represents the number of entries in the list.
|
||||
- **`customers` (array of pointers to `CustomerListEntry` structs):** Contains the customer entries (see below).
|
||||
|
||||
### CustomerListEntry
|
||||
|
||||
A `CustomerListEntry` contains all the data related to a customer, including:
|
||||
- **`id` (int):** The unique customer ID.
|
||||
- **`customer_name` (const char*):** A pointer to the customer’s name.
|
||||
- **`revenue` (int):** The revenue associated with the customer, measured in €1000.
|
||||
|
||||
## Functions
|
||||
|
||||
The following functions shall be implemented. Return types and parameters are not described in this list. A more detailed description for each function can be found as API documentation above each function prototype.
|
||||
|
||||
- **`init_customer_list()`**: Initializes the list by setting the number of entries to 0.
|
||||
- **`get_length()`**: Returns the number of entries in the list.
|
||||
- **`add_entry()`**: Adds a single entry to the list.
|
||||
- **`add_entries()`**: Adds multiple entries to the list.
|
||||
- **`get_customer_with_id()`**: Finds a customer with a specific ID.
|
||||
- **`get_customers_with_revenue()`**: Finds customers within a specified revenue range.
|
||||
- **`get_customer_with_highest_revenue()`**: Finds the customer with the highest revenue.
|
||||
- **`get_customer_with_lowest_revenue()`**: Finds the customer with the lowest revenue.
|
||||
- **`get_top_n_customers_revenue()`**: Finds the top `n` customers with the highest revenue.
|
||||
- **`get_bottom_n_customers_revenue()`**: Finds the bottom `n` customers with the lowest revenue.
|
||||
|
||||
## Tasks
|
||||
|
||||
Implement a customer list according to the specification given above. Use an ADT (Abstract Data Type) as implementation pattern.
|
||||
|
||||
1. Enter your name into the file header (inside a comment)
|
||||
1. Implement the TODOs in custom_list.h
|
||||
1. Replace all return types marked by <type> with the correct return type.
|
||||
1. Fill in all parameter lists marked by <param> with the applicable parameters. Note that the parameter list may be empty.
|
||||
1. Implement the required data types in the c file
|
||||
1. Implement an empty skeleton for each function.
|
||||
1. Compile and run the application. All unit tests should run but fail.
|
||||
1. Implement one function after another until all unit test became green. Note that some tests depend on multiple functions.
|
||||
57
Readme_de.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
## IF.03.22 POSEPR (C)
|
||||
|
||||
[English](./Readme.md)
|
||||
|
||||
Siehe auch [./html/index.html](./html/index.html)
|
||||
|
||||
# Aufgabe: Kundenliste
|
||||
|
||||
## Einführung
|
||||
|
||||
Die Aufgabe besteht darin, eine Kundenliste zu implementieren. Der Fokus liegt auf Verwaltungsfunktionen (Initialisieren, Hinzufügen von Kunden zur Liste) und einfachen Überblicksfunktionen (z. B. Länge der Liste, Auflisten von Kunden basierend auf Umsatzgrenzen).
|
||||
|
||||
## Datenstrukturen
|
||||
|
||||
Dieser Abschnitt bietet eine kurze Einführung in die erforderlichen Datenstrukturen.
|
||||
|
||||
### CustomerList
|
||||
|
||||
Die `CustomerList` kann maximal **13** Einträge enthalten. Sie ist eine Struktur mit den folgenden Feldern:
|
||||
|
||||
- **`length` (int):** Gibt die Anzahl der Einträge in der Liste an.
|
||||
- **`customers` (Array von Zeigern auf `CustomerListEntry`-Strukturen):** Enthält die Kundeneinträge (siehe unten).
|
||||
|
||||
### CustomerListEntry
|
||||
|
||||
Ein `CustomerListEntry` enthält alle Daten, die zu einem Kunden gehören, einschließlich:
|
||||
- **`id` (int):** Die eindeutige Kundennummer.
|
||||
- **`customer_name` (const char*):** Ein Zeiger auf den Namen des Kunden.
|
||||
- **`revenue` (int):** Der Umsatz, der dem Kunden zugeordnet ist, gemessen in €1000.
|
||||
|
||||
## Funktionen
|
||||
|
||||
Die folgenden Funktionen sollen implementiert werden. Rückgabewerte und Parameter werden in dieser Liste nicht beschrieben. Eine detailliertere Beschreibung jeder Funktion findet sich in der API-Dokumentation über den Funktionsprototypen.
|
||||
|
||||
- **`init_customer_list()`**: Initialisiert die Liste, indem die Anzahl der Einträge auf 0 gesetzt wird.
|
||||
- **`get_length()`**: Gibt die Anzahl der Einträge in der Liste zurück.
|
||||
- **`add_entry()`**: Fügt der Liste einen einzelnen Eintrag hinzu.
|
||||
- **`add_entries()`**: Fügt der Liste mehrere Einträge hinzu.
|
||||
- **`get_customer_with_id()`**: Sucht einen Kunden mit einer bestimmten ID.
|
||||
- **`get_customers_with_revenue()`**: Sucht Kunden innerhalb eines angegebenen Umsatzbereichs.
|
||||
- **`get_customer_with_highest_revenue()`**: Sucht den Kunden mit dem höchsten Umsatz.
|
||||
- **`get_customer_with_lowest_revenue()`**: Sucht den Kunden mit dem niedrigsten Umsatz.
|
||||
- **`get_top_n_customers_revenue()`**: Sucht die `n` Kunden mit dem höchsten Umsatz.
|
||||
- **`get_bottom_n_customers_revenue()`**: Sucht die `n` Kunden mit dem niedrigsten Umsatz.
|
||||
|
||||
## Aufgaben
|
||||
|
||||
Implementieren Sie eine Kundenliste gemäß der oben gegebenen Spezifikation. Verwenden Sie ein ADT (Abstract Data Type) als Implementierungsmuster.
|
||||
|
||||
1. Tragen Sie Ihren Namen in den Dateikopf (innerhalb eines Kommentars) ein.
|
||||
1. Implementieren Sie die TODOs in der Datei `customer_list.h`.
|
||||
1. Ersetzen Sie alle Rückgabetypen, die mit <type> markiert sind, durch den korrekten Rückgabetyp.
|
||||
1. Füllen Sie alle Parameterlisten, die mit <param> markiert sind, mit den zutreffenden Parametern aus. Beachten Sie, dass die Parameterliste leer sein kann.
|
||||
1. Implementieren Sie die erforderlichen Datentypen in der C-Datei.
|
||||
1. Implementieren Sie ein leeres Grundgerüst für jede Funktion.
|
||||
1. Kompilieren und führen Sie die Anwendung aus. Alle Unit-Tests sollten laufen, aber fehlschlagen.
|
||||
1. Implementieren Sie eine Funktion nach der anderen, bis alle Unit-Tests bestanden sind. Beachten Sie, dass einige Tests von mehreren Funktionen abhängen.
|
||||
14
customer_list.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding, 2. JG
|
||||
* */ your name /*
|
||||
* ---------------------------------------------------------
|
||||
* Description:
|
||||
* Implementation of customer_list.h.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
166
customer_list.h
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding, 2. JG
|
||||
* */ your name /*
|
||||
* ---------------------------------------------------------
|
||||
* Defines an abstract data type for managing a list of customers.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO Don't miss the include guards!
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
* A customer list is organized as an array. MAX_LIST_ENTRIES defines the maximum
|
||||
* number of list entries.
|
||||
*/
|
||||
|
||||
// TODO: Define a symbolic constant named 'MAX_LIST_ENTRIES' for 13 customers
|
||||
|
||||
/**
|
||||
* A CustomerListEntry consists of a unique customer ID, a name,
|
||||
* and the revenue (in €1000) associated with this customer.
|
||||
*/
|
||||
|
||||
// TODO Declare the 'public' data type of the list entry
|
||||
|
||||
/**
|
||||
* The CustomerList stores the number of currently saved customer list
|
||||
* entries and an array to store the actual customer list entries.
|
||||
* @remark Memory for the customer list entries must be provided by the caller.
|
||||
* The `customers` array only manages references to customer list entries.
|
||||
*/
|
||||
|
||||
// TODO Declare the 'public' data type of the list entry
|
||||
|
||||
/**
|
||||
* Provides the initialized empty instance of the customer list.
|
||||
* @return The customer list instance.
|
||||
*/
|
||||
<type> init_customer_list();
|
||||
|
||||
/**
|
||||
* @param cl The customer list data.
|
||||
* @return The number of entries in `cl` or a value less than zero if the list is invalid.
|
||||
*/
|
||||
<type> get_length(<params>);
|
||||
|
||||
/**
|
||||
* Creates an entry for a single customer.
|
||||
* @param id The ID of the customer.
|
||||
* @param customer_name The name of the customer.
|
||||
* @param revenue The revenue generated by that customer, in units of € 1000,-- (k€).
|
||||
* @return The entry if it could be created, else a null-entry (0).
|
||||
*/
|
||||
<type> create_customer(<params>);
|
||||
|
||||
/**
|
||||
* Adds an entry to the customer list. If the list is already full OR a customer
|
||||
* with the given ID already exists within the list, the entry is not added
|
||||
* and `false` is returned.
|
||||
* @param cl The customer list data.
|
||||
* @param id The ID of the customer.
|
||||
* @param customer_name The name of the customer.
|
||||
* @param revenue The revenue generated by that customer, in units of € 1000,-- (k€).
|
||||
* @return `true` if the addition was successful, `false` otherwise.
|
||||
* @see add_customers
|
||||
*/
|
||||
<type> add_customer(<params>);
|
||||
|
||||
/**
|
||||
* Adds `n` entries to the customer list. If the customer list cannot accommodate
|
||||
* all `n` entries without exceeding `MAX_LIST_ENTRIES`, none of the entries
|
||||
* are added, and `add_entries` returns `false`.
|
||||
* @param cl The customer list data.
|
||||
* @param e Array of pointers to entries to be added to `cl`.
|
||||
* @param n The number of entries in `e`.
|
||||
* @warning If `e` contains fewer than `n` entries, the function may crash due to
|
||||
* memory issues.
|
||||
* @return `true` if the addition was successful, `false` otherwise. Adding a customer is
|
||||
* considered being successful even if the customer was not added because it was already
|
||||
* included in the list.
|
||||
* @see add_customer
|
||||
*/
|
||||
<type> add_customers(<params>);
|
||||
|
||||
/**
|
||||
* Provides the customer with a specific index within the list.
|
||||
* @param cl The customer list data.
|
||||
* @param index The index of the requested customer.
|
||||
* @return The entry of the customer with the given index or null.
|
||||
*/
|
||||
<type> get_customer_with_index(<params>);
|
||||
|
||||
/**
|
||||
* Searches for a customer with a specific ID.
|
||||
* @param cl The customer list data.
|
||||
* @param id The unique customer ID to search for.
|
||||
* @return The entry of the customer with the given ID or null.
|
||||
*/
|
||||
<type> get_customer_with_id(<params>);
|
||||
|
||||
/**
|
||||
* Searches for customers within specific revenue bounds and returns them in the
|
||||
* order they are stored in the customer list.
|
||||
* @param cl The customer list data.
|
||||
* @param lower_bound The lower revenue limit.
|
||||
* @param upper_bound The upper revenue limit.
|
||||
* @param result_list The array holding the search results.
|
||||
* @param result_len The maximum number of entries that can be stored in the result list.
|
||||
* @return The number of entries found.
|
||||
*/
|
||||
<type> get_customers_with_revenue(<params>);
|
||||
|
||||
/**
|
||||
* Finds the customer with the highest revenue. If multiple customers have the
|
||||
* maximum revenue, the first customer in `cl` with this revenue is returned.
|
||||
* @param cl The customer list data.
|
||||
* @return The customer with the highest revenue.
|
||||
*/
|
||||
<type> get_customer_with_highest_revenue(<params>);
|
||||
|
||||
/**
|
||||
* Finds the customer with the lowest revenue. If multiple customers have the
|
||||
* minimum revenue, the first customer in `cl` with this revenue is returned.
|
||||
* @param cl The customer list data.
|
||||
* @return The customer with the lowest revenue.
|
||||
*/
|
||||
<type> get_customer_with_lowest_revenue(<params>);
|
||||
|
||||
/**
|
||||
* Finds the `n` customers with the highest revenue. If multiple customers satisfy
|
||||
* the search criteria, they are returned in the order they appear in the customer list.
|
||||
* @param cl The customer list data.
|
||||
* @param n The number of customers to find.
|
||||
* @param result_list Pointer to the list holding the search results. Must be of length 'n'.
|
||||
* @return The number of customers found.
|
||||
* @remark If `n` is greater than the number of customers in `cl`, only
|
||||
* `MAX_LIST_ENTRIES` entries are stored in `result_list`, and the return value is
|
||||
* `MAX_LIST_ENTRIES`.
|
||||
* @warning It is not verified whether `result_list` has sufficient size. If the size
|
||||
* of `result_list` is smaller than `n`, the function may crash due to memory issues.
|
||||
*/
|
||||
<type> get_top_n_customers_revenue(<params>);
|
||||
|
||||
/**
|
||||
* Finds the `n` customers with the lowest revenue. If multiple customers satisfy
|
||||
* the search criteria, they are returned in the order they appear in the customer list.
|
||||
* @param cl The customer list data.
|
||||
* @param n The number of customers to find.
|
||||
* @param result_list Pointer to the list holding the search results. Must be of length 'n'.
|
||||
* @return The number of customers found.
|
||||
* @remark If `n` is greater than the number of customers in `cl`, only
|
||||
* `MAX_LIST_ENTRIES` entries are stored in `result_list`, and the return value is
|
||||
* `MAX_LIST_ENTRIES`.
|
||||
* @warning It is not verified whether `result_list` has sufficient size. If the size
|
||||
* of `result_list` is smaller than `n`, the function may crash due to memory issues.
|
||||
*/
|
||||
<type> get_bottom_n_customers_revenue(<params>);
|
||||
|
||||
/**
|
||||
* @brief Provides the ID of the given customer.
|
||||
* @param customer The customer to query.
|
||||
* @return The ID of this customer or a value less than 0,
|
||||
* if the given customer is invalid.
|
||||
*/
|
||||
<type> get_customer_id(<params>);
|
||||
30
customer_list_test_driver.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* Test headers of customer_list.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "shortcut.h"
|
||||
#include "test_customer_list.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
ADD_TEST(test_init_customer_list);
|
||||
ADD_TEST(test_add_entry);
|
||||
ADD_TEST(test_add_entries);
|
||||
ADD_TEST(test_get_customer_with_id_when_customer_list_is_empty);
|
||||
ADD_TEST(test_get_customer_with_id_with_one_element);
|
||||
ADD_TEST(test_get_customer_with_id_when_list_is_full);
|
||||
ADD_TEST(test_get_customers_with_revenue);
|
||||
ADD_TEST(test_get_customer_with_highest_revenue);
|
||||
ADD_TEST(test_get_customer_with_lowest_revenue);
|
||||
ADD_TEST(test_get_top_n_customers_revenue);
|
||||
ADD_TEST(test_get_bottom_n_customers_revenue);
|
||||
|
||||
run_tests();
|
||||
return 0;
|
||||
}
|
||||
84
html/annotated.html
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: Data Structures</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Data Structures</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_customer_list_data.html" target="_self">CustomerListData</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_customer_list_entry_data.html" target="_self">CustomerListEntryData</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_customer_test_data.html" target="_self">CustomerTestData</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_test_case.html" target="_self">TestCase</a></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/bc_s.png
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
html/bdwn.png
Normal file
|
After Width: | Height: | Size: 147 B |
92
html/classes.html
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: Data Structure Index</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Data Structure Index</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="qindex"><a class="qindex" href="#letter_c">c</a> | <a class="qindex" href="#letter_t">t</a></div>
|
||||
<table class="classindex">
|
||||
<tr><td rowspan="2" valign="bottom"><a name="letter_c"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  c  </div></td></tr></table>
|
||||
</td>
|
||||
<td valign="top"><a class="el" href="struct_customer_list_entry_data.html">CustomerListEntryData</a>   </td>
|
||||
<td rowspan="2" valign="bottom"><a name="letter_t"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  t  </div></td></tr></table>
|
||||
</td>
|
||||
<td></td></tr>
|
||||
<tr><td valign="top"><a class="el" href="struct_customer_test_data.html">CustomerTestData</a>   </td>
|
||||
<td></td></tr>
|
||||
<tr><td valign="top"><a class="el" href="struct_customer_list_data.html">CustomerListData</a>   </td>
|
||||
<td></td><td valign="top"><a class="el" href="struct_test_case.html">TestCase</a>   </td>
|
||||
<td></td></tr>
|
||||
<tr><td></td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
<div class="qindex"><a class="qindex" href="#letter_c">c</a> | <a class="qindex" href="#letter_t">t</a></div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/closed.png
Normal file
|
After Width: | Height: | Size: 132 B |
133
html/customer__list_8h_source.html
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: customer_list.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">customer_list.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * HTBLA-Leonding, 2. JG</span></div>
|
||||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * ---------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Defines an abstract data type for managing a list of customers.</span></div>
|
||||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * ----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> */</span></div>
|
||||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>  </div>
|
||||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifndef ___CUSTOMER_LIST_H</span></div>
|
||||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#define ___CUSTOMER_LIST_H</span></div>
|
||||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  </div>
|
||||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include <stdbool.h></span></div>
|
||||
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">// TODO: Define a symbolic constant named 'MAX_LIST_ENTRIES' for 13 customers</span></div>
|
||||
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#define MAX_LIST_ENTRIES 13</span></div>
|
||||
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment">// TODO Declare the 'public' data type of the list entry</span></div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_customer_list_entry_data.html">CustomerListEntryData</a>* <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a>;</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// TODO Declare the 'public' data type of the list entry</span></div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_customer_list_data.html">CustomerListData</a>* <a class="code" href="struct_customer_list_data.html">CustomerList</a>;</div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// Note a really const customer list:</span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// typedef struct CustomerListData const* ConstCustomerList;</span></div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> init_customer_list();</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  </div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="keywordtype">int</span> get_length(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl);</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> create_customer(<span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> <span class="keywordtype">char</span>* customer_name, <span class="keywordtype">int</span> revenue);</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  </div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">bool</span> add_customer(<a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> <span class="keywordtype">char</span>* customer_name, <span class="keywordtype">int</span> revenue);</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  </div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">bool</span> add_customers(<a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> <a class="code" href="struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e">customers</a>[], <span class="keywordtype">int</span> n);</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  </div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> get_customer_with_index(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index);</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> get_customer_with_id(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <span class="keywordtype">int</span> <span class="keywordtype">id</span>);</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  </div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="keywordtype">int</span> get_customers_with_revenue(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <span class="keywordtype">int</span> lower_bound, <span class="keywordtype">int</span> upper_bound, <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> result_list[], <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> result_len);</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  </div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> get_customer_with_highest_revenue(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl);</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  </div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> get_customer_with_lowest_revenue(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl);</div>
|
||||
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="keywordtype">int</span> get_top_n_customers_revenue(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <span class="keywordtype">int</span> n, <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> result_list[]);</div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  </div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="keywordtype">int</span> get_bottom_n_customers_revenue(<span class="keyword">const</span> <a class="code" href="struct_customer_list_data.html">CustomerList</a> cl, <span class="keywordtype">int</span> n, <a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> result_list[]);</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  </div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="keywordtype">int</span> get_customer_id(<a class="code" href="struct_customer_list_entry_data.html">CustomerListEntry</a> customer);</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="astruct_customer_list_entry_data_html"><div class="ttname"><a href="struct_customer_list_entry_data.html">CustomerListEntryData</a></div><div class="ttdef"><b>Definition:</b> customer_list.c:16</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_data_html_a3a6c2578ba2d68477bf92c968b8fcf6e"><div class="ttname"><a href="struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e">CustomerListData::customers</a></div><div class="ttdeci">CustomerListEntry customers[MAX_LIST_ENTRIES]</div><div class="ttdef"><b>Definition:</b> customer_list.c:29</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_entry_data_html_ab1b5724481bf61b8d7e65747fa5937b7"><div class="ttname"><a href="struct_customer_list_entry_data.html#ab1b5724481bf61b8d7e65747fa5937b7">CustomerListEntryData::revenue</a></div><div class="ttdeci">int revenue</div><div class="ttdef"><b>Definition:</b> customer_list.c:22</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_data_html"><div class="ttname"><a href="struct_customer_list_data.html">CustomerListData</a></div><div class="ttdef"><b>Definition:</b> customer_list.c:25</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_data_html_a9f59b34b1f25fe00023291b678246bcc"><div class="ttname"><a href="struct_customer_list_data.html#a9f59b34b1f25fe00023291b678246bcc">CustomerListData::length</a></div><div class="ttdeci">int length</div><div class="ttdef"><b>Definition:</b> customer_list.c:27</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_entry_data_html_a2df29a9c224534df43504feb53c3d3f6"><div class="ttname"><a href="struct_customer_list_entry_data.html#a2df29a9c224534df43504feb53c3d3f6">CustomerListEntryData::customer_name</a></div><div class="ttdeci">const char * customer_name</div><div class="ttdef"><b>Definition:</b> customer_list.c:20</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_entry_data_html_a7441ef0865bcb3db9b8064dd7375c1ea"><div class="ttname"><a href="struct_customer_list_entry_data.html#a7441ef0865bcb3db9b8064dd7375c1ea">CustomerListEntryData::id</a></div><div class="ttdeci">int id</div><div class="ttdef"><b>Definition:</b> customer_list.c:18</div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/doc.png
Normal file
|
After Width: | Height: | Size: 746 B |
1730
html/doxygen.css
Normal file
BIN
html/doxygen.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
121
html/dynsections.js
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function toggleVisibility(linkObj)
|
||||
{
|
||||
var base = $(linkObj).attr('id');
|
||||
var summary = $('#'+base+'-summary');
|
||||
var content = $('#'+base+'-content');
|
||||
var trigger = $('#'+base+'-trigger');
|
||||
var src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateStripes()
|
||||
{
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
}
|
||||
|
||||
function toggleLevel(level)
|
||||
{
|
||||
$('table.directory tr').each(function() {
|
||||
var l = this.id.split('_').length-1;
|
||||
var i = $('#img'+this.id.substring(3));
|
||||
var a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
function toggleFolder(id)
|
||||
{
|
||||
// the clicked row
|
||||
var currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
var rows = currentRow.nextAll("tr");
|
||||
|
||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
var childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
var childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
|
||||
function toggleInherit(id)
|
||||
{
|
||||
var rows = $('tr.inherit.'+id);
|
||||
var img = $('tr.inherit_header.'+id+' img');
|
||||
var src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
}
|
||||
/* @license-end */
|
||||
84
html/files.html
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: File List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">File List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="customer__list_8h_source.html"><span class="icondoc"></span></a><b>customer_list.h</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="mainpage_8h_source.html"><span class="icondoc"></span></a><a class="el" href="mainpage_8h.html" target="_self">mainpage.h</a></td><td class="desc">Beschreibung der Aufgabe Customer List </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="shortcut_8h_source.html"><span class="icondoc"></span></a><b>shortcut.h</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="test__customer__list_8h_source.html"><span class="icondoc"></span></a><b>test_customer_list.h</b></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/folderclosed.png
Normal file
|
After Width: | Height: | Size: 616 B |
BIN
html/folderopen.png
Normal file
|
After Width: | Height: | Size: 597 B |
95
html/functions.html
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: Data Fields</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:</div><ul>
|
||||
<li>customer_name
|
||||
: <a class="el" href="struct_customer_list_entry_data.html#a2df29a9c224534df43504feb53c3d3f6">CustomerListEntryData</a>
|
||||
</li>
|
||||
<li>customers
|
||||
: <a class="el" href="struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e">CustomerListData</a>
|
||||
</li>
|
||||
<li>id
|
||||
: <a class="el" href="struct_customer_list_entry_data.html#a7441ef0865bcb3db9b8064dd7375c1ea">CustomerListEntryData</a>
|
||||
</li>
|
||||
<li>length
|
||||
: <a class="el" href="struct_customer_list_data.html#a9f59b34b1f25fe00023291b678246bcc">CustomerListData</a>
|
||||
</li>
|
||||
<li>revenue
|
||||
: <a class="el" href="struct_customer_list_entry_data.html#ab1b5724481bf61b8d7e65747fa5937b7">CustomerListEntryData</a>
|
||||
</li>
|
||||
<li>success
|
||||
: <a class="el" href="struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56">TestCase</a>
|
||||
</li>
|
||||
<li>test_function
|
||||
: <a class="el" href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568">TestCase</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
95
html/functions_vars.html
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: Data Fields - Variables</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>customer_name
|
||||
: <a class="el" href="struct_customer_list_entry_data.html#a2df29a9c224534df43504feb53c3d3f6">CustomerListEntryData</a>
|
||||
</li>
|
||||
<li>customers
|
||||
: <a class="el" href="struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e">CustomerListData</a>
|
||||
</li>
|
||||
<li>id
|
||||
: <a class="el" href="struct_customer_list_entry_data.html#a7441ef0865bcb3db9b8064dd7375c1ea">CustomerListEntryData</a>
|
||||
</li>
|
||||
<li>length
|
||||
: <a class="el" href="struct_customer_list_data.html#a9f59b34b1f25fe00023291b678246bcc">CustomerListData</a>
|
||||
</li>
|
||||
<li>revenue
|
||||
: <a class="el" href="struct_customer_list_entry_data.html#ab1b5724481bf61b8d7e65747fa5937b7">CustomerListEntryData</a>
|
||||
</li>
|
||||
<li>success
|
||||
: <a class="el" href="struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56">TestCase</a>
|
||||
</li>
|
||||
<li>test_function
|
||||
: <a class="el" href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568">TestCase</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
149
html/index.html
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: Customer List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Customer List </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>Peter Bauer, Stefan Schraml</dd></dl>
|
||||
<p>German variant below</p>
|
||||
<h1><a class="anchor" id="intro"></a>
|
||||
Introduction</h1>
|
||||
<p>Your task is to implement a customer list. The focus is on administrative functions (initializing, adding customers to the list) and simple overview functions (list length, listing customers with specific revenues).</p>
|
||||
<h1><a class="anchor" id="datastructures"></a>
|
||||
Data Structures</h1>
|
||||
<h2><a class="anchor" id="CustomerList"></a>
|
||||
CustomerList</h2>
|
||||
<p>The <code>CustomerList</code> has a maximum of 13 entries. The <code>CustomerList</code> is a struct with the following fields:</p><ul>
|
||||
<li><code>length</code> (int): The number of entries in the list.</li>
|
||||
<li><code>customers</code> (array of pointers to <code>struct CustomerListEntry</code>): see below.</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" id="CustomerListEntry"></a>
|
||||
CustomerListEntry</h2>
|
||||
<p>A <code>CustomerListEntry</code> contains all data related to a customer, including:</p><ul>
|
||||
<li><code>id</code> (int): The unique customer ID.</li>
|
||||
<li><code>customer_name</code> (const pointer to a char (const char* customer_name)): The name of the customer.</li>
|
||||
<li><code>revenue</code> (int): The revenue generated with the customer, measured in €1000.</li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="Functions"></a>
|
||||
Functions</h1>
|
||||
<ul>
|
||||
<li><code>init_customer_list()</code>: Sets the number of entries to 0.</li>
|
||||
<li><code>get_length()</code>: Returns the number of entries in the list.</li>
|
||||
<li><code>create_customer()</code>: Creates a new customer.</li>
|
||||
<li><code>add_customer()</code>: Adds a single entry to the list.</li>
|
||||
<li><code>add_customers()</code>: Adds multiple entries to the list.</li>
|
||||
<li><code>get_customer_with_index()</code>: Retrieves the customer at a specific index in the list.</li>
|
||||
<li><code>get_customer_with_id()</code>: Searches for a customer with a specific ID.</li>
|
||||
<li><code>get_customers_with_revenue()</code>: Finds customers within specific revenue bounds.</li>
|
||||
<li><code>get_customer_with_highest_revenue()</code>: Finds the customer with the highest revenue.</li>
|
||||
<li><code>get_customer_with_lowest_revenue()</code>: Finds the customer with the lowest revenue.</li>
|
||||
<li><code>get_top_n_customers_revenue()</code>: Finds the top <code>n</code> customers with the highest revenue.</li>
|
||||
<li><code>get_bottom_n_customers_revenue()</code>: Finds the bottom <code>n</code> customers with the lowest revenue.</li>
|
||||
<li><code>get_customer_id()</code>: Retrieves the ID of a customer.</li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="intro_de"></a>
|
||||
Einführung</h1>
|
||||
<p>Sie haben die Aufgabe eine Kundenliste zu implementieren. Wir beschränken uns auf Verwaltungsfunktionen (Initialisieren, Kunden in die Liste einzutragen) und kleine Überblicksfunktionen (Länge der Liste, Auflisten von Kunden mit bestimmten Umsätzen).</p>
|
||||
<h1><a class="anchor" id="datastructures_de"></a>
|
||||
Die Datenstrukturen</h1>
|
||||
<h2><a class="anchor" id="CustomerList"></a>
|
||||
CustomerList</h2>
|
||||
<p>Die CustomerList hat eine maximale Anzahl von 13 Einträgen. Die CustomerList ist ein struct mit den Feldern</p><ul>
|
||||
<li>length (int)</li>
|
||||
<li>customers (Array von Pointern auf ein struct CustomerListEntry): siehe unten</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" id="CustomerListEntry"></a>
|
||||
CustomerListEntry</h2>
|
||||
<p>Ein CustomerListEntry hält alle Daten, die zu einem Kunden gehören, welche sind:</p><ul>
|
||||
<li>id (int): Die eindeutige Kundennummer.</li>
|
||||
<li>customer_name (const Pointer auf ein char (const char* customer_name))</li>
|
||||
<li>revenue (int): Der Umsatz, der mit dem Kunden erzielt wurde in 1000 €</li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="Die"></a>
|
||||
Funktionen</h1>
|
||||
<ul>
|
||||
<li>init_customer_list(): Setzt die Anzahl der Einträge auf 0.</li>
|
||||
<li>get_length(): Gibt die Anzahl der Einträge zurück.</li>
|
||||
<li>create_customer(): Erstellt einen neuen Kunden.</li>
|
||||
<li>add_customer(): Fügt einen Eintrag hinzu.</li>
|
||||
<li>add_customers(): Fügt mehrere Einträge hinzu.</li>
|
||||
<li>get_customer_with_index(): Liefert den Kunden mit dem Index innerhalb der Liste.</li>
|
||||
<li>get_customer_with_id(): Sucht einen Kunden mit einer bestimmten ID.</li>
|
||||
<li>get_customers_with_revenue(): Sucht Kunden innerhalb bestimmter Umsatzgrenzen.</li>
|
||||
<li>get_customer_with_highest_revenue(): Sucht den Kunden mit dem höchsten Umsatz.</li>
|
||||
<li>get_customer_with_lowest_revenue(): Sucht den Kunden mit dem niedrigsten Umsatz.</li>
|
||||
<li>get_top_n_customers_revenue(): Sucht die n Kunden mit dem höchsten Umsatz.</li>
|
||||
<li>get_bottom_n_customers_revenue(): Sucht die n Kunden mit dem niedrigsten Umsatz</li>
|
||||
<li>get_customer_id(): Liefert die ID eines Kunden. </li>
|
||||
</ul>
|
||||
</div></div><!-- PageDoc -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
35
html/jquery.js
vendored
Normal file
83
html/mainpage_8h.html
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: mainpage.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">mainpage.h File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Beschreibung der Aufgabe Customer List.
|
||||
<a href="#details">More...</a></p>
|
||||
|
||||
<p><a href="mainpage_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Beschreibung der Aufgabe Customer List. </p>
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
77
html/mainpage_8h_source.html
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: mainpage.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">mainpage.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="mainpage_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
51
html/menu.js
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
var result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (var i in data.children) {
|
||||
result+='<li><a href="'+relPath+data.children[i].url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
$('#main-menu').append('<li style="float:right"><div id="MSearchBox" class="MSearchBoxInactive"><div class="left"><form id="FSearchBox" action="'+relPath+searchPage+'" method="get"><img id="MSearchSelect" src="'+relPath+'search/mag.png" alt=""/><input type="text" id="MSearchField" name="query" value="'+search+'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"></form></div><div class="right"></div></div></li>');
|
||||
} else {
|
||||
$('#main-menu').append('<li style="float:right"><div id="MSearchBox" class="MSearchBoxInactive"><span class="left"><img id="MSearchSelect" src="'+relPath+'search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/><input type="text" id="MSearchField" value="'+search+'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/></span><span class="right"><a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="'+relPath+'search/close.png" alt=""/></a></span></div></li>');
|
||||
}
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
||||
34
html/menudata.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Main Page",url:"index.html"},
|
||||
{text:"Data Structures",url:"annotated.html",children:[
|
||||
{text:"Data Structures",url:"annotated.html"},
|
||||
{text:"Data Structure Index",url:"classes.html"},
|
||||
{text:"Data Fields",url:"functions.html",children:[
|
||||
{text:"All",url:"functions.html"},
|
||||
{text:"Variables",url:"functions_vars.html"}]}]},
|
||||
{text:"Files",url:"files.html",children:[
|
||||
{text:"File List",url:"files.html"}]}]}
|
||||
BIN
html/nav_f.png
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
html/nav_g.png
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
html/nav_h.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
html/open.png
Normal file
|
After Width: | Height: | Size: 123 B |
36
html/search/all_0.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
9
html/search/all_0.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var searchData=
|
||||
[
|
||||
['customer_5fname_0',['customer_name',['../struct_customer_list_entry_data.html#a2df29a9c224534df43504feb53c3d3f6',1,'CustomerListEntryData']]],
|
||||
['customerlistdata_1',['CustomerListData',['../struct_customer_list_data.html',1,'']]],
|
||||
['customerlistentrydata_2',['CustomerListEntryData',['../struct_customer_list_entry_data.html',1,'']]],
|
||||
['customers_3',['customers',['../struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e',1,'CustomerListData']]],
|
||||
['customertestdata_4',['CustomerTestData',['../struct_customer_test_data.html',1,'']]],
|
||||
['customer_20list_5',['Customer List',['../index.html',1,'']]]
|
||||
];
|
||||
36
html/search/all_1.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_1.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/all_1.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['id_6',['id',['../struct_customer_list_entry_data.html#a7441ef0865bcb3db9b8064dd7375c1ea',1,'CustomerListEntryData']]]
|
||||
];
|
||||
36
html/search/all_2.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_2.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/all_2.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['length_7',['length',['../struct_customer_list_data.html#a9f59b34b1f25fe00023291b678246bcc',1,'CustomerListData']]]
|
||||
];
|
||||
36
html/search/all_3.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_3.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/all_3.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['mainpage_2eh_8',['mainpage.h',['../mainpage_8h.html',1,'']]]
|
||||
];
|
||||
36
html/search/all_4.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_4.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/all_4.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['revenue_9',['revenue',['../struct_customer_list_entry_data.html#ab1b5724481bf61b8d7e65747fa5937b7',1,'CustomerListEntryData']]]
|
||||
];
|
||||
36
html/search/all_5.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_5.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/all_5.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['success_10',['success',['../struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56',1,'TestCase']]]
|
||||
];
|
||||
36
html/search/all_6.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_6.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
html/search/all_6.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
var searchData=
|
||||
[
|
||||
['test_5ffunction_11',['test_function',['../struct_test_case.html#a7774676f61d8e41df3862d4d707ef568',1,'TestCase']]],
|
||||
['testcase_12',['TestCase',['../struct_test_case.html',1,'']]]
|
||||
];
|
||||
36
html/search/classes_0.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="classes_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
6
html/search/classes_0.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
var searchData=
|
||||
[
|
||||
['customerlistdata_13',['CustomerListData',['../struct_customer_list_data.html',1,'']]],
|
||||
['customerlistentrydata_14',['CustomerListEntryData',['../struct_customer_list_entry_data.html',1,'']]],
|
||||
['customertestdata_15',['CustomerTestData',['../struct_customer_test_data.html',1,'']]]
|
||||
];
|
||||
36
html/search/classes_1.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="classes_1.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/classes_1.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['testcase_16',['TestCase',['../struct_test_case.html',1,'']]]
|
||||
];
|
||||
BIN
html/search/close.png
Normal file
|
After Width: | Height: | Size: 273 B |
36
html/search/files_0.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="files_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/files_0.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['mainpage_2eh_17',['mainpage.h',['../mainpage_8h.html',1,'']]]
|
||||
];
|
||||
BIN
html/search/mag_sel.png
Normal file
|
After Width: | Height: | Size: 465 B |
12
html/search/nomatches.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
36
html/search/pages_0.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="pages_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/pages_0.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['customer_20list_25',['Customer List',['../index.html',1,'']]]
|
||||
];
|
||||
271
html/search/search.css
Normal file
|
|
@ -0,0 +1,271 @@
|
|||
/*---------------- Search Box */
|
||||
|
||||
#FSearchBox {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#MSearchBox {
|
||||
white-space : nowrap;
|
||||
float: none;
|
||||
margin-top: 8px;
|
||||
right: 0px;
|
||||
width: 170px;
|
||||
height: 24px;
|
||||
z-index: 102;
|
||||
}
|
||||
|
||||
#MSearchBox .left
|
||||
{
|
||||
display:block;
|
||||
position:absolute;
|
||||
left:10px;
|
||||
width:20px;
|
||||
height:19px;
|
||||
background:url('search_l.png') no-repeat;
|
||||
background-position:right;
|
||||
}
|
||||
|
||||
#MSearchSelect {
|
||||
display:block;
|
||||
position:absolute;
|
||||
width:20px;
|
||||
height:19px;
|
||||
}
|
||||
|
||||
.left #MSearchSelect {
|
||||
left:4px;
|
||||
}
|
||||
|
||||
.right #MSearchSelect {
|
||||
right:5px;
|
||||
}
|
||||
|
||||
#MSearchField {
|
||||
display:block;
|
||||
position:absolute;
|
||||
height:19px;
|
||||
background:url('search_m.png') repeat-x;
|
||||
border:none;
|
||||
width:115px;
|
||||
margin-left:20px;
|
||||
padding-left:4px;
|
||||
color: #909090;
|
||||
outline: none;
|
||||
font: 9pt Arial, Verdana, sans-serif;
|
||||
-webkit-border-radius: 0px;
|
||||
}
|
||||
|
||||
#FSearchBox #MSearchField {
|
||||
margin-left:15px;
|
||||
}
|
||||
|
||||
#MSearchBox .right {
|
||||
display:block;
|
||||
position:absolute;
|
||||
right:10px;
|
||||
top:8px;
|
||||
width:20px;
|
||||
height:19px;
|
||||
background:url('search_r.png') no-repeat;
|
||||
background-position:left;
|
||||
}
|
||||
|
||||
#MSearchClose {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
background : none;
|
||||
border: none;
|
||||
margin: 0px 4px 0px 0px;
|
||||
padding: 0px 0px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.left #MSearchClose {
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.right #MSearchClose {
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.MSearchBoxActive #MSearchField {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/*---------------- Search filter selection */
|
||||
|
||||
#MSearchSelectWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid #90A5CE;
|
||||
background-color: #F9FAFC;
|
||||
z-index: 10001;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.SelectItem {
|
||||
font: 8pt Arial, Verdana, sans-serif;
|
||||
padding-left: 2px;
|
||||
padding-right: 12px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
span.SelectionMark {
|
||||
margin-right: 4px;
|
||||
font-family: monospace;
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem {
|
||||
display: block;
|
||||
outline-style: none;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
padding-left: 6px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
a.SelectItem:focus,
|
||||
a.SelectItem:active {
|
||||
color: #000000;
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem:hover {
|
||||
color: #FFFFFF;
|
||||
background-color: #3D578C;
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*---------------- Search results window */
|
||||
|
||||
iframe#MSearchResults {
|
||||
width: 60ex;
|
||||
height: 15em;
|
||||
}
|
||||
|
||||
#MSearchResultsWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid #000;
|
||||
background-color: #EEF1F7;
|
||||
z-index:10000;
|
||||
}
|
||||
|
||||
/* ----------------------------------- */
|
||||
|
||||
|
||||
#SRIndex {
|
||||
clear:both;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.SREntry {
|
||||
font-size: 10pt;
|
||||
padding-left: 1ex;
|
||||
}
|
||||
|
||||
.SRPage .SREntry {
|
||||
font-size: 8pt;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
body.SRPage {
|
||||
margin: 5px 2px;
|
||||
}
|
||||
|
||||
.SRChildren {
|
||||
padding-left: 3ex; padding-bottom: .5em
|
||||
}
|
||||
|
||||
.SRPage .SRChildren {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.SRSymbol {
|
||||
font-weight: bold;
|
||||
color: #425E97;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRScope {
|
||||
display: block;
|
||||
color: #425E97;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRSymbol:focus, a.SRSymbol:active,
|
||||
a.SRScope:focus, a.SRScope:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
span.SRScope {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.SRPage .SRStatus {
|
||||
padding: 2px 5px;
|
||||
font-size: 8pt;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.SRResult {
|
||||
display: none;
|
||||
}
|
||||
|
||||
DIV.searchresults {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/*---------------- External search page results */
|
||||
|
||||
.searchresult {
|
||||
background-color: #F0F3F8;
|
||||
}
|
||||
|
||||
.pages b {
|
||||
color: white;
|
||||
padding: 5px 5px 3px 5px;
|
||||
background-image: url("../tab_a.png");
|
||||
background-repeat: repeat-x;
|
||||
text-shadow: 0 1px 1px #000000;
|
||||
}
|
||||
|
||||
.pages {
|
||||
line-height: 17px;
|
||||
margin-left: 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hl {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.searchpages {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
814
html/search/search.js
Normal file
|
|
@ -0,0 +1,814 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function convertToId(search)
|
||||
{
|
||||
var result = '';
|
||||
for (i=0;i<search.length;i++)
|
||||
{
|
||||
var c = search.charAt(i);
|
||||
var cn = c.charCodeAt(0);
|
||||
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
|
||||
{
|
||||
result+=c;
|
||||
}
|
||||
else if (cn<16)
|
||||
{
|
||||
result+="_0"+cn.toString(16);
|
||||
}
|
||||
else
|
||||
{
|
||||
result+="_"+cn.toString(16);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function getXPos(item)
|
||||
{
|
||||
var x = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
x += item.offsetLeft;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
function getYPos(item)
|
||||
{
|
||||
var y = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
y += item.offsetTop;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
/* A class handling everything associated with the search panel.
|
||||
|
||||
Parameters:
|
||||
name - The name of the global variable that will be
|
||||
storing this instance. Is needed to be able to set timeouts.
|
||||
resultPath - path to use for external files
|
||||
*/
|
||||
function SearchBox(name, resultsPath, inFrame, label)
|
||||
{
|
||||
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||
|
||||
// ---------- Instance variables
|
||||
this.name = name;
|
||||
this.resultsPath = resultsPath;
|
||||
this.keyTimeout = 0;
|
||||
this.keyTimeoutLength = 500;
|
||||
this.closeSelectionTimeout = 300;
|
||||
this.lastSearchValue = "";
|
||||
this.lastResultsPage = "";
|
||||
this.hideTimeout = 0;
|
||||
this.searchIndex = 0;
|
||||
this.searchActive = false;
|
||||
this.insideFrame = inFrame;
|
||||
this.searchLabel = label;
|
||||
|
||||
// ----------- DOM Elements
|
||||
|
||||
this.DOMSearchField = function()
|
||||
{ return document.getElementById("MSearchField"); }
|
||||
|
||||
this.DOMSearchSelect = function()
|
||||
{ return document.getElementById("MSearchSelect"); }
|
||||
|
||||
this.DOMSearchSelectWindow = function()
|
||||
{ return document.getElementById("MSearchSelectWindow"); }
|
||||
|
||||
this.DOMPopupSearchResults = function()
|
||||
{ return document.getElementById("MSearchResults"); }
|
||||
|
||||
this.DOMPopupSearchResultsWindow = function()
|
||||
{ return document.getElementById("MSearchResultsWindow"); }
|
||||
|
||||
this.DOMSearchClose = function()
|
||||
{ return document.getElementById("MSearchClose"); }
|
||||
|
||||
this.DOMSearchBox = function()
|
||||
{ return document.getElementById("MSearchBox"); }
|
||||
|
||||
// ------------ Event Handlers
|
||||
|
||||
// Called when focus is added or removed from the search field.
|
||||
this.OnSearchFieldFocus = function(isActive)
|
||||
{
|
||||
this.Activate(isActive);
|
||||
}
|
||||
|
||||
this.OnSearchSelectShow = function()
|
||||
{
|
||||
var searchSelectWindow = this.DOMSearchSelectWindow();
|
||||
var searchField = this.DOMSearchSelect();
|
||||
|
||||
if (this.insideFrame)
|
||||
{
|
||||
var left = getXPos(searchField);
|
||||
var top = getYPos(searchField);
|
||||
left += searchField.offsetWidth + 6;
|
||||
top += searchField.offsetHeight;
|
||||
|
||||
// show search selection popup
|
||||
searchSelectWindow.style.display='block';
|
||||
left -= searchSelectWindow.offsetWidth;
|
||||
searchSelectWindow.style.left = left + 'px';
|
||||
searchSelectWindow.style.top = top + 'px';
|
||||
}
|
||||
else
|
||||
{
|
||||
var left = getXPos(searchField);
|
||||
var top = getYPos(searchField);
|
||||
top += searchField.offsetHeight;
|
||||
|
||||
// show search selection popup
|
||||
searchSelectWindow.style.display='block';
|
||||
searchSelectWindow.style.left = left + 'px';
|
||||
searchSelectWindow.style.top = top + 'px';
|
||||
}
|
||||
|
||||
// stop selection hide timer
|
||||
if (this.hideTimeout)
|
||||
{
|
||||
clearTimeout(this.hideTimeout);
|
||||
this.hideTimeout=0;
|
||||
}
|
||||
return false; // to avoid "image drag" default event
|
||||
}
|
||||
|
||||
this.OnSearchSelectHide = function()
|
||||
{
|
||||
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
|
||||
this.closeSelectionTimeout);
|
||||
}
|
||||
|
||||
// Called when the content of the search field is changed.
|
||||
this.OnSearchFieldChange = function(evt)
|
||||
{
|
||||
if (this.keyTimeout) // kill running timer
|
||||
{
|
||||
clearTimeout(this.keyTimeout);
|
||||
this.keyTimeout = 0;
|
||||
}
|
||||
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 || e.keyCode==13)
|
||||
{
|
||||
if (e.shiftKey==1)
|
||||
{
|
||||
this.OnSearchSelectShow();
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
child.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.frames.MSearchResults.postMessage("take_focus", "*");
|
||||
}
|
||||
}
|
||||
else if (e.keyCode==27) // Escape out of the search field
|
||||
{
|
||||
this.DOMSearchField().blur();
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
this.Activate(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// strip whitespaces
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
|
||||
if (searchValue != this.lastSearchValue) // search value has changed
|
||||
{
|
||||
if (searchValue != "") // non-empty search
|
||||
{
|
||||
// set timer for search update
|
||||
this.keyTimeout = setTimeout(this.name + '.Search()',
|
||||
this.keyTimeoutLength);
|
||||
}
|
||||
else // empty search field
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.SelectItemCount = function(id)
|
||||
{
|
||||
var count=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
this.SelectItemSet = function(id)
|
||||
{
|
||||
var i,j=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
var node = child.firstChild;
|
||||
if (j==id)
|
||||
{
|
||||
node.innerHTML='•';
|
||||
}
|
||||
else
|
||||
{
|
||||
node.innerHTML=' ';
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when an search filter selection is made.
|
||||
// set item with index id as the active item
|
||||
this.OnSelectItem = function(id)
|
||||
{
|
||||
this.searchIndex = id;
|
||||
this.SelectItemSet(id);
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
if (searchValue!="" && this.searchActive) // something was found -> do a search
|
||||
{
|
||||
this.Search();
|
||||
}
|
||||
}
|
||||
|
||||
this.OnSearchSelectKey = function(evt)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
|
||||
{
|
||||
this.searchIndex++;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==38 && this.searchIndex>0) // Up
|
||||
{
|
||||
this.searchIndex--;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==13 || e.keyCode==27)
|
||||
{
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
this.CloseSelectionWindow();
|
||||
this.DOMSearchField().focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------- Actions
|
||||
|
||||
// Closes the results window.
|
||||
this.CloseResultsWindow = function()
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.Activate(false);
|
||||
}
|
||||
|
||||
this.CloseSelectionWindow = function()
|
||||
{
|
||||
this.DOMSearchSelectWindow().style.display = 'none';
|
||||
}
|
||||
|
||||
// Performs a search.
|
||||
this.Search = function()
|
||||
{
|
||||
this.keyTimeout = 0;
|
||||
|
||||
// strip leading whitespace
|
||||
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
|
||||
|
||||
var code = searchValue.toLowerCase().charCodeAt(0);
|
||||
var idxChar = searchValue.substr(0, 1).toLowerCase();
|
||||
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
|
||||
{
|
||||
idxChar = searchValue.substr(0, 2);
|
||||
}
|
||||
|
||||
var resultsPage;
|
||||
var resultsPageWithSearch;
|
||||
var hasResultsPage;
|
||||
|
||||
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
|
||||
if (idx!=-1)
|
||||
{
|
||||
var hexCode=idx.toString(16);
|
||||
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
|
||||
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
|
||||
hasResultsPage = true;
|
||||
}
|
||||
else // nothing available for this search term
|
||||
{
|
||||
resultsPage = this.resultsPath + '/nomatches.html';
|
||||
resultsPageWithSearch = resultsPage;
|
||||
hasResultsPage = false;
|
||||
}
|
||||
|
||||
window.frames.MSearchResults.location = resultsPageWithSearch;
|
||||
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
|
||||
|
||||
if (domPopupSearchResultsWindow.style.display!='block')
|
||||
{
|
||||
var domSearchBox = this.DOMSearchBox();
|
||||
this.DOMSearchClose().style.display = 'inline';
|
||||
if (this.insideFrame)
|
||||
{
|
||||
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||
domPopupSearchResultsWindow.style.position = 'relative';
|
||||
domPopupSearchResultsWindow.style.display = 'block';
|
||||
var width = document.body.clientWidth - 8; // the -8 is for IE :-(
|
||||
domPopupSearchResultsWindow.style.width = width + 'px';
|
||||
domPopupSearchResults.style.width = width + 'px';
|
||||
}
|
||||
else
|
||||
{
|
||||
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||
var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
|
||||
var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
|
||||
domPopupSearchResultsWindow.style.display = 'block';
|
||||
left -= domPopupSearchResults.offsetWidth;
|
||||
domPopupSearchResultsWindow.style.top = top + 'px';
|
||||
domPopupSearchResultsWindow.style.left = left + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
this.lastSearchValue = searchValue;
|
||||
this.lastResultsPage = resultsPage;
|
||||
}
|
||||
|
||||
// -------- Activation Functions
|
||||
|
||||
// Activates or deactivates the search panel, resetting things to
|
||||
// their default values if necessary.
|
||||
this.Activate = function(isActive)
|
||||
{
|
||||
if (isActive || // open it
|
||||
this.DOMPopupSearchResultsWindow().style.display == 'block'
|
||||
)
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxActive';
|
||||
|
||||
var searchField = this.DOMSearchField();
|
||||
|
||||
if (searchField.value == this.searchLabel) // clear "Search" term upon entry
|
||||
{
|
||||
searchField.value = '';
|
||||
this.searchActive = true;
|
||||
}
|
||||
}
|
||||
else if (!isActive) // directly remove the panel
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxInactive';
|
||||
this.DOMSearchField().value = this.searchLabel;
|
||||
this.searchActive = false;
|
||||
this.lastSearchValue = ''
|
||||
this.lastResultsPage = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// The class that handles everything on the search results page.
|
||||
function SearchResults(name)
|
||||
{
|
||||
// The number of matches from the last run of <Search()>.
|
||||
this.lastMatchCount = 0;
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
|
||||
// Toggles the visibility of the passed element ID.
|
||||
this.FindChildElement = function(id)
|
||||
{
|
||||
var parentElement = document.getElementById(id);
|
||||
var element = parentElement.firstChild;
|
||||
|
||||
while (element && element!=parentElement)
|
||||
{
|
||||
if (element.nodeName == 'DIV' && element.className == 'SRChildren')
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
if (element.nodeName == 'DIV' && element.hasChildNodes())
|
||||
{
|
||||
element = element.firstChild;
|
||||
}
|
||||
else if (element.nextSibling)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
element = element.parentNode;
|
||||
}
|
||||
while (element && element!=parentElement && !element.nextSibling);
|
||||
|
||||
if (element && element!=parentElement)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.Toggle = function(id)
|
||||
{
|
||||
var element = this.FindChildElement(id);
|
||||
if (element)
|
||||
{
|
||||
if (element.style.display == 'block')
|
||||
{
|
||||
element.style.display = 'none';
|
||||
}
|
||||
else
|
||||
{
|
||||
element.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Searches for the passed string. If there is no parameter,
|
||||
// it takes it from the URL query.
|
||||
//
|
||||
// Always returns true, since other documents may try to call it
|
||||
// and that may or may not be possible.
|
||||
this.Search = function(search)
|
||||
{
|
||||
if (!search) // get search word from URL
|
||||
{
|
||||
search = window.location.search;
|
||||
search = search.substring(1); // Remove the leading '?'
|
||||
search = unescape(search);
|
||||
}
|
||||
|
||||
search = search.replace(/^ +/, ""); // strip leading spaces
|
||||
search = search.replace(/ +$/, ""); // strip trailing spaces
|
||||
search = search.toLowerCase();
|
||||
search = convertToId(search);
|
||||
|
||||
var resultRows = document.getElementsByTagName("div");
|
||||
var matches = 0;
|
||||
|
||||
var i = 0;
|
||||
while (i < resultRows.length)
|
||||
{
|
||||
var row = resultRows.item(i);
|
||||
if (row.className == "SRResult")
|
||||
{
|
||||
var rowMatchName = row.id.toLowerCase();
|
||||
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
|
||||
|
||||
if (search.length<=rowMatchName.length &&
|
||||
rowMatchName.substr(0, search.length)==search)
|
||||
{
|
||||
row.style.display = 'block';
|
||||
matches++;
|
||||
}
|
||||
else
|
||||
{
|
||||
row.style.display = 'none';
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
document.getElementById("Searching").style.display='none';
|
||||
if (matches == 0) // no results
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='block';
|
||||
}
|
||||
else // at least one result
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='none';
|
||||
}
|
||||
this.lastMatchCount = matches;
|
||||
return true;
|
||||
}
|
||||
|
||||
// return the first item with index index or higher that is visible
|
||||
this.NavNext = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index++;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.NavPrev = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index--;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.ProcessKeys = function(e)
|
||||
{
|
||||
if (e.type == "keydown")
|
||||
{
|
||||
this.repeatOn = false;
|
||||
this.lastKey = e.keyCode;
|
||||
}
|
||||
else if (e.type == "keypress")
|
||||
{
|
||||
if (!this.repeatOn)
|
||||
{
|
||||
if (this.lastKey) this.repeatOn = true;
|
||||
return false; // ignore first keypress after keydown
|
||||
}
|
||||
}
|
||||
else if (e.type == "keyup")
|
||||
{
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
}
|
||||
return this.lastKey!=0;
|
||||
}
|
||||
|
||||
this.Nav = function(evt,itemIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
var newIndex = itemIndex-1;
|
||||
var focusItem = this.NavPrev(newIndex);
|
||||
if (focusItem)
|
||||
{
|
||||
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
|
||||
if (child && child.style.display == 'block') // children visible
|
||||
{
|
||||
var n=0;
|
||||
var tmpElem;
|
||||
while (1) // search for last child
|
||||
{
|
||||
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
|
||||
if (tmpElem)
|
||||
{
|
||||
focusItem = tmpElem;
|
||||
}
|
||||
else // found it!
|
||||
{
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (focusItem)
|
||||
{
|
||||
focusItem.focus();
|
||||
}
|
||||
else // return focus to search field
|
||||
{
|
||||
parent.document.getElementById("MSearchField").focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = itemIndex+1;
|
||||
var focusItem;
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem && elem.style.display == 'block') // children visible
|
||||
{
|
||||
focusItem = document.getElementById('Item'+itemIndex+'_c0');
|
||||
}
|
||||
if (!focusItem) focusItem = this.NavNext(newIndex);
|
||||
if (focusItem) focusItem.focus();
|
||||
}
|
||||
else if (this.lastKey==39) // Right
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'block';
|
||||
}
|
||||
else if (this.lastKey==37) // Left
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'none';
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
parent.searchBox.CloseResultsWindow();
|
||||
parent.document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
this.NavChild = function(evt,itemIndex,childIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
if (childIndex>0)
|
||||
{
|
||||
var newIndex = childIndex-1;
|
||||
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
|
||||
}
|
||||
else // already at first child, jump to parent
|
||||
{
|
||||
document.getElementById('Item'+itemIndex).focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = childIndex+1;
|
||||
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
|
||||
if (!elem) // last child, jump to parent next parent
|
||||
{
|
||||
elem = this.NavNext(itemIndex+1);
|
||||
}
|
||||
if (elem)
|
||||
{
|
||||
elem.focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
parent.searchBox.CloseResultsWindow();
|
||||
parent.document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setKeyActions(elem,action)
|
||||
{
|
||||
elem.setAttribute('onkeydown',action);
|
||||
elem.setAttribute('onkeypress',action);
|
||||
elem.setAttribute('onkeyup',action);
|
||||
}
|
||||
|
||||
function setClassAttr(elem,attr)
|
||||
{
|
||||
elem.setAttribute('class',attr);
|
||||
elem.setAttribute('className',attr);
|
||||
}
|
||||
|
||||
function createResults()
|
||||
{
|
||||
var results = document.getElementById("SRResults");
|
||||
for (var e=0; e<searchData.length; e++)
|
||||
{
|
||||
var id = searchData[e][0];
|
||||
var srResult = document.createElement('div');
|
||||
srResult.setAttribute('id','SR_'+id);
|
||||
setClassAttr(srResult,'SRResult');
|
||||
var srEntry = document.createElement('div');
|
||||
setClassAttr(srEntry,'SREntry');
|
||||
var srLink = document.createElement('a');
|
||||
srLink.setAttribute('id','Item'+e);
|
||||
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
|
||||
setClassAttr(srLink,'SRSymbol');
|
||||
srLink.innerHTML = searchData[e][1][0];
|
||||
srEntry.appendChild(srLink);
|
||||
if (searchData[e][1].length==2) // single result
|
||||
{
|
||||
srLink.setAttribute('href',searchData[e][1][1][0]);
|
||||
if (searchData[e][1][1][1])
|
||||
{
|
||||
srLink.setAttribute('target','_parent');
|
||||
}
|
||||
var srScope = document.createElement('span');
|
||||
setClassAttr(srScope,'SRScope');
|
||||
srScope.innerHTML = searchData[e][1][1][2];
|
||||
srEntry.appendChild(srScope);
|
||||
}
|
||||
else // multiple results
|
||||
{
|
||||
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
|
||||
var srChildren = document.createElement('div');
|
||||
setClassAttr(srChildren,'SRChildren');
|
||||
for (var c=0; c<searchData[e][1].length-1; c++)
|
||||
{
|
||||
var srChild = document.createElement('a');
|
||||
srChild.setAttribute('id','Item'+e+'_c'+c);
|
||||
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
|
||||
setClassAttr(srChild,'SRScope');
|
||||
srChild.setAttribute('href',searchData[e][1][c+1][0]);
|
||||
if (searchData[e][1][c+1][1])
|
||||
{
|
||||
srChild.setAttribute('target','_parent');
|
||||
}
|
||||
srChild.innerHTML = searchData[e][1][c+1][2];
|
||||
srChildren.appendChild(srChild);
|
||||
}
|
||||
srEntry.appendChild(srChildren);
|
||||
}
|
||||
srResult.appendChild(srEntry);
|
||||
results.appendChild(srResult);
|
||||
}
|
||||
}
|
||||
|
||||
function init_search()
|
||||
{
|
||||
var results = document.getElementById("MSearchSelectWindow");
|
||||
for (var key in indexSectionLabels)
|
||||
{
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('class','SelectItem');
|
||||
link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
|
||||
link.href='javascript:void(0)';
|
||||
link.innerHTML='<span class="SelectionMark"> </span>'+indexSectionLabels[key];
|
||||
results.appendChild(link);
|
||||
}
|
||||
searchBox.OnSelectItem(0);
|
||||
}
|
||||
/* @license-end */
|
||||
BIN
html/search/search_l.png
Normal file
|
After Width: | Height: | Size: 567 B |
BIN
html/search/search_m.png
Normal file
|
After Width: | Height: | Size: 158 B |
BIN
html/search/search_r.png
Normal file
|
After Width: | Height: | Size: 553 B |
27
html/search/searchdata.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
var indexSectionsWithContent =
|
||||
{
|
||||
0: "cilmrst",
|
||||
1: "ct",
|
||||
2: "m",
|
||||
3: "cilrst",
|
||||
4: "c"
|
||||
};
|
||||
|
||||
var indexSectionNames =
|
||||
{
|
||||
0: "all",
|
||||
1: "classes",
|
||||
2: "files",
|
||||
3: "variables",
|
||||
4: "pages"
|
||||
};
|
||||
|
||||
var indexSectionLabels =
|
||||
{
|
||||
0: "All",
|
||||
1: "Data Structures",
|
||||
2: "Files",
|
||||
3: "Variables",
|
||||
4: "Pages"
|
||||
};
|
||||
|
||||
36
html/search/variables_0.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="variables_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
html/search/variables_0.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
var searchData=
|
||||
[
|
||||
['customer_5fname_18',['customer_name',['../struct_customer_list_entry_data.html#a2df29a9c224534df43504feb53c3d3f6',1,'CustomerListEntryData']]],
|
||||
['customers_19',['customers',['../struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e',1,'CustomerListData']]]
|
||||
];
|
||||
36
html/search/variables_1.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="variables_1.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/variables_1.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['id_20',['id',['../struct_customer_list_entry_data.html#a7441ef0865bcb3db9b8064dd7375c1ea',1,'CustomerListEntryData']]]
|
||||
];
|
||||
36
html/search/variables_2.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="variables_2.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/variables_2.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['length_21',['length',['../struct_customer_list_data.html#a9f59b34b1f25fe00023291b678246bcc',1,'CustomerListData']]]
|
||||
];
|
||||
36
html/search/variables_3.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="variables_3.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/variables_3.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['revenue_22',['revenue',['../struct_customer_list_entry_data.html#ab1b5724481bf61b8d7e65747fa5937b7',1,'CustomerListEntryData']]]
|
||||
];
|
||||
36
html/search/variables_4.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="variables_4.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/variables_4.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['success_23',['success',['../struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56',1,'TestCase']]]
|
||||
];
|
||||
36
html/search/variables_5.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html><head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="variables_5.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
--></script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript"><!--
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
--></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4
html/search/variables_5.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['test_5ffunction_24',['test_function',['../struct_test_case.html#a7774676f61d8e41df3862d4d707ef568',1,'TestCase']]]
|
||||
];
|
||||
144
html/shortcut_8h_source.html
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: shortcut.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">shortcut.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * HTBLA-Leonding</span></div>
|
||||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * ---------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Title: shortcut</span></div>
|
||||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Author: P. Bauer</span></div>
|
||||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Date: November 03, 2010</span></div>
|
||||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * ----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * Description:</span></div>
|
||||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * A simple unit testing frame work for C.</span></div>
|
||||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * ----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> */</span></div>
|
||||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifndef ___SHORTCUT_H</span></div>
|
||||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#define ___SHORTCUT_H</span></div>
|
||||
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  </div>
|
||||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include <stdbool.h></span></div>
|
||||
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="struct_test_case.html"> 21</a></span> <span class="keyword">struct </span><a class="code" href="struct_test_case.html">TestCase</a> {</div>
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *name;</div>
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56"> 24</a></span>  <span class="keywordtype">bool</span> <a class="code" href="struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56">success</a>;</div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568"> 27</a></span>  void (*<a class="code" href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568">test_function</a>)(<span class="keyword">struct </span><a class="code" href="struct_test_case.html">TestCase</a> *tc);</div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> };</div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* version();</div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  </div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">char</span>* format_msg(<span class="keywordtype">char</span>* format, ...);</div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keywordtype">void</span> assert_true(<span class="keywordtype">bool</span> bool_expr, <span class="keyword">struct</span> <a class="code" href="struct_test_case.html">TestCase</a> *tc, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg,</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">void</span> assert_false(<span class="keywordtype">bool</span> bool_expr, <span class="keyword">struct</span> <a class="code" href="struct_test_case.html">TestCase</a>* tc, <span class="keyword">const</span> <span class="keywordtype">char</span>* msg,</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  </div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">void</span> assert_equals(<span class="keywordtype">int</span> expected, <span class="keywordtype">int</span> actual, <span class="keyword">struct</span> <a class="code" href="struct_test_case.html">TestCase</a>* tc,</div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="keywordtype">void</span> assert_equals_str(<span class="keyword">const</span> <span class="keywordtype">char</span>* expected, <span class="keywordtype">char</span>* actual, <span class="keyword">struct</span> <a class="code" href="struct_test_case.html">TestCase</a>* tc,</div>
|
||||
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">void</span> assert_equals_f(<span class="keywordtype">double</span> expected, <span class="keywordtype">double</span> actual, <span class="keywordtype">double</span> tolerance, <span class="keyword">struct</span> <a class="code" href="struct_test_case.html">TestCase</a>* tc,</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* msg, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line);</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">int</span> get_test_count();</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  </div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">bool</span> add_test(<span class="keywordtype">void</span> (*<a class="code" href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568">test_function</a>)(<span class="keyword">struct</span> <a class="code" href="struct_test_case.html">TestCase</a> *tc), <span class="keyword">const</span> <span class="keywordtype">char</span> *test_case_name);</div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">void</span> run_tests();</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  </div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="preprocessor">#define TEST(testname) void testname(struct TestCase *tc)</span></div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  </div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="preprocessor">#define MSG(format, ...) format_msg(format, ##__VA_ARGS__)</span></div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  </div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="preprocessor">#define ASSERT_TRUE(condition, msg) assert_true(condition, tc, msg, __FILE__, __LINE__)</span></div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="preprocessor">#define ASSERT_FALSE(condition, msg) assert_false(condition, tc, msg, __FILE__, __LINE__)</span></div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  </div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="preprocessor">#define ASSERT_EQUALS(expected, actual) assert_equals(expected, actual, tc, "", __FILE__, __LINE__)</span></div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor">#define ASSERT_EQUALS_STR(expected, actual, msg) assert_equals_str(expected, actual, tc, msg, __FILE__, __LINE__)</span></div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  </div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="preprocessor">#define ASSERT_EQUALS_TOLERANCE(expected, actual, tolerance) assert_equals_f(expected, actual, tolerance, tc, "", __FILE__, __LINE__)</span></div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  </div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="preprocessor">#define ASSERT_EQUALS_TOLERANCE_STR(expected, actual, tolerance, msg) assert_equals_f(expected, actual, tolerance, tc, msg, __FILE__, __LINE__)</span></div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="preprocessor">#define ADD_TEST(testfunction) add_test(testfunction, #testfunction)</span></div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  </div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="astruct_test_case_html"><div class="ttname"><a href="struct_test_case.html">TestCase</a></div><div class="ttdef"><b>Definition:</b> shortcut.h:21</div></div>
|
||||
<div class="ttc" id="astruct_test_case_html_a7774676f61d8e41df3862d4d707ef568"><div class="ttname"><a href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568">TestCase::test_function</a></div><div class="ttdeci">void(* test_function)(struct TestCase *tc)</div><div class="ttdef"><b>Definition:</b> shortcut.h:27</div></div>
|
||||
<div class="ttc" id="astruct_test_case_html_a7960f9c558f9ee2c3d4a8fdea096fb56"><div class="ttname"><a href="struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56">TestCase::success</a></div><div class="ttdeci">bool success</div><div class="ttdef"><b>Definition:</b> shortcut.h:24</div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/splitbar.png
Normal file
|
After Width: | Height: | Size: 314 B |
120
html/struct_customer_list_data.html
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: CustomerListData Struct Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-attribs">Data Fields</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">CustomerListData Struct Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||
Data Fields</h2></td></tr>
|
||||
<tr class="memitem:a9f59b34b1f25fe00023291b678246bcc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_customer_list_data.html#a9f59b34b1f25fe00023291b678246bcc">length</a></td></tr>
|
||||
<tr class="separator:a9f59b34b1f25fe00023291b678246bcc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3a6c2578ba2d68477bf92c968b8fcf6e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_customer_list_entry_data.html">CustomerListEntry</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_customer_list_data.html#a3a6c2578ba2d68477bf92c968b8fcf6e">customers</a> [MAX_LIST_ENTRIES]</td></tr>
|
||||
<tr class="separator:a3a6c2578ba2d68477bf92c968b8fcf6e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Field Documentation</h2>
|
||||
<a id="a3a6c2578ba2d68477bf92c968b8fcf6e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3a6c2578ba2d68477bf92c968b8fcf6e">◆ </a></span>customers</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="struct_customer_list_entry_data.html">CustomerListEntry</a> customers[MAX_LIST_ENTRIES]</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Array of customer list entries. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9f59b34b1f25fe00023291b678246bcc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9f59b34b1f25fe00023291b678246bcc">◆ </a></span>length</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int length</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>The number of customer list entries in the list. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>customer_list.c</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
137
html/struct_customer_list_entry_data.html
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: CustomerListEntryData Struct Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-attribs">Data Fields</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">CustomerListEntryData Struct Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||
Data Fields</h2></td></tr>
|
||||
<tr class="memitem:a7441ef0865bcb3db9b8064dd7375c1ea"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_customer_list_entry_data.html#a7441ef0865bcb3db9b8064dd7375c1ea">id</a></td></tr>
|
||||
<tr class="separator:a7441ef0865bcb3db9b8064dd7375c1ea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2df29a9c224534df43504feb53c3d3f6"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_customer_list_entry_data.html#a2df29a9c224534df43504feb53c3d3f6">customer_name</a></td></tr>
|
||||
<tr class="separator:a2df29a9c224534df43504feb53c3d3f6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab1b5724481bf61b8d7e65747fa5937b7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_customer_list_entry_data.html#ab1b5724481bf61b8d7e65747fa5937b7">revenue</a></td></tr>
|
||||
<tr class="separator:ab1b5724481bf61b8d7e65747fa5937b7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Field Documentation</h2>
|
||||
<a id="a2df29a9c224534df43504feb53c3d3f6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2df29a9c224534df43504feb53c3d3f6">◆ </a></span>customer_name</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char* customer_name</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>The customer's name. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a7441ef0865bcb3db9b8064dd7375c1ea"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7441ef0865bcb3db9b8064dd7375c1ea">◆ </a></span>id</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int id</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>The unique customer ID. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab1b5724481bf61b8d7e65747fa5937b7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab1b5724481bf61b8d7e65747fa5937b7">◆ </a></span>revenue</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int revenue</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>The revenue generated with the customer, in €1000. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>customer_list.c</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
94
html/struct_customer_test_data.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: CustomerTestData Struct Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-attribs">Data Fields</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">CustomerTestData Struct Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||
Data Fields</h2></td></tr>
|
||||
<tr class="memitem:a7441ef0865bcb3db9b8064dd7375c1ea"><td class="memItemLeft" align="right" valign="top"><a id="a7441ef0865bcb3db9b8064dd7375c1ea"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><b>id</b></td></tr>
|
||||
<tr class="separator:a7441ef0865bcb3db9b8064dd7375c1ea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8f8f80d37794cde9472343e4487ba3eb"><td class="memItemLeft" align="right" valign="top"><a id="a8f8f80d37794cde9472343e4487ba3eb"></a>
|
||||
const char * </td><td class="memItemRight" valign="bottom"><b>name</b></td></tr>
|
||||
<tr class="separator:a8f8f80d37794cde9472343e4487ba3eb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab1b5724481bf61b8d7e65747fa5937b7"><td class="memItemLeft" align="right" valign="top"><a id="ab1b5724481bf61b8d7e65747fa5937b7"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><b>revenue</b></td></tr>
|
||||
<tr class="separator:ab1b5724481bf61b8d7e65747fa5937b7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>test_customer_list.c</li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
127
html/struct_test_case.html
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: TestCase Struct Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-attribs">Data Fields</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">TestCase Struct Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><code>#include <<a class="el" href="shortcut_8h_source.html">shortcut.h</a>></code></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||
Data Fields</h2></td></tr>
|
||||
<tr class="memitem:a8f8f80d37794cde9472343e4487ba3eb"><td class="memItemLeft" align="right" valign="top"><a id="a8f8f80d37794cde9472343e4487ba3eb"></a>
|
||||
const char * </td><td class="memItemRight" valign="bottom"><b>name</b></td></tr>
|
||||
<tr class="separator:a8f8f80d37794cde9472343e4487ba3eb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7960f9c558f9ee2c3d4a8fdea096fb56"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_test_case.html#a7960f9c558f9ee2c3d4a8fdea096fb56">success</a></td></tr>
|
||||
<tr class="separator:a7960f9c558f9ee2c3d4a8fdea096fb56"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7774676f61d8e41df3862d4d707ef568"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_test_case.html#a7774676f61d8e41df3862d4d707ef568">test_function</a> )(struct <a class="el" href="struct_test_case.html">TestCase</a> *tc)</td></tr>
|
||||
<tr class="separator:a7774676f61d8e41df3862d4d707ef568"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p><a class="el" href="struct_test_case.html">TestCase</a> is the struct to define one test case. A test case can be added to a test. If the test is run all added test cases are run and the result of the run of each test case is checked automatically. </p>
|
||||
</div><h2 class="groupheader">Field Documentation</h2>
|
||||
<a id="a7960f9c558f9ee2c3d4a8fdea096fb56"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7960f9c558f9ee2c3d4a8fdea096fb56">◆ </a></span>success</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool success</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>true if the test passed, false otherwise. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a7774676f61d8e41df3862d4d707ef568"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7774676f61d8e41df3862d4d707ef568">◆ </a></span>test_function</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void(* test_function) (struct <a class="el" href="struct_test_case.html">TestCase</a> *tc)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>The test function which is executed by the test framework. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li><a class="el" href="shortcut_8h_source.html">shortcut.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/sync_off.png
Normal file
|
After Width: | Height: | Size: 853 B |
BIN
html/sync_on.png
Normal file
|
After Width: | Height: | Size: 845 B |
BIN
html/tab_a.png
Normal file
|
After Width: | Height: | Size: 142 B |
BIN
html/tab_b.png
Normal file
|
After Width: | Height: | Size: 169 B |
BIN
html/tab_h.png
Normal file
|
After Width: | Height: | Size: 177 B |
BIN
html/tab_s.png
Normal file
|
After Width: | Height: | Size: 184 B |
1
html/tabs.css
Normal file
103
html/test__customer__list_8h_source.html
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Customer List: test_customer_list.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Customer List
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">test_customer_list.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * HTBLA-Leonding</span></div>
|
||||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * ----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Description:</span></div>
|
||||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Test functions for customer_list.</span></div>
|
||||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * ----------------------------------------------------------</span></div>
|
||||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> */</span></div>
|
||||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifndef ___TEST_CUSTOMER_LIST_H</span></div>
|
||||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#define ___TEST_CUSTOMER_LIST_H</span></div>
|
||||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  </div>
|
||||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "shortcut.h"</span></div>
|
||||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  </div>
|
||||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> TEST(test_init_customer_list);</div>
|
||||
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> TEST(test_add_entry);</div>
|
||||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> TEST(test_add_entries);</div>
|
||||
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> TEST(test_get_customer_with_id_when_customer_list_is_empty);</div>
|
||||
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> TEST(test_get_customer_with_id_with_one_element);</div>
|
||||
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> TEST(test_get_customer_with_id_when_list_is_full);</div>
|
||||
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> TEST(test_get_customers_with_revenue);</div>
|
||||
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> TEST(test_get_customer_with_highest_revenue);</div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> TEST(test_get_customer_with_lowest_revenue);</div>
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> TEST(test_get_top_n_customers_revenue);</div>
|
||||
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> TEST(test_get_bottom_n_customers_revenue);</div>
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#endif</span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="astruct_customer_list_entry_data_html"><div class="ttname"><a href="struct_customer_list_entry_data.html">CustomerListEntryData</a></div><div class="ttdef"><b>Definition:</b> customer_list.c:16</div></div>
|
||||
<div class="ttc" id="astruct_customer_test_data_html"><div class="ttname"><a href="struct_customer_test_data.html">CustomerTestData</a></div><div class="ttdef"><b>Definition:</b> test_customer_list.c:16</div></div>
|
||||
<div class="ttc" id="astruct_customer_list_data_html"><div class="ttname"><a href="struct_customer_list_data.html">CustomerListData</a></div><div class="ttdef"><b>Definition:</b> customer_list.c:25</div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Mon Dec 9 2024 23:15:48 for Customer List by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.18
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
80
mainpage.h
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/** @file mainpage.h
|
||||
*
|
||||
* @brief Beschreibung der Aufgabe Customer List.
|
||||
*/
|
||||
/** @mainpage Customer List
|
||||
*
|
||||
* @author Peter Bauer, Stefan Schraml
|
||||
*
|
||||
* German variant below
|
||||
*
|
||||
* @section intro Introduction
|
||||
* Your task is to implement a customer list. The focus is on administrative functions
|
||||
* (initializing, adding customers to the list) and simple overview functions
|
||||
* (list length, listing customers with specific revenues).
|
||||
*
|
||||
* @section datastructures Data Structures
|
||||
* @subsection CustomerList
|
||||
* The `CustomerList` has a maximum of 13 entries.
|
||||
* The `CustomerList` is a struct with the following fields:
|
||||
* - `length` (int): The number of entries in the list.
|
||||
* - `customers` (array of pointers to `struct CustomerListEntry`): see below.
|
||||
*
|
||||
* @subsection CustomerListEntry
|
||||
* A `CustomerListEntry` contains all data related to a customer, including:
|
||||
* - `id` (int): The unique customer ID.
|
||||
* - `customer_name` (const pointer to a char (const char* customer_name)): The name of the customer.
|
||||
* - `revenue` (int): The revenue generated with the customer, measured in €1000.
|
||||
*
|
||||
* @section Functions
|
||||
* - `init_customer_list()`: Sets the number of entries to 0.
|
||||
* - `get_length()`: Returns the number of entries in the list.
|
||||
* - `create_customer()`: Creates a new customer.
|
||||
* - `add_customer()`: Adds a single entry to the list.
|
||||
* - `add_customers()`: Adds multiple entries to the list.
|
||||
* - `get_customer_with_index()`: Retrieves the customer at a specific index in the list.
|
||||
* - `get_customer_with_id()`: Searches for a customer with a specific ID.
|
||||
* - `get_customers_with_revenue()`: Finds customers within specific revenue bounds.
|
||||
* - `get_customer_with_highest_revenue()`: Finds the customer with the highest revenue.
|
||||
* - `get_customer_with_lowest_revenue()`: Finds the customer with the lowest revenue.
|
||||
* - `get_top_n_customers_revenue()`: Finds the top `n` customers with the highest revenue.
|
||||
* - `get_bottom_n_customers_revenue()`: Finds the bottom `n` customers with the lowest revenue.
|
||||
* - `get_customer_id()`: Retrieves the ID of a customer.
|
||||
*
|
||||
*
|
||||
* @section intro_de Einführung
|
||||
* Sie haben die Aufgabe eine Kundenliste zu implementieren. Wir beschränken uns auf Verwaltungsfunktionen
|
||||
* (Initialisieren, Kunden in die Liste einzutragen) und kleine Überblicksfunktionen
|
||||
* (Länge der Liste, Auflisten von Kunden mit bestimmten Umsätzen).
|
||||
*
|
||||
* @section datastructures_de Die Datenstrukturen
|
||||
* @subsection CustomerList
|
||||
* Die CustomerList hat eine maximale Anzahl von 13 Einträgen.
|
||||
* Die CustomerList ist ein struct mit den Feldern
|
||||
* - length (int)
|
||||
* - customers (Array von Pointern auf ein struct CustomerListEntry): siehe unten
|
||||
*
|
||||
* @subsection CustomerListEntry
|
||||
* Ein CustomerListEntry hält alle Daten, die zu einem Kunden gehören, welche sind:
|
||||
* - id (int): Die eindeutige Kundennummer.
|
||||
* - customer_name (const Pointer auf ein char (const char* customer_name))
|
||||
* - revenue (int): Der Umsatz, der mit dem Kunden erzielt wurde in 1000 €
|
||||
*
|
||||
* @section Die Funktionen
|
||||
* - init_customer_list(): Setzt die Anzahl der Einträge auf 0.
|
||||
* - get_length(): Gibt die Anzahl der Einträge zurück.
|
||||
* - create_customer(): Erstellt einen neuen Kunden.
|
||||
* - add_customer(): Fügt einen Eintrag hinzu.
|
||||
* - add_customers(): Fügt mehrere Einträge hinzu.
|
||||
* - get_customer_with_index(): Liefert den Kunden mit dem Index innerhalb der Liste.
|
||||
* - get_customer_with_id(): Sucht einen Kunden mit einer bestimmten ID.
|
||||
* - get_customers_with_revenue(): Sucht Kunden innerhalb bestimmter Umsatzgrenzen.
|
||||
* - get_customer_with_highest_revenue(): Sucht den Kunden mit dem
|
||||
* höchsten Umsatz.
|
||||
* - get_customer_with_lowest_revenue(): Sucht den Kunden mit dem
|
||||
* niedrigsten Umsatz.
|
||||
* - get_top_n_customers_revenue(): Sucht die n Kunden mit dem höchsten Umsatz.
|
||||
* - get_bottom_n_customers_revenue(): Sucht die n Kunden mit dem niedrigsten Umsatz
|
||||
* - get_customer_id(): Liefert die ID eines Kunden.
|
||||
*
|
||||
*/
|
||||
72
makefile
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
CC = g++
|
||||
CCLINK = g++
|
||||
LIBS =
|
||||
CCOPTIONS = -Wall -pedantic -g
|
||||
LDOPTIONS =
|
||||
HDRS = customer_list.h test_customer_list.h
|
||||
|
||||
TEST = customer_list
|
||||
|
||||
TESTOBJECT = customer_list_test_driver.o
|
||||
OBJS = customer_list.o test_customer_list.o shortcut.o
|
||||
|
||||
DOXY = doxygen
|
||||
|
||||
all: $(PROGRAM)
|
||||
./$(PROGRAM)
|
||||
|
||||
$(TEST): $(OBJS) $(TESTOBJECT)
|
||||
$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(TESTOBJECT)
|
||||
|
||||
$(PROGRAM): $(OBJS) $(MAINOBJECT)
|
||||
$(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(MAINOBJECT)
|
||||
|
||||
.PHONY: clean cleanall doxy test
|
||||
|
||||
clean:
|
||||
rm -f $(PROGRAM) $(TEST) $(TESTOBJECT) $(MAINOBJECT) $(OBJS)
|
||||
|
||||
cleanall:
|
||||
rm -f $(PROGRAM) $(TEST) $(OBJS) $(TESTOBJECT) $(MAINOBJECT) index.html
|
||||
rm -R html
|
||||
|
||||
doxy:
|
||||
$(DOXY)
|
||||
# ln -s html/index.html index.html
|
||||
|
||||
test: $(TEST)
|
||||
./$(TEST)
|
||||
|
||||
#sets project as sample solution
|
||||
setsample:
|
||||
cp customer_list.c.sample customer_list.c
|
||||
cp customer_list.h.sample customer_list.h
|
||||
|
||||
#sets project as assignment
|
||||
setassignment:
|
||||
cp customer_list.c.assignment customer_list.c
|
||||
cp customer_list.h.assignment customer_list.h
|
||||
|
||||
# defines current state of project as sample solution
|
||||
definesample:
|
||||
cp customer_list.c customer_list.c.sample
|
||||
cp customer_list.h customer_list.h.sample
|
||||
|
||||
# defines current sate of project as assignment
|
||||
defineassignment:
|
||||
cp customer_list.c customer_list.c.assignment
|
||||
cp customer_list.h customer_list.h.assignment
|
||||
|
||||
# creates a folder which can serve as a publishable assignment
|
||||
assignmentfolder:
|
||||
make setsample
|
||||
make doxy
|
||||
make setassignment
|
||||
mkdir ../assignment
|
||||
cp -R * ../assignment
|
||||
rm ../assignment/*.sample
|
||||
rm ../assignment/*.assignment
|
||||
make cleanall
|
||||
|
||||
%.o: %.cpp $(HDRS)
|
||||
$(CC) $(CCOPTIONS) -c $<
|
||||
151
shortcut.c
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding
|
||||
* ---------------------------------------------------------
|
||||
* Title: shortcut.c
|
||||
* Author: P. Bauer
|
||||
* Date: November 08, 2010
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* Test driver.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "shortcut.h"
|
||||
|
||||
#define MAX_TEST_FUNCTIONS 256
|
||||
|
||||
static char assert_msg_buffer[1024];
|
||||
static int tc_count = 0;
|
||||
static int tc_fail_count = 0;
|
||||
|
||||
static struct TestCase test_cases[MAX_TEST_FUNCTIONS];
|
||||
|
||||
const char* version()
|
||||
{
|
||||
return "ShortCut v. 1.3.0";
|
||||
}
|
||||
|
||||
char* format_msg(char* format, ...) {
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
vsprintf(assert_msg_buffer, format, args);
|
||||
return assert_msg_buffer;
|
||||
}
|
||||
|
||||
void assert_true(bool bool_expr, struct TestCase *tc, const char *msg,
|
||||
const char* file, int line)
|
||||
{
|
||||
if (!bool_expr) {
|
||||
if (tc->success) {
|
||||
tc->success = false;
|
||||
tc_fail_count++;
|
||||
}
|
||||
printf("\n\tFailure (file: %s, line %d): %s: %s", file, line, tc->name, msg);
|
||||
}
|
||||
}
|
||||
|
||||
void assert_false(bool bool_expr, struct TestCase *tc, const char *msg,
|
||||
const char* file, int line)
|
||||
{
|
||||
assert_true(!bool_expr, tc, msg, file, line);
|
||||
}
|
||||
|
||||
static void assert_string_failure(const char *expected, char *actual, struct TestCase *tc,
|
||||
const char *msg, const char* file, int line);
|
||||
|
||||
void assert_equals_str(const char *expected, char *actual, struct TestCase *tc,
|
||||
const char *msg, const char* file, int line)
|
||||
{
|
||||
if (expected == actual) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (expected == 0 || actual == 0) {
|
||||
assert_string_failure(expected, actual, tc, msg, file, line);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(actual, expected) != 0) {
|
||||
assert_string_failure(expected, actual, tc, msg, file, line);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#define MAX_MSG_LEN 128
|
||||
static void assert_string_failure(const char *expected, char *actual, struct TestCase *tc,
|
||||
const char *msg, const char* file, int line)
|
||||
{
|
||||
char new_msg[MAX_MSG_LEN];
|
||||
|
||||
sprintf(new_msg, "Expected \"%s\", actual \"%s\". %s", expected, actual, msg);
|
||||
assert_true(false, tc, new_msg, file, line);
|
||||
}
|
||||
|
||||
void assert_equals(int expected, int actual, struct TestCase *tc,
|
||||
const char *msg, const char* file, int line)
|
||||
{
|
||||
char new_msg[MAX_MSG_LEN];
|
||||
sprintf(new_msg, "Expected %d, actual %d. %s", expected, actual, msg);
|
||||
assert_true(expected == actual, tc, new_msg, file, line);
|
||||
}
|
||||
|
||||
void assert_equals_f(double expected, double actual, double tolerance, struct TestCase* tc,
|
||||
const char* msg, const char* file, int line)
|
||||
{
|
||||
char new_msg[MAX_MSG_LEN];
|
||||
sprintf(new_msg, "Expected %f, actual %f. %s", expected, actual, msg);
|
||||
double min_val = expected - tolerance;
|
||||
double max_val = expected + tolerance;
|
||||
assert_true(min_val <= actual && actual <= max_val, tc, new_msg, file, line);
|
||||
}
|
||||
|
||||
int get_test_count()
|
||||
{
|
||||
return tc_count;
|
||||
}
|
||||
|
||||
bool add_test(void (*test_function)(struct TestCase *tc), const char *test_name)
|
||||
{
|
||||
if (tc_count == MAX_TEST_FUNCTIONS) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
test_cases[tc_count].success = true;
|
||||
test_cases[tc_count].name = test_name;
|
||||
test_cases[tc_count].test_function = test_function;
|
||||
tc_count++;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void run_tests()
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("\n%s: Running tests\n", version());
|
||||
|
||||
for (i = 0; i < get_test_count(); i++) {
|
||||
printf("Running test %s ...", test_cases[i].name);
|
||||
test_cases[i].test_function(&test_cases[i]);
|
||||
if (test_cases[i].success) {
|
||||
printf("\033[32m OK\033[m");
|
||||
}
|
||||
else {
|
||||
printf("\033[31m ... FAIL\033[m");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("\nTotal tests run: %d\n", tc_count);
|
||||
if (tc_fail_count > 0) {
|
||||
printf("\033[31mTests failed: %d\033[m\n", tc_fail_count);
|
||||
}
|
||||
else {
|
||||
printf("\033[32mAll tests run successfully\033[m\n");
|
||||
}
|
||||
}
|
||||
112
shortcut.h
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding
|
||||
* ---------------------------------------------------------
|
||||
* Title: shortcut
|
||||
* Author: P. Bauer
|
||||
* Date: November 03, 2010
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* A simple unit testing frame work for C.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
#ifndef ___SHORTCUT_H
|
||||
#define ___SHORTCUT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/** TestCase is the struct to define one test case. A test case can
|
||||
*** be added to a test. If the test is run all added test cases are
|
||||
*** run and the result of the run of each test case is checked automatically.
|
||||
*/
|
||||
struct TestCase {
|
||||
const char *name;
|
||||
/** true if the test passed, false otherwise. */
|
||||
bool success;
|
||||
|
||||
/** The test function which is executed by the test framework. */
|
||||
void (*test_function)(struct TestCase *tc);
|
||||
};
|
||||
|
||||
/**
|
||||
*** @return Version of shortcut as string
|
||||
***/
|
||||
const char* version();
|
||||
|
||||
/**
|
||||
*** @return The fromated string as generated using sprintf(format, ...)
|
||||
***/
|
||||
char* format_msg(char* format, ...);
|
||||
|
||||
/** assert_true checks, whether a boolean expression passed is true or false.
|
||||
*** in case it is false the test case stating the assertion is marked
|
||||
*** as failed and msg is printed.
|
||||
*** @param bool_expr Expression which is evaluated.
|
||||
*** @param tc Pointer to the test case which states this assertion.
|
||||
*** @param msg Message to be printed if assertion evaluates to false.
|
||||
*** @param file File in which the assert is given.
|
||||
*** @param line Line in which the assert is given.
|
||||
*/
|
||||
void assert_true(bool bool_expr, struct TestCase *tc, const char *msg,
|
||||
const char* file, int line);
|
||||
|
||||
/** assert_false does the same as assert() but the boolean expression
|
||||
*** has to evaluate to false. If it evaluates to true the assertion
|
||||
*** fails.
|
||||
*** @see assert
|
||||
*/
|
||||
void assert_false(bool bool_expr, struct TestCase* tc, const char* msg,
|
||||
const char* file, int line);
|
||||
|
||||
/** assert_equals checks whether two values are equal. Currently the following
|
||||
*** data formats are supported:
|
||||
*** - strings
|
||||
*** - integer
|
||||
*** @param expected The expected string value
|
||||
*** @param actual The actual string value
|
||||
*** @param tc Pointer to the test case which states this assertion.
|
||||
*** @param msg Message to be printed if assertion evaluates to false.
|
||||
*** @param file File in which the assert is given.
|
||||
*** @param line Line in which the assert is given.
|
||||
*** @see assert
|
||||
*/
|
||||
void assert_equals(int expected, int actual, struct TestCase* tc,
|
||||
const char* msg, const char* file, int line);
|
||||
void assert_equals_str(const char* expected, char* actual, struct TestCase* tc,
|
||||
const char* msg, const char* file, int line);
|
||||
void assert_equals_f(double expected, double actual, double tolerance, struct TestCase* tc,
|
||||
const char* msg, const char* file, int line);
|
||||
|
||||
/** @return The total number of test cases added to the test.
|
||||
*/
|
||||
int get_test_count();
|
||||
|
||||
/** add_test creates a new test case and adds the a test function to
|
||||
*** this test case.
|
||||
*** @param test_function Pointer to the test function to be added
|
||||
*** to the newly created test case.
|
||||
*** @param test_case_name Name which should be assigned to the newly
|
||||
*** created test case.
|
||||
*/
|
||||
bool add_test(void (*test_function)(struct TestCase *tc), const char *test_case_name);
|
||||
|
||||
void run_tests();
|
||||
|
||||
#define TEST(testname) void testname(struct TestCase *tc)
|
||||
|
||||
#define MSG(format, ...) format_msg(format, ##__VA_ARGS__)
|
||||
|
||||
#define ASSERT_TRUE(condition, msg) assert_true(condition, tc, msg, __FILE__, __LINE__)
|
||||
|
||||
#define ASSERT_FALSE(condition, msg) assert_false(condition, tc, msg, __FILE__, __LINE__)
|
||||
|
||||
#define ASSERT_EQUALS(expected, actual) assert_equals(expected, actual, tc, "", __FILE__, __LINE__)
|
||||
|
||||
#define ASSERT_EQUALS_STR(expected, actual, msg) assert_equals_str(expected, actual, tc, msg, __FILE__, __LINE__)
|
||||
|
||||
#define ASSERT_EQUALS_TOLERANCE(expected, actual, tolerance) assert_equals_f(expected, actual, tolerance, tc, "", __FILE__, __LINE__)
|
||||
|
||||
#define ASSERT_EQUALS_TOLERANCE_STR(expected, actual, tolerance, msg) assert_equals_f(expected, actual, tolerance, tc, msg, __FILE__, __LINE__)
|
||||
|
||||
#define ADD_TEST(testfunction) add_test(testfunction, #testfunction)
|
||||
|
||||
#endif
|
||||
295
test_customer_list.c
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* Test functions for customer_list.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include "shortcut.h"
|
||||
#include "customer_list.h"
|
||||
#include "test_customer_list.h"
|
||||
|
||||
#define TEST_ENTRIES_COUNT 13
|
||||
|
||||
struct CustomerTestData {
|
||||
int id;
|
||||
const char* name;
|
||||
int revenue;
|
||||
};
|
||||
|
||||
struct CustomerTestData customers[] = {
|
||||
/* id, name, revenue */
|
||||
{200501, "Fabasoft", 5432}, // 0
|
||||
{201005, "CountIT", 3893}, // 1
|
||||
{199922, "e-punkt", 4198}, // 2
|
||||
{200349, "karriere.at", 745}, // 3
|
||||
{201893, "Google", 2934}, // 4
|
||||
{200745, "Apple", 1034}, // 5
|
||||
{200814, "Amazon", 987}, // 6
|
||||
{201624, "Samsung", 45}, // 7
|
||||
{201402, "Dynatrace", 857}, // 8
|
||||
{200911, "BBEdit", 194}, // 9
|
||||
{201090, "IBM", 893}, // 10
|
||||
{200296, "AV Stumpfl", 207}, // 11
|
||||
{201818, "Bosch", 1099}, // 12
|
||||
};
|
||||
|
||||
// #define MORE_ENTRIES_COUNT 12
|
||||
// static struct CustomerListEntryData *more_entries[] = {
|
||||
// &p2, &p3, &p4, &p5, &p6, &p7, &p8, &p9, &p10, &p11, &p12, &p13
|
||||
// };
|
||||
|
||||
static CustomerList customer_list;
|
||||
|
||||
/* ---------------------------- Public functions ------------------------------------- */
|
||||
TEST(test_init_customer_list) {
|
||||
ASSERT_TRUE(get_length(0) < 0, "An invalid list shall provide a negative length");
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
}
|
||||
|
||||
static CustomerListEntry create_test_customer(int idx) {
|
||||
return create_customer(customers[idx].id, customers[idx].name, customers[idx].revenue);
|
||||
}
|
||||
|
||||
TEST(test_add_entry) {
|
||||
bool success = add_customer(0, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
ASSERT_FALSE(success, "Adding a customer to an invalid list must not be possible");
|
||||
ASSERT_TRUE(get_customer_id(0) < 0, "The ID of an invalid customer must be less than 0");
|
||||
|
||||
customer_list = init_customer_list();
|
||||
success = add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
ASSERT_TRUE(success, "Adding first entry must be possible");
|
||||
CustomerListEntry res = get_customer_with_index(customer_list, 0);
|
||||
if (res != 0) {
|
||||
ASSERT_EQUALS(200501, get_customer_id(res));
|
||||
}
|
||||
ASSERT_EQUALS(1, get_length(customer_list));
|
||||
}
|
||||
|
||||
/* ---------------------------- Private function ------------------------------------ */
|
||||
/** make_list_full adds test entries until the grade list is full
|
||||
*** @return True if filling is possible, FALSE otherwise
|
||||
*/
|
||||
static bool make_list_full();
|
||||
TEST(test_add_entries) {
|
||||
customer_list = init_customer_list();
|
||||
|
||||
CustomerListEntry one_entry[] = { create_test_customer(0) };
|
||||
|
||||
bool adding_possible = add_customers(customer_list, one_entry, 1);
|
||||
ASSERT_TRUE(adding_possible, "Adding of one entry in empty list must be possible");
|
||||
ASSERT_EQUALS(1, get_length(customer_list));
|
||||
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
adding_possible = make_list_full();
|
||||
ASSERT_TRUE(adding_possible, "Making an empty list full must be possible");
|
||||
ASSERT_EQUALS(MAX_LIST_ENTRIES, get_length(customer_list));
|
||||
|
||||
CustomerListEntry customer = get_customer_with_index(customer_list, MAX_LIST_ENTRIES - 1);
|
||||
ASSERT_TRUE(customer != 0, "A customer shall be provided");
|
||||
ASSERT_EQUALS(customers[MAX_LIST_ENTRIES - 1].id, get_customer_id(customer));
|
||||
|
||||
adding_possible = add_customers(customer_list, one_entry, 1);
|
||||
ASSERT_FALSE(adding_possible, "Adding entries in full list must NOT be possible");
|
||||
ASSERT_EQUALS(MAX_LIST_ENTRIES, get_length(customer_list));
|
||||
}
|
||||
|
||||
static bool make_list_full() {
|
||||
const int size = MAX_LIST_ENTRIES - get_length(customer_list);
|
||||
CustomerListEntry entries[size];
|
||||
int start_idx = get_length(customer_list);
|
||||
for(int i = start_idx; i < MAX_LIST_ENTRIES; i++) {
|
||||
entries[i - start_idx] = create_test_customer(i);
|
||||
}
|
||||
return add_customers(customer_list, entries, size);
|
||||
}
|
||||
|
||||
|
||||
TEST(test_get_customer_with_id_when_customer_list_is_empty) {
|
||||
customer_list = init_customer_list();
|
||||
CustomerListEntry customer = get_customer_with_id(customer_list, 1);
|
||||
ASSERT_TRUE(customer == 0, "No customer must be provided if the list is empty");
|
||||
}
|
||||
|
||||
TEST(test_get_customer_with_id_with_one_element) {
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
ASSERT_EQUALS(1, get_length(customer_list));
|
||||
CustomerListEntry customer = get_customer_with_id(customer_list, customers[0].id);
|
||||
ASSERT_TRUE(customer != 0, "A customer shall be provided");
|
||||
ASSERT_EQUALS(customers[0].id, get_customer_id(customer));
|
||||
}
|
||||
|
||||
TEST(test_get_customer_with_id_when_list_is_full) {
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
make_list_full();
|
||||
CustomerListEntry customer = get_customer_with_id(customer_list, customers[5].id);
|
||||
ASSERT_TRUE(customer != 0, "A customer shall be provided");
|
||||
ASSERT_EQUALS(customers[5].id, get_customer_id(customer));
|
||||
}
|
||||
|
||||
TEST(test_get_customers_with_revenue) {
|
||||
CustomerListEntry result_list[MAX_LIST_ENTRIES];
|
||||
int length = -1;
|
||||
|
||||
length = get_customers_with_revenue(0, 0, 10000, result_list, MAX_LIST_ENTRIES);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
|
||||
length = get_customers_with_revenue(customer_list, 0, 10000, result_list, MAX_LIST_ENTRIES);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
length = get_customers_with_revenue(customer_list, 0, 5431, result_list, MAX_LIST_ENTRIES);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
length = get_customers_with_revenue(customer_list, 0, 5432, result_list, MAX_LIST_ENTRIES);
|
||||
ASSERT_EQUALS(1, length);
|
||||
|
||||
make_list_full();
|
||||
|
||||
length = get_customers_with_revenue(customer_list, 893, 1099, result_list, MAX_LIST_ENTRIES);
|
||||
ASSERT_EQUALS(4, length);
|
||||
if (length == 4) {
|
||||
ASSERT_EQUALS(200745, get_customer_id(result_list[0]));
|
||||
ASSERT_EQUALS(200814, get_customer_id(result_list[1]));
|
||||
ASSERT_EQUALS(201090, get_customer_id(result_list[2]));
|
||||
ASSERT_EQUALS(201818, get_customer_id(result_list[3]));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(test_get_customer_with_highest_revenue) {
|
||||
CustomerListEntry customer = 0;
|
||||
|
||||
customer = get_customer_with_highest_revenue(0);
|
||||
ASSERT_TRUE(customer == 0, "Invalid customer list can't return any customer, 0 expected");
|
||||
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
|
||||
customer = get_customer_with_highest_revenue(customer_list);
|
||||
ASSERT_TRUE(customer == 0, "Empty customer list can't return any customer, 0 expected");
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
|
||||
customer = get_customer_with_highest_revenue(customer_list);
|
||||
ASSERT_TRUE(customer != 0, "Customer list with one customer must return first element");
|
||||
ASSERT_EQUALS(customers[0].id, get_customer_id(customer));
|
||||
|
||||
make_list_full();
|
||||
|
||||
customer = get_customer_with_highest_revenue(customer_list);
|
||||
ASSERT_TRUE(customer != 0, "Full customer list must return a highest revenue customer");
|
||||
ASSERT_EQUALS(200501, get_customer_id(customer));
|
||||
}
|
||||
|
||||
TEST(test_get_customer_with_lowest_revenue) {
|
||||
CustomerListEntry customer = 0;
|
||||
|
||||
customer = get_customer_with_lowest_revenue(0);
|
||||
ASSERT_TRUE(customer == 0, "Invalid customer list can't return any customer, 0 expected");
|
||||
|
||||
customer_list = init_customer_list();
|
||||
ASSERT_EQUALS(0, get_length(customer_list));
|
||||
|
||||
customer = get_customer_with_lowest_revenue(customer_list);
|
||||
ASSERT_TRUE(customer == 0, "Empty customer list can't return any customer, 0 expected");
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
customer = get_customer_with_lowest_revenue(customer_list);
|
||||
ASSERT_TRUE(customer != 0, "Customer list with one customer must return first element");
|
||||
ASSERT_EQUALS(customers[0].id, get_customer_id(customer));
|
||||
|
||||
make_list_full();
|
||||
|
||||
customer = get_customer_with_lowest_revenue(customer_list);
|
||||
ASSERT_TRUE(customer != 0, "Full customer list must return a lowest revenue customer");
|
||||
ASSERT_EQUALS(201624, get_customer_id(customer));
|
||||
}
|
||||
|
||||
TEST(test_get_top_n_customers_revenue) {
|
||||
CustomerListEntry result_list[MAX_LIST_ENTRIES];
|
||||
int length = -1;
|
||||
|
||||
customer_list = init_customer_list();
|
||||
length = get_top_n_customers_revenue(customer_list, 5, result_list);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
length = get_top_n_customers_revenue(customer_list, 5, result_list);
|
||||
ASSERT_EQUALS(1, length);
|
||||
ASSERT_EQUALS(customers[0].id, get_customer_id(result_list[0]));
|
||||
|
||||
make_list_full();
|
||||
|
||||
length = get_top_n_customers_revenue(customer_list, 1, result_list);
|
||||
ASSERT_EQUALS(1, length);
|
||||
ASSERT_EQUALS(200501, get_customer_id(result_list[0]));
|
||||
|
||||
length = get_top_n_customers_revenue(customer_list, 5, result_list);
|
||||
ASSERT_EQUALS(5, length);
|
||||
ASSERT_EQUALS(200501, get_customer_id(result_list[0]));
|
||||
ASSERT_EQUALS(199922, get_customer_id(result_list[1]));
|
||||
ASSERT_EQUALS(201005, get_customer_id(result_list[2]));
|
||||
ASSERT_EQUALS(201893, get_customer_id(result_list[3]));
|
||||
ASSERT_EQUALS(201818, get_customer_id(result_list[4]));
|
||||
|
||||
length = get_top_n_customers_revenue(customer_list, 0, result_list);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
length = get_top_n_customers_revenue(customer_list, TEST_ENTRIES_COUNT + 1, result_list);
|
||||
ASSERT_EQUALS(TEST_ENTRIES_COUNT, length);
|
||||
|
||||
length = get_top_n_customers_revenue(0, TEST_ENTRIES_COUNT + 1, result_list);
|
||||
ASSERT_TRUE(length <= 0, "An invalid list must indicate 0 or less found customers");
|
||||
}
|
||||
|
||||
TEST(test_get_bottom_n_customers_revenue) {
|
||||
CustomerListEntry result_list[MAX_LIST_ENTRIES];
|
||||
int length = -1;
|
||||
|
||||
customer_list = init_customer_list();
|
||||
length = get_bottom_n_customers_revenue(customer_list, 5, result_list);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
add_customer(customer_list, customers[0].id, customers[0].name, customers[0].revenue);
|
||||
length = get_bottom_n_customers_revenue(customer_list, 5, result_list);
|
||||
ASSERT_EQUALS(1, length);
|
||||
ASSERT_EQUALS(customers[0].id, get_customer_id(result_list[0]));
|
||||
|
||||
make_list_full();
|
||||
|
||||
length = get_bottom_n_customers_revenue(customer_list, 1, result_list);
|
||||
ASSERT_EQUALS(1, length);
|
||||
ASSERT_EQUALS(201624, get_customer_id(result_list[0]));
|
||||
|
||||
length = get_bottom_n_customers_revenue(customer_list, 7, result_list);
|
||||
ASSERT_EQUALS(7, length);
|
||||
ASSERT_EQUALS(201624, get_customer_id(result_list[0]));
|
||||
ASSERT_EQUALS(200911, get_customer_id(result_list[1]));
|
||||
ASSERT_EQUALS(200296, get_customer_id(result_list[2]));
|
||||
ASSERT_EQUALS(200349, get_customer_id(result_list[3]));
|
||||
ASSERT_EQUALS(201402, get_customer_id(result_list[4]));
|
||||
ASSERT_EQUALS(201090, get_customer_id(result_list[5]));
|
||||
ASSERT_EQUALS(200814, get_customer_id(result_list[6]));
|
||||
|
||||
length = get_bottom_n_customers_revenue(customer_list, 0, result_list);
|
||||
ASSERT_EQUALS(0, length);
|
||||
|
||||
length = get_bottom_n_customers_revenue(customer_list, TEST_ENTRIES_COUNT + 1, result_list);
|
||||
ASSERT_EQUALS(TEST_ENTRIES_COUNT, length);
|
||||
|
||||
length = get_bottom_n_customers_revenue(0, TEST_ENTRIES_COUNT + 1, result_list);
|
||||
ASSERT_TRUE(length <= 0, "An invalid list must indicate 0 or less found customers");
|
||||
}
|
||||
24
test_customer_list.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* Test functions for customer_list.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
#ifndef ___TEST_CUSTOMER_LIST_H
|
||||
#define ___TEST_CUSTOMER_LIST_H
|
||||
|
||||
#include "shortcut.h"
|
||||
|
||||
TEST(test_init_customer_list);
|
||||
TEST(test_add_entry);
|
||||
TEST(test_add_entries);
|
||||
TEST(test_get_customer_with_id_when_customer_list_is_empty);
|
||||
TEST(test_get_customer_with_id_with_one_element);
|
||||
TEST(test_get_customer_with_id_when_list_is_full);
|
||||
TEST(test_get_customers_with_revenue);
|
||||
TEST(test_get_customer_with_highest_revenue);
|
||||
TEST(test_get_customer_with_lowest_revenue);
|
||||
TEST(test_get_top_n_customers_revenue);
|
||||
TEST(test_get_bottom_n_customers_revenue);
|
||||
#endif
|
||||