source: tags/cvs_2_svn/NAMES_COM/names.aisc

Last change on this file was 4517, checked in by westram, 17 years ago
  • added storage for prefix_hash
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1PROJECT arboo_server
2OBJECT_KEY AN,          # MAIN PREFIX
3MAX_KEY 40,         # MAX NUMBER OF AN ATTRIBUTE
4MAX_OBJECT 6,           # MAX DIFFERENT STRUCTURES
5MAX_STRING_LEN 1024,
6MAX_PAR_CNT 16,
7MAGIC_NUMBER 0x927289,      #   MAGIC_NUMBER 6 HEX DIGITS
8
9SERVER_INCLUDES (~
10#include <stdio.h>
11#include <aisc.h>
12#include <aisc_com.h>~)
13INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~)
14
15DATA {
16
17# ********************************* USER DATA *******************************************
18
19# ******************************* PRIVAT STRUCTURES: DO NOT CHANGE *********************************
20
21@STRUCT, @SKEY, @SKEYC, @SDOCU;
22
23dll_public, ,   ,   (~Vater einer DoubledLinkedList dll~), {
24@TYPE,         @IDENT, @REF, @ACC, @SAVE, @KEY,   @KEYC, @INIT, @DOCU;
25t_key,         key,    t,    r,    ,      ,       ,      ,      (~ The key~);
26int,           cnt,    t,    r,    ,      CNT,    0,     ,      (~ Number of elements~);
27long,          hash,   t,    ,     ,      ,       ,      ,      (~ Hash Table~);
28dllheader_ext, parent, flt,  r,    ,      PARENT, 1,     ,      (~ My Owner~);
29dllheader_ext, last,   flt,  r,    ,      LAST,   2,     ,      (~ Pointer to the last element~);
30};
31
32
33dll_header, COMMON, 0,  (~Der Link Header (sollte Kopf jeder Funktion sein)~), {
34@TYPE,       @IDENT,             @REF, @ACC, @SAVE, @KEY,      @KEYC, @INIT, @DOCU;
35t_key,       key,                t,    r,    ,      KEY,       0,     ,      (~ The Key~);
36aisc_string, aisc_get_keystring, %,    r,    ,      KEYSTRING, 1,     ,      (~ THE STRING of the KEY ~);
37dll_public,  parent,             ls,   r,    ,      (~~),      2,     ,      (~ Pointer to dll_public~);
38aisc_string, ident,              t,    ,     1,     IDENT,     5,     ,      (~ The ident [not necessary]~);
39};
40
41
42# ********************************* USER STRUCTURES *******************************************
43
44AN_revers,  REVERS, 4,  (~ Revers mapping for shorts ~), {
45    @TYPE,       @IDENT,    @REF, @ACC, @SAVE, @KEY,       @KEYC,  @INIT,  @DOCU;
46    dllh,        mh,        t,    ,     1,     (~~),       0,      ,       (~Header~);
47    aisc_string, full_name, t,    rw,   ,      ,           ,       ,       (~ the full name of a species ~);
48    aisc_string, acc,       t,    rw,   ,      ,           ,       ,       (~ accession number ~);
49    aisc_string, add_id,    t,    rw,   ,      ,           ,       ,       (~ additional id data ~);
50};
51
52AN_shorts, SHORTS,  3,  (~ a dictionary ~), SAVEDIRECTION HORIZONTAL, {
53    @TYPE,          @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,       @KEYC,  @INIT,  @DOCU;
54    dllh,           mh,             t,      ,       1,      (~~),       0,      ,       (~Header~);
55    aisc_string,    full_name,      t,      r,      1,      FULL_NAME,  10,     ,       (~ the full name of a species ~);
56    aisc_string,    acc,            t,      r,      1,      ACC,        11,     ,       (~ accession number ~);
57    aisc_string,    add_id,         t,      r,      1,      ADDID,      12,     ,       (~ additional id data ~);
58    aisc_string,    shrt,           t,      r,      1,      SHORT,      13,     ,       (~ The Short ~);
59};
60
61
62# called from code using id AN_LOCAL
63# single functions: LOCAL_GET_SHORT LOCAL_DEL_SHORT
64
65AN_local, LOCAL,    2,  (~local communication buffer~), {
66    @TYPE,       @IDENT,     @REF, @ACC, @SAVE, @KEY,      @KEYC, @INIT,                   @DOCU;
67    dllh,        mh,         t,    ,     ,      (~~),      0,     ,                        (~Header~);
68    int,         socket,     t,    ,     ,      ,          ,      names_init_socket(THIS), (~the callback~), DESTROY names_destroy_socket(THIS);
69    aisc_string, whoami,     t,    ,     ,      WHOAMI,    10,    ,                        (~ who am i ~);
70    aisc_string, full_name,  t,    rw,   ,      FULL_NAME, 11,    "",                      (~ the full name of a species ~);
71    aisc_string, acc,        t,    rw,   ,      ACCESSION, 12,    "",                      (~ accession number ~);
72    aisc_string, add_id,     t,    rw,   ,      ADDID,     13,    "",                      (~ additional id data ~);
73    int,         use_advice, t,    rw,   ,      USEADVICE, 14,    ,                        (~ use the advice ~);
74    aisc_string, advice,     t,    rw,   ,      ADVICE,    15,    "",                      (~ advice for the short name ~);
75    aisc_string, get_short,  %,    r,    ,      GET_SHORT, 16,    ,                        (~ get a short name ~);
76    int,         del_short,  %,    r,    ,      DEL_SHORT, 17,    ,                        (~ forget stored short name ~);
77};
78
79
80# called from code using id AN_MAIN
81# single functions: MAIN_SHUTDOWN MAIN_SAVEALL
82
83AN_main, MAIN, 1, (~Die globalen Daten~), SAVEDIRECTION VERTICAL, {
84    @TYPE,          @IDENT,          @REF,  @ACC,   @SAVE,  @KEY,       @KEYC,  @INIT,  @DOCU;
85    t_key,          key,             t,     n,      ,       ,           ,       ,       (~Der KEY~);
86    AN_local,       loc_st,          d,     ,       ,       LOCAL,      10,     ,       (~Die Parameter~);
87    AN_shorts,      shorts1,         d,     r,      1,      SHORTS1,    12,     ,       (~ the unique letters for a word ~);
88    AN_shorts,      names,           d,     r,      1,      NAMES,      16,     ,       (~ the unique names first*second*S*accession ~);
89    AN_revers,      revers,          d,     r,      ,       ,           ,       ,       (~ the revers unique names first*second*S*accession ~);
90    int,            touched,         t,     r,      ,       TOUCHED,    19,     0,      (~ Does the database need to be saved ~);
91    aisc_string,    server_shutdown, %,     w,      ,       SHUTDOWN,   20,     ,       (~SHUTDOWN Command~);
92    int,            server_save,     %,     w,      ,       SAVEALL,    21,     ,       (~SAVE everything~);
93    aisc_string,    server_file,     t,     r,      ,       FILENAME,   22,     ,       (~The filename of the keys~);
94    int,            server_filedate, t,     ,       ,       FILEDATE,   23,     ,       (~The filedate of server_file~);
95    int,            dbversion,       t,     ,       1,      DBVERSION,  24,     4,      (~Nameserver database version ~);
96    aisc_string,    add_field,       t,     r,      1,      ADD_FIELD,  25,     ,       (~additional field used for identification ~);
97    long,           prefix_hash,     t,     ,       ,       ,           ,       0,      (~prefix hash table~)
98    };
99};
Note: See TracBrowser for help on using the repository browser.