Source: paviews.h


Annotated List
Files
Globals
Hierarchy
Index
// ##########################################################################
// ####                                                                  ####
// ####                         Prüfungsamt-Client                       ####
// ####                    ============================                  ####
// ####                                                                  ####
// #### Sichtendefinitionen                                              ####
// ####                                                                  ####
// #### Version 1.00  --  25. Juni 2000                                  ####
// ####                                                                  ####
// #### Copyright (C) 2000  Thomas Dreibholz                             ####
// ####                     Universität Bonn                             ####
// ####                     EMail: Dreibholz@bigfoot.com                 ####
// ####                     WWW:   http://www.bigfoot.com/~dreibholz     ####
// ####                                                                  ####
// ##########################################################################


#ifndef PA_VIEWS_H
#define PA_VIEWS_H


#include "system.h"
#include "paclient.h"


#include <qstring.h>


struct ViewTable;
struct ViewEntry;


/**
  * Diese Struktur speichert Informationen über einen Join der Tabelle mit
  * einer anderen Tabelle, gegeben durch Zeiger auf ViewTable.
  *
  * @short   Join Entry
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct JoinEntry
{
   const char*      JoinAttributeR1;
   const char*      JoinAttributeR2;
   const char*      JoinTitle;
   const ViewTable* View;
};


/**
  * Diese Struktur speichert Informationen über eine Selektion eines
  * Attributes aus einer anderen Tabelle,
  * gegeben durch Zeiger auf ViewTable.
  *
  * @short   Select Entry
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct SelectEntry
{
   const char*      SelectAttributeR1;
   const char*      SelectAttributeR2;
   const char*      SelectInfoAttributes;
   const bool       UseComboBox;
   const ViewTable* View;
};


/**
  * Diese Struktur speichert Informationen über Felder einer Tabelle:
  * Textumsetzung Datenbank-Schema <-> Bildschirm und Hilfetexte.
  * gegeben durch Zeiger auf ViewTable.
  *
  * @short   Description Entry
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct DescriptionEntry
{
   const char* Field;
   const char* Title;
   const char* Help;
};


/**
  * Diese Struktur speichert Informationen eine Sicht einer Tabelle.
  *
  * @short   View Entry
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct ViewEntry
{
   const char* Title;
   const char* ViewName;
   const char* OrderBy;

   const cardinal Joins;
   const JoinEntry* Join;

   const cardinal Selects;
   const SelectEntry* Select;

   const cardinal          Descriptions;
   const DescriptionEntry* Description;


   const QString toTitle(const char* name) const;
   const QString toHelp(const char* name)  const;
};


/**
  * Diese Struktur enthält alle Sichten einer Tabelle.
  *
  * @short   View Table
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct ViewTable
{
   static const cardinal MaxPrimaryKeyEntries = 5;

   const char*           PrimaryKey[MaxPrimaryKeyEntries];
   const char*           BaseTableName;
   const char*           PixmapName;
   const cardinal        Views;
   const ViewEntry*      View;
};


/**
  * Diese Struktur enthält alle Tabellennamen für die Optimierungs-Funktion.
  *
  * @short   Optimize Table
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
struct OptimizeTable
{
   const cardinal Tables;
   const char**   Table;
};



/**
  * Sichtentabelle für Prüfer.
  */
extern const ViewTable Pruefer_ViewTable;

/**
  * Sichtentabelle für Studenten.
  */
extern const ViewTable Studenten_ViewTable;

/**
  * Sichtentabelle für Statistiken.
  */
extern const ViewTable Statistiken_ViewTable;

/**
  * Sichtentabelle für Qualifikattypen.
  */
extern const ViewTable Qualifikattypen_ViewTable;

/**
  * Sichtentabelle für Pruefungstypen.
  */
extern const ViewTable Pruefungstypen_ViewTable;


/**
  * Optimierungstabelle.
  */
extern const OptimizeTable PADB_OptimizeTable;


#endif

Generated by: viper@odin on Wed Jul 12 17:11:55 2000, using kdoc 2.0a22.