Queries of element qualities |
Top Previous Next |
/* Queries of Elementeigenschaften*/ / * =================================*/ #include "database.h"
/* In the following function element qualities are questioned. */
long int qualities EXPORTENTRY (int argc, char *argv [], PROOT root) { PPLANS flat; POBJECT obj; PELEMENT el; PSTRING_ELEMENT string; STRING_SETTINGS strSet; PTEXT_ELEMENT text; TEXT_SETTINGS tSet; PSYMBOL_ELEMENT symbol; SYMBOL_SETTINGS sySet; T_PPOINT point; POINT_SETTINGS pSet; int pointertyp;
flat = DBgetOpenPlan (root); if (! flat) { IOwprintf (DBgetIOpipes (root), "no plan geöffnet\n", strSet.zeichenschluessel); } obj = DBgetOpenObject (root); if (! obj) { obj = DBfirstObjectOfPlan (flat); } el = DBfirstElementOfObject (obj); if (! el) { IOwprintf (DBgetIOpipes (root), "object has no Elemente\n", strSet.zeichenschluessel); return 1; } pointertyp = DBreturnPointerTyp (el); switch (pointertyp) { case TYP_STRING_ELEMENT: DBreturnStringSettings (el, &strSet, 1); IOwprintf (DBgetIOpipes (root), "string with DKY %d gefunden\n", strSet.zeichenschluessel); break; case TYP_TEXT_ELEMENT: DBreturnTextSettings (el, &tSet, 1); IOwprintf (DBgetIOpipes (root), "text with DKY %d gefunden\n", tSet.zeichenschluessel); break; case TYP_SYMBOL_ELEMENT: DBreturnSymbolSettings (el, &sySet, 1); IOwprintf (DBgetIOpipes (root), "symbol with number %d gefunden\n", sySet.symbol); break; case TYP_EMPTY_ELEMENT: default: IOwprintf (DBgetIOpipes (root), the "first element is nobody graphic element\n"); } return 0; } /*---------------------------------------------------------------------------*/
|