source: git/Singular/idrec.h @ 72df18

spielwiese
Last change on this file since 72df18 was 2d01c0, checked in by Hans Schoenemann <hannes@…>, 4 years ago
add Init() to idrec class
  • Property mode set to 100644
File size: 1.2 KB
Line 
1#ifndef IDREC_H
2#define IDREC_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT interpreter type for variables
8*/
9
10#include "Singular/lists.h"
11#include "Singular/attrib.h"
12#include "Singular/links/silink.h"
13
14class bigintmat;
15typedef union uutypes      utypes;
16union uutypes
17{
18  int           i;
19  ring          uring;
20  poly          p;
21  number        n;
22  ideal         uideal;
23  map           umap;
24  matrix        umatrix;
25  char *        ustring;
26  intvec *      iv;
27  bigintmat *   bim;
28  lists         l;
29  si_link       li;
30  package       pack;
31  procinfo *    pinf;
32};
33
34class idrec
35{
36  public:
37  /* !! do not change the first 6 entries !! (see subexpr.h: sleftv) */
38  idhdl      next;
39  const char *id;
40  utypes     data;
41  attr       attribute;
42  BITSET     flag;
43  int        typ;
44
45  short      lev;
46  short      ref;
47  unsigned long id_i;
48
49  idrec() { memset(this,0,sizeof(*this)); }
50  inline void Init() { memset(this,0,sizeof(*this)); }
51  idhdl get(const char * s, int lev);
52  idhdl get_level(const char * s, int lev);
53  idhdl set(const char * s, int lev, int t/*typ*/, BOOLEAN init=TRUE);
54  char * String(BOOLEAN typed = FALSE);
55//  ~idrec();
56};
57
58#endif
59
Note: See TracBrowser for help on using the repository browser.