Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002  *  qp_vvec.h  --
0003  *  Implement a vector of var records.
0004  *  (This should be templatized, with svec etc)
0005  *
0006  *  Original: 10-May-1996 16:03
0007  *
0008  *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
0009  *
0010  *  $Id$
0011  *
0012  *  $Log$
0013  *  Revision 1.1  1996/05/12 15:13:56  maartenb
0014  *  - Replaced the handling of variables. The handling of variables is now
0015  *  fully dynamic and there is no other limit than the commonblocks to the
0016  *  number of var's in a query.
0017  *
0018  *
0019  *
0020  */
0021 
0022 #ifndef CERN_QP_VVEC
0023 #define CERN_QP_VVEC
0024 
0025 
0026 
0027 #include    "cern_types.h"
0028 #include    "hbook_defs.h"
0029 #include    "qp_dimension.h"
0030 
0031 
0032 typedef enum {
0033     Var_RWN, Var_CWN, Var_Vec
0034 } VarClass;
0035 
0036 
0037 typedef struct _var_struct_ * Variable;
0038 typedef struct _var_struct_ {
0039     VarClass    var_class;
0040     char        block[MAX_BLOCK_LEN+1];
0041     char        name[MAX_NAME_LEN+1];
0042     DataType    dtyp;
0043     int     size;       /* size in Int32's */
0044     bool        varDim;     /* is variable length array ? */
0045     int     var_base;   /* number of elements in all the non */
0046                     /* variable dimensions ( = total if */
0047                     /* varDim = FALSE) */
0048     int     var_index;  /* index of the index variable */
0049 } VarStruct;
0050 
0051 
0052 typedef struct _vvec_struct_ {
0053     int     fSize;
0054     int     fEntries;
0055     Variable *  fV;
0056 } VVecStruct;
0057 
0058 typedef VVecStruct  *VVec;
0059 
0060 
0061 extern Variable
0062 var_alloc();
0063 
0064 
0065 extern Variable
0066 var_new( Variable v );
0067 
0068 
0069 extern void
0070 var_del( Variable v );
0071 
0072 
0073 extern VVec
0074 vvec_new( int n );
0075 
0076 extern VVec
0077 vvec_copy( VVec vv );
0078 
0079 extern void
0080 vvec_add( VVec vv, Variable v );
0081 
0082 extern Variable
0083 vvec_get( VVec vv, const int i );
0084 
0085 extern void
0086 vvec_del( VVec vv );
0087 
0088 extern int
0089 vvec_entries( VVec vv );
0090 
0091 #endif  /*  CERN_QP_VVEC    */