Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:05:33

0001 /*
0002  *  qp_signature.h  --
0003  *  Signatures hold the static type info associated 
0004  *  with symbol table entries.
0005  *
0006  *  Original: 10-Oct-1994 13:56
0007  *
0008  *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
0009  *
0010  *  $Id$
0011  *
0012  *  $Log$
0013  *  Revision 1.8  1996/04/23 18:39:01  maartenb
0014  *  - Add RCS keywords
0015  *
0016  *
0017  */
0018 
0019 #ifndef CERN_SIGNATURE
0020 #define CERN_SIGNATURE
0021 
0022 
0023 typedef struct _signature_ Signature;
0024 
0025 
0026 #include    "cern_types.h"
0027 #include    "hbook_defs.h"
0028 #include    "fcode.h"
0029 #include    "qp_value.h"
0030 #include    "qp_dimension.h"
0031 #include    "qp_mask.h"
0032 
0033 typedef enum _sig_type_ {
0034     S_FUN = 1,  /* builtin function */
0035     S_CVAR,     /* cwn ntup var */
0036     S_RVAR,     /* rwn ntup var */
0037     S_VEC,      /* kuip vector */
0038     S_COMIS,    /* comis routine */
0039     S_MASK      /* mask */
0040 } SigType;
0041 
0042 
0043 
0044 typedef struct _sig_const_ {
0045     Value   *val;
0046 } SigConst;
0047 
0048 
0049 typedef struct _sig_fun_ {
0050     FCode       fc;
0051     int     argc;
0052     Dimension   *argv[MAX_DIMENSION];
0053 } SigFun;
0054 
0055 
0056 typedef struct _sig_cwn_ {
0057     int index;
0058     char    block[MAX_BLOCK_LEN];
0059     int size;       /* in Int32's */
0060     int elem;
0061 } SigCWN;
0062 
0063 
0064 typedef struct _sig_rwn_ {
0065     int index;
0066 } SigRWN;
0067 
0068 
0069 typedef struct _sig_comis_ {
0070     int     iaddr;
0071     int     argc;
0072     Dimension   *argv[MAX_DIMENSION];
0073     char **     namelist;       /* list of common block member used in */
0074                         /* routines called by this routine */
0075     /* extra info */
0076 } SigComis;
0077 
0078 
0079 typedef struct _sig_mask_ {
0080     Mask    *mp;
0081 } SigMask;
0082 
0083 
0084 typedef struct _sig_vec_ {
0085     int dummy;
0086 } SigVec;
0087 
0088 
0089 struct _signature_ {
0090     Signature   *next;
0091     SigType     typ;
0092     Dimension   *dim;
0093     union {
0094         SigConst    con;
0095         SigFun      fun;
0096         SigCWN      cvar;
0097         SigRWN      rvar;
0098         SigMask     mask;
0099         SigComis    comis;
0100         SigVec      vec;
0101     } u;
0102 };
0103 
0104 
0105 Signature *
0106 sig_new_scalar_double( double d );
0107 
0108 Signature *
0109 sig_new_scalar_int( int ival );
0110 
0111 Signature *
0112 sig_new_scalar_uint( int uval );
0113 
0114 Signature *
0115 sig_new_scalar_bool( bool bval );
0116 
0117 Signature *
0118 sig_new_scalar_str( char *sval );
0119 
0120 Signature *
0121 sig_new_cvar( Dimension * d, char * block, int isize, int ielem );
0122 
0123 Signature *
0124 sig_new_rvar( int index );
0125 
0126 Signature *
0127 sig_new_mask( Mask * mp );
0128 
0129 Signature *
0130 sig_new_vec( Dimension * d );
0131 
0132 Signature *
0133 sig_new_fun( FCode fc, Dimension * d, int argc,
0134     Dimension *argv[MAX_DIMENSION] );
0135 
0136 Signature *
0137 sig_new_comis(
0138     int     iaddr,  /* the comis ref to the routine */
0139     Dimension   *d, /* the return type of the function */
0140     int     argc,   /* number of args, -1 for unknown */
0141     Dimension   *argv[MAX_DIMENSION] /* the arguments */
0142 );
0143 
0144 void
0145 sig_del( Signature * st );
0146 
0147 #endif  /*  CERN_SIGNATURE  */