Added linked lists to handle lists of column pointers in views (not

tested)
This commit is contained in:
Celine Mercier
2017-03-06 16:06:17 +01:00
parent 3319ede837
commit 778acc48cd
5 changed files with 473 additions and 53 deletions

View File

@ -26,6 +26,7 @@
#include "obidmscolumn.h"
#include "obierrno.h"
#include "hashtable.h"
#include "linked_list.h"
#include "obiblob.h"
@ -105,25 +106,25 @@ typedef struct Obiview_infos {
* @brief Structure for an opened view.
*/
typedef struct Obiview {
Obiview_infos_p infos; /**< A pointer on the mapped view informations.
Obiview_infos_p infos; /**< A pointer on the mapped view informations.
*/
OBIDMS_p dms; /**< A pointer on the DMS to which the view belongs.
OBIDMS_p dms; /**< A pointer on the DMS to which the view belongs.
*/
bool read_only; /**< Whether the view is read-only or can be modified.
bool read_only; /**< Whether the view is read-only or can be modified.
*/
OBIDMS_column_p line_selection; /**< A pointer on the column containing the line selection
OBIDMS_column_p line_selection; /**< A pointer on the column containing the line selection
* associated with the view if there is one.
* This line selection is read-only, and when a line from the view is read,
* it is this line selection that is used.
*/
OBIDMS_column_p columns[MAX_NB_OPENED_COLUMNS]; /**< Array of pointers on all the columns of the view.
Linked_list_node_p columns; /**< Double linked chain containing the pointers on all the columns of the view.
*/
hashtable_p column_dict; /**< Hash table storing the pairs of column names or aliases with the associated
hashtable_p column_dict; /**< Hash table storing the pairs of column names or aliases with the associated
* pointers on column pointers (OBIDMS_column_p*).
*/
int nb_predicates; /**< Number of predicates to test when closing the view.
*/
char* (**predicate_functions)(struct Obiview* view); /**< Array of pointers on all predicate functions to test when closing the view.
int nb_predicates; /**< Number of predicates to test when closing the view.
*/
char* (**predicate_functions)(struct Obiview* view); /**< Array of pointers on all predicate functions to test when closing the view.
*/
} Obiview_t, *Obiview_p;